Display Member and Non-Member Pricing

Highlighted
Shopify Partner
9 0 0

Hello - 

 

I have a client (using Debut Theme) that is going to be doing an automatic member discount based on customer tags. 

 

They would like to have member and nonmember pricing displayed on the product page and, ideally, every place price is displayed.  I was hoping I could just do this with math filters (it's a simple 20% discount) but am having a hard time finding where in the theme to add the code to get it to display properly.

 

Can anyone help?

 

Thanks!

Andy

0 Likes
Highlighted

Hi @rogersab1223 

Are you using any app for membership pricing? You can simply use liquid math filter to calculate the membership price. Here is the reference. https://help.shopify.com/themes/liquid/filters/math-filters

But I think the best option should be yours client have discount gift for only members. They can send share their giftcode via email so at checkout process only member can access that code and take 20% discount.

 

Or if you are using any page builder apps, you can add some js code if you have products with multiple variant with different pricing. You can contact them for more information.

Thanks.

- Tips to optimize website loadspeed: academy.pagefly.io/how-to-speed-up-website

- Do you need to customize your landing page, product page, blog, coming soon, FAQ, about us pages? Check out PageFly - Advanced Shopify Page Builder.
0 Likes
Highlighted
Shopify Partner
9 0 0

Hi - 

 

No, I'm not using any membership management applications at this moment.  I haven't found any "for pay" applications that do what I'm trying to do here.  Is there a membership management app that will show, on the product page, both the regular AND the member pricing?

 

I know how to calculate the correct membership price using the math filters - it's effectively this:

 

{{ product-price | times: 0.8 }} 

to show the member pricing from the regular (non-member) pricing. The membership discount will be calculated using an automated discount based on a member tag in their customer ID. 

 

However, the product pages MUST display both the member and non-member price, like so: 

Regular: $24.95

Member: $19.96

 

As the client's current shopping cart shows this and they've found it to be a good membership sales tool.

 

I just need to know, in Debut, where I can add the code to calculate the member pricing.  Or, if there's another theme that will support this, I can probably entertain that as well.

 

Thanks!

0 Likes
Highlighted
Shopify Partner
9 0 0

Ok - I figured it out.  I'm leaving it here in case anyone else needs it: 

 

In Debut, open product-price.liquid in the Snippet Section

I created a variable: member_price - 

{%- assign member_price = product.price | times: 0.8 -%}

at line 6.  This line creates a variable called member_price which is 20% off the regular price (assigned in admin).  You don't need to assign a variable, but I did, if only to maintain consistency with the rest of the theme.   You could insert that line below instead of a variable call. 

 

I then found the section where the price is displayed - it starts at line 39 {{ money_price }}.  I added "Regular: " before that variable call and a <br> after it.  I then added the Member Price on the next line, like so: 

 

 Regular: {{ money_price }} <BR> 
 <span class="price-item2"> Member: {{ member_price | money }}</span>

Finally, you'll note I gave the new line a class of "price-item2".  That just makes the font size 120% to draw attention to the member price being cheaper.  I set that up in the theme.scss.liquid  code.  The styling is option. 

 

I hope this helps someone along the way.

 

Andy

 

Andy

0 Likes
Highlighted
New Member
1 0 0

Hi Andy, 

 

I have used your code above to do the same on my website, many thanks!

 

Can you confirm what is currently on line 6 as this part is not working and i suspect i am entering the pricing formula at the wrong part. Or if you could confirm what line comes before the code i am to enter that would be great!! 

 

Many thanks 

Chantelle

0 Likes