Shopify themes, liquid, logos, and UX
Hi,
You need to work on Liquid and CSS
Example of liquid will be used in product template
{% if product.compare_at_price > product.price %}
{% assign discount_percent = ((product.compare_at_price - product.price) / product.compare_at_price) * 100 | money_without_currency %}
<span class="discount-percentage">Save {{ discount_percent }}%</span>
{% endif %}
Note - First, decide how you want to calculate the discount percentage.
I want to be calculated automatically as I already created many automatic discounts.
where should I past this code?
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025