discount code design

Solved
Tourist
10 0 0

Hi,

 

When I enable a discount code it says (in a circle): "save () euro"

Can I change this to: "save 10%"?

 

Theme: Brooklyn

 

thank you

0 Likes
Shopify Partner
1933 321 406

Hi @Job2506 

So you want to change discount from amount to (%) percentage?  

Send me your store url

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted

Success.

Hello ,

To show percentage instead of saved amount you should open a product-grid-item.liquid in your Snippets folder and replace these lines 

<div class="grid-product__on-sale">
  {% capture saved_amount %}{{ product.compare_at_price | minus: product.price | money_without_trailing_zeros }}{% endcapture %}
  <p>{{ 'products.general.save_html' | t: saved_amount: saved_amount }}</p>
</div>

with the following

<div class="grid-product__on-sale">
  {% capture discount_percentage %}{{ product.compare_at_price | minus: product.price | times: 100 | divided_by: product.compare_at_price |round }}%{% endcapture %}
  <p>{{ 'products.general.save_html' | t: saved_amount: discount_percentage }}</p>
</div>
Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
1 Like