Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
Debut theme
I have a collection and I am offering 10% OFF all products and variants in this 1 collection but I do NOT want to create an automatic discount or change each variant price manually of -10%.
I would like the price on the collection page price of the product to say From $71.10 and the compare price is $79.00. So customers know the sale price and the original price in one line.
Thanks
Hello @onyx_au
Welcome to Shopify Community.
Okay, so if you just want to show the discounted price dynamically calculated it can be done via hardcoded.
{% if product.tags contains 'ABC' %}
{% assign discount_value = 10 %}
{% assign discount_amt = 100 | minus: discount_value %}
{% assign discounted_total = product.price | times: discount_amt | divided_by: 100 | round: 2 %}
{{ product.price | money }} <del>{{ discounted_total | money }}</del>
{% endif %}
Let me know if you need help in the setup.
Thanks
Hi Onyx_au,
If you don't want to create an automatic discount, and you don't want to change each variant price manually, then you have to use some type of automation, like:
A solution that only involves changing Liquid code won't be sufficient if you want the prices that customers pay to also be reduced by 10%.
Best,
Tobe
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024