Re: B2B Customer Display custom product template

B2B Customer Display custom product template

WhompWhomp
New Member
7 0 0

I am adding a B2B capability to an existing Shopify store (not Shopify Plus) and will be tagging the wholesale-approved customers with "wholesale". 

 

I would like the logged-in wholesale customers to be able to see a different product page template that is custom for wholesale without having to duplicate products and have one that shows only to DTC and one that shows only to B2B. 

 

Is there a way for logged-in customers to see the Wholesale-Product Template and the regular B2B customer to see the Default Template? 

Replies 7 (7)

gr_trading
Shopify Partner
1922 145 200

Hi @WhompWhomp 

 

According to your requirement you would have two type of users 

 

1. Normal B2B user

2. Wholesale B2B user

 

When you refer to have different template what changes you are expecting. 

 

Like changing the design and adding specific collection or information is possible for logged in user.

 

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
WhompWhomp
New Member
7 0 0

It would have 2 customers: 

1. DTC (direct to consumer) or regular retail

2. B2B (wholesale)

 

I want the DTC to see just the Default product template and the wholesale the 'wholesale-template' that shows metafield to wholesale terms, Special Wholesale Text about ordering information, Wholesale pricing, and metafield to wholesale selling tools. 

 

Here is part of the prototype: 

Screenshot 2023-06-27 at 9.32.47 PM.png

 

gr_trading
Shopify Partner
1922 145 200

Yes, this is possible.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
WhompWhomp
New Member
7 0 0

Would this be a code solution? 

 

{% if customer.tags contains 'Wholesale' or customer.tags contains 'wholesale' %}
{% assign page_template_product = 'wholesale-product' %}
{% else %}
{% assign page_template_product = section.settings.main_product %}
{% endif %}
gr_trading
Shopify Partner
1922 145 200

Yes, seems like it should work.

 

I don't know where you should put this code as 2.0 themes use .JSON template for product.

 

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

CelebritySmiles
Visitor
1 0 0

I am asking the same question. Did you get a reply?

WhompWhomp
New Member
7 0 0

Nope - ended up working with a developer who is now sorting it out!