Re: Displaying Base Price in theme on Shopify B2B's wholesale platform

Displaying Base Price in theme on Shopify B2B's wholesale platform

importantlabs
Shopify Partner
1 0 9

I'm using Shopify B2B to setup wholesale prices on my site. When a customer logs in, all the prices switch to the B2B discounted price based on the catalog discount.

 

What is the liquid code I would use to display the Base Price of my product above the discounted B2B price once a customer logs into their B2B account?

 

Thanks for your help! 

Replies 22 (22)

RedBoltVisual
Shopify Partner
2 0 1

We would also like to do this, preferably comparing to retail price, but using 'compare at' price would also be satisfactory. I expect we would need to use some sort of 'if b2b...' call.

FM121
Visitor
1 0 0

We need this as well! Any solusion? 

zmoss
Shopify Partner
5 0 0

Wondering the same as well. I was hoping we could at least use the `compare_at_price` but that seems to always display as null for b2b catalogs 😕

 

I have not found anywhere to actually grab the original "standard" price yet.

zmoss
Shopify Partner
5 0 0

zmoss_0-1692993504138.png

I see the "Product Price" listed when editing the specific catalog, maybe its a miss as this is a new feature? 

noliver
Shopify Partner
3 0 3

You can now add compare-at prices to B2B catalogs via CSV import. Both the price and compare-at price fields need to be set, so you can't use global price adjustment rules, meaning a metafield is probably still a more flexible choice.

John_Robles
Shopify Partner
5 0 0

Trying to do the same thing! I don't know enough to make this work ... but perhaps using a variant metafield can help? 

zmoss
Shopify Partner
5 0 0

 Ya, exactly what I did for now. Got fancy and dynamically created price break tables too. Hopefully it’ll be available natively as I’d prefer

IMG_9651.png

not to have to manage the extra fields if not needed.

John_Robles
Shopify Partner
5 0 0

Great idea! What's complicating my situation is that some of the variants on my site have different retail prices. So I'm not able to just display one "Retail Price". I'd have to figure out how to display each variant Retail price (metafield) as each variant is selected. 

Bengk
Shopify Partner
21 0 13

Agreed. Without this how is a wholesale store supposed to show the discount from MSRP that the buyer is getting?

Bengk
Shopify Partner
21 0 13

B2B price catalog also seems to set the compare_at_price to null when trying to retrieve with liquid code even though it's set in Shopify on the variant

davidfmiller
Visitor
1 0 1

I am also trying to figure out how to do this.

JuliusJ
Tourist
3 0 1

Adding another interested party to this thread... Would prefer a native solution, but would be open to exploring a custom fix if someone has used current Shopify B2B platform to do this.

Stephen34
Shopify Partner
73 1 90

Add another, its frustrating because I have a 20% general discount then all of the price breaks setup for volume and it all works great, but I need the product page to show the retail price so dealers have a better sense of their discount and can easily see how much they should charge as a retailer.

megkryptek
Tourist
4 0 1

We would also like to know how to have the MSRP show up, this is a must have for B2B orders. 

megkryptek
Tourist
4 0 1

So I did a decent amount of digging and found a solution. It takes a couple of steps but ends up being decently easy:

 

1. Add a Metafield description for MSRP in the Metafield list under Content (on the right main menu of shopify) > Metaobjects > Add Definition

2. Go to your items and add the MSRP value to the Metafield at the bottom of the PDP

3. Edit your theme's product page (without going into the code) click add a block and select "custom liquid" and add this code or editing to match your metafield:

 

{% if customer.b2b? %}<p><strong>MSRP</strong>: {{ product.metafields.custom.msrp | metafield_tag }} </p>{% endif %}

 

Then it will only show up when a customer logs in to a B2B account. See below 

Screenshot 2024-03-06 at 4.46.03 PM.png

Hope this is helpful as it worked for me!

kptichard
Shopify Partner
12 1 2

Does this work for variants as well ? That is the issue for me.

megkryptek
Tourist
4 0 1

You can assign Metafields to a variant so you would follow these instructions but when creating the meta definition you would choose reference variant instead of Product. Then the code will be slightly different because it wouldn't be "product.metafields.custom.msrp" it would be "variant.metafields.custom.msrp".

JuliusJ
Tourist
3 0 1

This is great, seems like a perfect solution. I can't seem to get the metafield to pull into the theme / PDP though. Using Impulse theme, any idea on what might be the issue here?

 

View in the editor (that $650 showing is actually from the main product price, not the metafield):

JuliusJ_0-1709832297236.png 

 

variant metafield definition:

JuliusJ_1-1709832384233.png 

metafield value:

JuliusJ_2-1709832404049.png

 

 

 

megkryptek
Tourist
4 0 1

JuliusJ,

 

Without seeing your theme and the editor I can't really help. I would need access to see your theme editor. 

rnrmediagrp
Shopify Partner
25 0 8

Yea but that's only if you're dealing with 1 level of discount tiers.. What if your dealing with 3 levels of discounts?

gunnar-1
Shopify Partner
9 1 6

Hi There,

I extended this solution a bit to include variants (requires the variants to have a mrsp metafield), showing the selected variant (if product has variant, otherwise it shows the mrsp from the product metafield).

 

{% if customer.b2b? %}
  {%- unless product.has_only_default_variant -%}
    {% for variant in product.variants %}
      {% if variant == product.selected_variant and variant.metafields.custom.msrp != blank %}
        {% assign msrp = variant.metafields.custom.msrp.value | money %}
      {% endif %}
    {% endfor %}
  {%- else -%}
    {% assign msrp =product.metafields.custom.msrp.value | money %}
  {%- endunless -%}
{% endif %}

 

// place this after the shown price in your price.liquid snippet
{% if customer.b2b? %} <span style="font-size: 75%;opacity: 0.8;">(MSRP: {{ msrp }})</span>{% endif %}

 

Hope this helps.

Sbezzi12
Visitor
1 0 0

This is great news that we can do this. I'm having trouble finding this to put the code.

3. Edit your theme's product page (without going into the code) click add a block and select "custom liquid" and add this code or editing to match your metafield: