Solved

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

  • 12 September 2022
  • 2 replies
  • 190 views

Badge +1

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!

icon

Best answer by Omar 12 September 2022, 18:14

View original

2 replies

Userlevel 7
Badge +44

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

Badge +1

Thank you! 

Reply