Shopify themes, liquid, logos, and UX
Hello!
Can someone please help me convert the Discount label from money to a percentage? https://kocktema.se/ You can see here
Hello @waltherolsson that's possible with an advanced theme customization , there are plenty of existing forum posts on the liquid logic though implementation varies wildly among themes.
If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi Walterolsson,
To convert the discount label into percentage, you'll need to edit your theme's code. Currently how it is functioning is like this:
money-saved = original price - sale price
put money-saved into card
You'll need to change it into something like this:
money-saved = original price - sale price
money-saved-in-percentage = ( money-saved / original price ) * 100
put money-saved-in-percentage into card
Then with additional changes, you can change the text too. Do note that above is a simplified version of how the code is working, how the real code looks is very different from above.
Let me know if you have any questions 🙂👍
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