Skip to main content
Contributor I
September 12, 2022
Solved

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

  • September 12, 2022
  • 2 replies
  • 561 views

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!

    This topic has been closed for replies.
    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

    2 replies

    Omar
    Partner - Platinum
    OmarAnswer
    2025 Champion
    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

    Helping E-commerce brands maximize Lifetime Value & Profits with Klaviyo, CRO & CVO - Get your free Audit - https://link.polarisgrowth.com/free-audit
    luciejsAuthor
    Contributor I
    September 12, 2022

    Thank you!