Skip to main content
thepowerofcopy
Partner - Silver
Partner - Silver
October 19, 2022
Solved

Error showing t he quantity

  • October 19, 2022
  • 2 replies
  • 127 views

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 ?
    This topic has been closed for replies.
    Best answer by Brian Turcotte

    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:

    https://developers.klaviyo.com/en

     

    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!

     

    -Brian

     

    2 replies

    Brian Turcotte
    Klaviyo Alum
    October 21, 2022

    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:

    https://developers.klaviyo.com/en

     

    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!

     

    -Brian

     

    thepowerofcopy
    Partner - Silver
    Partner - Silver
    October 24, 2022

    Thank you 🙌🏼

    Helping consumable products increase revenue by up to 20% by using customer retention strategies through email marketing.