Displaying B2B / B2C pricing based on a given customer's customer group

I would like to display the gross / net price of a product based on the given customer’s customer group. The customer will be able to choose their group based on a simple checkbox input in the top-header, but I cannot seem to find a way to update the current state’s customer group from outside the admin page.

It was suggested to me to create a second sales channel for B2B pricing, but I would need a solution that allows me to display either set of prices under the same domain, and having tried to implement the second channel, Shopware will not let me use duplicate domains.

Would anyone have a suggestion as to how I could successfully change the customer group based on a checkbox to display the relevant price information?

You can use a subdomain or something like www.domain.com/b2b as the second saleschannel.

I am trying to avoid using any variations on the domain if possible, I am hoping for a solution that can be done via the backend, similar to updating the language / currency displayed

You need a simple plugin that shows both prices on the page, each with a different class which will be hidden depending on the check box selection.

Yes, well my question is: if I am making this plugin myself, how would I update the current customer’s customer group based on the check box selection? I don’t see any easy way it can be done, although I am new to this.

Is there any function that I can call / eventListener that will allow me to update the customer group from the front-end?

Why do you have to change the customer‘s status? Usually this is only done during the registration.

Nevertheless, it shouldn’t be that complicated to change the status. It’s just a API call or through you plug-in.

The problem, your customer has to be logged in.

The customer’s status will need to be verified in the registration yes, but the point of the checkbox is so that the correct prices are displayed, and the correct total is calculated for the customer as they continue shopping. Seems like it would be easier to just change a customer group from A to B, rather than adding in another element that I need to track on every page to make sure the correct prices are being displayed / calculated

I agree it shouldn’t be complicated and I would have assumed it would be able to be updated with an API call, but I cannot find the API call or the logistics that would allow me to do so. Would you have any idea on where to go to find what I am looking for?

Why don’t you use a variable in the template? A simple if-statement: company, then without tax, person then with tax.

Maybe it is already implemented in SW?! Never used it.