Skip to main content
Solved

Way too many decimal places on Abandoned Cart EDM


Forum|alt.badge.img+2

Hello everyone,

On our “Abandoned Cart” Flow EDM, the price is coming up with 8 x decimal places. 

We’ve looked on the back end and there’s only 2 x decimal places for the price, we’ve nevered entered more than 2 but it always comes up through EDM. 

Any suggestions on how to fix?

Thanks!!! 

 

Best answer by David To

Hey @WildEst1996!,

On top of the great solution posed by @julie.accardo, another method to cut down on the decimal points for a dynamic variable would be to use the floatformat variable filter. Using a variable filter such as |floatformat:2 will limit the number of decimal points the variable will show. As noted in the Glossary of Variable Filters article, the example they have listed as: If your variable is or 5.0003, {{ your_variable|floatformat:2 }} will render as 5.00.

Hope this helps!
David

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

2 replies

julie.accardo
Klaviyo Employee
Forum|alt.badge.img+36
  • Klaviyo Employee
  • 185 replies
  • June 5, 2021

Hi @WildEst1996!,

 

The dynamic data that displays in abandoned cart flow (item image, item price, etc) pulls directly from the triggering metric for that flow. I would recommend seeing if you can find a different price event property in the triggering event payload.

 

As shown in the example below, I am able to pull the price event property from the  “Started Checkout” event and have that display with the correct price.

 

Here is our help center article on how to configure dynamic blocks in your email template which will shed a little more light on how to troubleshoot these blocks.

 

Have a nice weekend!

Julie


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • June 6, 2021

Hey @WildEst1996!,

On top of the great solution posed by @julie.accardo, another method to cut down on the decimal points for a dynamic variable would be to use the floatformat variable filter. Using a variable filter such as |floatformat:2 will limit the number of decimal points the variable will show. As noted in the Glossary of Variable Filters article, the example they have listed as: If your variable is or 5.0003, {{ your_variable|floatformat:2 }} will render as 5.00.

Hope this helps!
David