Solved

How do I display price including VAT in my Abandoned Cart email?

  • 14 March 2021
  • 8 replies
  • 2857 views

Badge +2

Hello,

The product price in the abandoned cart emails is without vat, i need to display price including vat, what should i change in this line here?

 

Quantity: {{ item.Quantity|floatformat:0 }} — Total: {% currency_format item.LineTotal|floatformat:2 %}

icon

Best answer by elisegaines 18 March 2021, 21:46

View original

8 replies

Userlevel 7
Badge +60

Hi @irenebylia22

 

I would encourage you to check out the codes shared earlier in this thread to help test this. In order to test its accuracy, you can trigger the flow yourself and add to your cart and see if the correct price comes to your email. However, I can see that you are conversing with a colleague of mine in a similar thread you created below.

 

-Taylor 

Badge +1

Hello! Im needing your help :) Currently, Im creating the NL for abandoned carts. I want to show the product name AND the product price. 

 

Everything is correct with the product name by using: {{ item.product.title }}

However, I can not put te price. Could you please tell me what "code" I should use so that the price of my product appears below the name?

Userlevel 2
Badge +6

This has probably been resolved for @SK789, but for anyone else reading trying to get the total including VAT (and shipping) in the Placed Order event, try this:

{{ event|lookup:’$value’|floatformat:2 }}

Badge +3

Hi,

this works really good in abandon cart however the same does not work in order placed. Would you know what the array be for Order Placed and Completed? 

Thanks 

Badge +2

Thank you that solved the issue.

Userlevel 5
Badge +25

Could you try this? {% currency_format item.TotalWithTax|floatformat:2 %} 

But when you paste it, make sure to paste as “plain text” (use Ctrl+Shift+V or Cmd+Shift+V), to make sure no formatting is getting pasted in -- the formatting can sometimes break the code. 

Badge +2

Hello,

 

This is the event for price including vat , {{ event.extra.Items.0.TotalWithTax }}

And this is the original line,

Quantity: {{ item.Quantity|floatformat:0 }} — Total: {% currency_format item.LineTotal|floatformat:2 %}

How should i change it to include the event with the tax?, because i tried to add it like in the screenshot but i get an error

 

 

Userlevel 5
Badge +25

Hi @Fmsojo! Klaviyo is limited in that it can only display information from the “Event data” for the event that triggers the flow -- in this case, “started checkout”. You can check that event data to see if the price with VAT is included! To do this: 
1. click the “eye” preview icon in the editor 

2. Scroll through the data in the modal that pops up until you find the section with data on the items you ordered. It may be within the section labeled “Items”, or under “extra > line_items”, or similar. 

3. Look at the price lines to see if the price you’d like to display is included. You can use Ctrl+F/Cmd+F to search for a specific number, if you happen to know what the VAT price is. 

If you’re able to find the price you’d like to display, you can add it to the template! Make sure to adjust the template tag to match the format used in your dynamic block -- for example, if the correct template tag is {{ event.extra.line_items.price_vat }}, replace event.extra.line_items with just “item”, so the tag is {{ item.price_vat }}. 

 

This guide has a little more information on using event data in flows: https://help.klaviyo.com/hc/en-us/articles/115005083467 

Reply