Skip to main content
Solved

How do I amend the item price in a dynamic table and include discounted price?

  • September 12, 2022
  • 2 replies
  • 347 views

Forum|alt.badge.img+2

Hi there, 

I’m currently working on an abandoned basket email where I’m firstly struggling to amend the ‘item.price’ so it displays in this format - ‘£0.00’.  Currently it’s only showing one zero, i.e. ‘£0.0’. 

Secondly, I want to ensure that the discounted price is included in the second email within this flow (20% off).

Can you please help? Many thanks!

Best answer by Omar

Hi @luciejs,

for the first question how to add 2 decimals please add floatformat:2 in the variable. So it becomes something like the following:

{{ event|lookup:'total_price'|floatformat:2 }}

or 

{{ item.price|floatformat:2 }}

 

For the second question using the multiply option will help here and combined will look like the following.

{{ item.price|multiply:.8|floatformat:2 }}

 

For more information check this link and this link about using different variable options.

 

I hope this helps

 

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Omar
Partner - Platinum
Forum|alt.badge.img+46
  • 2025 Champion
  • 494 replies
  • Answer
  • September 12, 2022

Hi @luciejs,

for the first question how to add 2 decimals please add floatformat:2 in the variable. So it becomes something like the following:

{{ event|lookup:'total_price'|floatformat:2 }}

or 

{{ item.price|floatformat:2 }}

 

For the second question using the multiply option will help here and combined will look like the following.

{{ item.price|multiply:.8|floatformat:2 }}

 

For more information check this link and this link about using different variable options.

 

I hope this helps

 

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • September 12, 2022

Thank you!