Re: B2B - how to output the Company name the customer is a member of

B2B - how to output the Company name the customer is a member of

geoffmartyn
Shopify Partner
2 0 0

Hi,

 

I'm developing a custom storefront for a brand with multiple 'sub-brands' a la Gap / Old Navy / Banana Republic etc so that each brand can use the same checkout. 

 

I'm also trying to utilise the new B2B functionality and have managed to create a section on the product pages which simply checks for {% if customer.b2b? == true %} and places the RRP and custom price for that Wholesale customer within this if statement, thereby hiding it from regular retail customers. 

 

Looking at the company object in the API reference guide, I should be able to output {{ company.name }} however, it doesn't look like this is available. Am I missing something or is this simply not available to the front end? 

 

Thank you,

Geoff

 

Screenshot 2022-10-06 at 16.09.09.png

 

 

 

Replies 3 (3)

ecommercequeen
New Member
8 0 0

Glad you asked this.  Same issue.  BTW - figured I'd ask another Shopify user - any good Shopify events you got your eye on?  I'm looking that this one https://ecomlivestream.com.  Free and a nice lineup of speakers (CoFounders of $1bn+ brands).  Any one have anything else on their radar?  Are you part of any other communities.  I'm new to Shopify ecosystem and looking to network.

geoffmartyn
Shopify Partner
2 0 0

Hi - thanks for the heads-up on that event. I'll have a look. 

 

I don't have anything else on my radar, just keeping my head down with various projects. 

Bjorn29
Shopify Partner
5 1 1

Hi, you've probably already found the solution since it's a post from 2022, but I'll leave the answer here for others anyway.

I think it should be the following. I think you should access this via the customer object. {{ customer.current_company.name }}

 

See also this link. It's quite helpful. 
https://shopify.dev/docs/themes/pricing-payments/b2b