We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

HTML code to add compare at price to customer order confirmation email

HTML code to add compare at price to customer order confirmation email

TDDFC
Tourist
28 0 2

Hi, I've added the following to the order confirmation email code so my customers can see the compare at price of each item. However if they order multiple quantities of the same item, I would like it to multiply by the quantity. The same as the final line price does.  Does anyone know how to alter this to do that please?

 

<p> <s> {{ line.variant.compare_at_price | money }} </s> </p>

Reply 1 (1)

Guleria
Shopify Partner
4299 825 1189

Try this

{% assign compare_at_price_cents = line.variant.compare_at_price | money_without_currency | remove: ',' | times: 100 %}
{% assign total_price_cents = compare_at_price_cents | times: line.quantity %}
{{ total_price_cents | divided_by: 100.0 | money }}
- Elevate Your Store with Expert Shopify Services. Email: guleriathakur43@gmail.com - Need a quick fix or a tailored customization? I’ve got you covered.
- Looking to enhance your pages? Try GEMPAGES- a powerful drag & drop page builder.
- Let’s make your store stand out. Get in touch today!
- My Apps: Productify Groups – Smart product grouping made easy.