Shopify plus: I only want B2B customers to be able to order. How?

Topic summary

Goal: Allow storefront visibility but restrict ordering to registered B2B customers on Shopify Plus.

Built-in option: A screenshot indicates a Plus setting to “restrict access to B2B customers only.” This likely locks shopping functionality to B2B accounts, but the OP worries it blocks new customer acquisition if the site is fully gated.

Proposed approach (theme customization):

  • Use theme (Liquid) edits to hide/disable “Add to Cart” for non-B2B users while keeping public pages visible.
  • Flow: If “Add to Cart” clicked and user not logged in, redirect to login. After login, check if the customer is B2B (e.g., has a company location). Enable cart only for B2B; block for others.

Technical notes:

  • B2B = business-to-business accounts in Shopify Plus.
  • Liquid = Shopify’s templating language used to conditionally render elements in themes.

Status: No code shared. Multiple replies state this requires custom theme coding and likely a developer. Some offer paid help. No final solution implemented; action item is to hire a developer to add the conditional logic or use the Plus B2B restriction setting depending on desired openness of the site.

Summarized with AI on December 16. AI used: gpt-5.

I use Shopify Plus. I only want to sell to B2B customers. And only to my registered B2B customers.

How can I solve it? I do not want it to be possible for random people to make sales in my shop. I know i can put a password on the complete shop. I don’t want to close the entire online store. I want to have a landing page with information and so.

1 Like

There’s an option to restrict access to B2B customers only:

But how do I get new customers if the page is locked down by password?

I just need a option to only sell to B2B customers. It should be one of the most basic functions for a B2B solution?

1 Like

@Unaas

You need to update your theme and implement the following changes to hide the ‘Add to Cart’ button for non-B2B users:

  1. When the ‘Add to Cart’ button is clicked, if the user is not logged in, redirect them to the login page.
  2. After login, check whether the customer is a B2B or a regular user.
  3. Block the ‘Add to Cart’ button for non-B2B users and enable it only for B2B users.

Let us know if you need any coding assistance; we can handle that for you.

Thanks

Yeah they should have a smarter default for this. Probably just drop into liquid and remove the add to cart button if the current logged in customer doesn’t have any company location set on them.

Where do I do this? in the custom theme menu? or Shopfiy settings?

@Unaas You need to do some custom code in the theme.

What do I need to do? Who do I do that?

Spotify customer support does not understand anything about this when I try to as them.

What do I need to do? Who do I do that?

1 Like

My ability to provide free support here is limited, but if you’re interested in further help on a paid basis, the link is in my signature.

@Unaas You’ll need a developer to do this for you. This will require complicated coding stuff and honestly im too lazy to write the code here.

The logic is:

  1. When the ‘Add to Cart’ button is clicked, if the user is not logged in, redirect them to the login page.
  2. After login, check whether the customer is a B2B or a regular user.
  3. Block the ‘Add to Cart’ button for non-B2B users and enable it only for B2B users.

If you need further support you can find my email below.