Overview
Using Shopify's concept of theme contexts, you can create customizations for different markets, including the option of using a B2B market. This allows advanced theme customization such as hiding prices from guests or creating different experiences for B2B and DTC customers.
If you are operating a dedicated B2B storefront but you don't want to fully restrict access to customers from browsing your store, the context switcher is a great resource to hide collection grids and prices from product pages. Just make sure you're editing the right context before saving your changes.
Setting up a Market for B2B
If you're on Shopify Plus you have access to Shopify B2B and Markets. You will first need to create a Market for B2B in your Shopify admin. Navigate to the markets page in Shopify and create a new market.
Name the new market, something simple and easy to recognize like "B2B" is best. The conditions here are the most important part, make sure to set the conditions to include All Company locations. Don't forget to save.
Customize the B2B context in the Theme Editor
Now let's use this B2B market to make customizations in the theme editor. For this example, let's hide certain content such as product prices from non-B2B customers.
In the theme editor let's first edit the Store default market, specifically the Default product template. Here we can hide the pricing, and you may also want to hide other elements such as add to cart or buy buttons.
Now, select the B2B market from the context switcher at the top of the page. Any customizations made here will be visible only to B2B customers. For this example case, let's unhide the pricing and buy buttons so that approved B2B customers can see pricing and purchase products.
Important notes and considerations
The individual sections available and overall customizability may vary depending on the specific theme being used. The example in this guide uses Shopify's free Horizon theme.
βHiding pricing in other locations throughout the theme may require additional customization directly in the theme code. For more information on Liquid theme customization for B2B, check out Shopify's documentation here.
βIf you want to prevent guest browsing so that only approved B2B customers can access the site, you can simply enable the Onboard B2B app's Storefront lock extension in the theme, no further theme customizations or code needed.
βFor dedicated B2B sites that should never allow guest checkout, make sure to also enable the Onboard B2B app's Checkout lock, this will be a failsafe integrated directly in Shopify's checkout to ensure that only approved B2B customers can place an order.




