Error showing t he quantity

  • 19 October 2022
  • 2 replies

Userlevel 3
Badge +11

Hello Klaviyo Fam,

I have a problem showing the quantity in our Added to Cart flow. I followed this article but still, it’s not showing. 

{{ event.extra.line_items.0.quantity }}
That is the Variables

And want to add also how to create custom event for those who added multiple product in cart?
is there any article for this or tutorial ?

Best answer by Brian Turcotte 21 October 2022, 16:50

View original

2 replies

Userlevel 7
Badge +36

Hi @thepowerofcopy and welcome back to the Community!


The first thing I ought to point out is that the variable syntax you referenced is actually for the Started Checkout event, not Added to Cart. Additionally, the Added to Cart event actually does not pass quantity data, which further explains why there’s nothing to show there.


Here’s another Community post answered by my colleague that describes this concept in a similar context:

Plus, here’s another post describing the notable differences between Added to Cart and Started Checkout:


While no such tutorial currently exists for creating a custom event to track multiple added products to a cart, the Klaviyo API Reference & Technical Guides for Developers is a great place to find tips and resources for developing custom solutions:


Additionally, our Developer User Group is active with 200+ other developers asking and answering development questions, so I would highly recommend checking that out if you’re looking to build a custom solution!


Thanks so much for using the Community!




Userlevel 3
Badge +11

Thank you 🙌🏼