All things Shopify and commerce
Hi @BoldAttire
Can you please provide your store URL and password as well if applicable, so that I can provide you solution that can work for your store.
Best regards
Sahil
- Your
gencraze.com
i want to show price first then compare at price then a bar ( | ) and then % off just like below image ............i can do google meet or zoom meet as well
Hi @BoldAttire got the point, for changing the sale badge to percentage off page you need to edit the code in the theme files.
Go to the Code Editor:
Edit the main-product.liquid or price.liquid file:
Locate the Sale Badge Code:
{% if product.compare_at_price > product.price %}
<span class="badge sale-badge">Sale</span>
{% endif %}
Replace "Sale" with Percentage Off Calculation:
Replace the "Sale" text with a dynamic percentage calculation. Use the following code to calculate the percentage discount:
{% if product.compare_at_price > product.price %}
{% assign discount_percentage = 100 | minus: product.price | times: 100 | divided_by: product.compare_at_price %}
<span class="badge sale-badge">
{{ discount_percentage | round }}% Off
</span>
{% endif %}
Note: This is the base code, you may need to edit the code according to your theme and code files.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
Hi @BoldAttire ,
I hope this message finds you well.
We’re excited to introduce a service from Discounty called “General Discount,” which makes managing store-wide discounts simpler than ever. With General Discount, you can apply custom discounts to a variety of products or collections, complete with "compare at" pricing to show prices before and after sales. Click here to install the app!
Should you have any questions or need assistance in configuring General Discount, our support team is here 24/7 to help you maximize the potential of this tool.
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024