How do I remove the “.0” in product quantities?
The value from the e-commerce platform only shows “1”
How do I remove the “.0” in product quantities?
The value from the e-commerce platform only shows “1”
Hi
Welcome to the Community! We’re so glad you’re here!
Does your question pertain to previewing a customer’s event data in an email? If so, this is because the information displayed is a List Data Entry. It is very common to misunderstand the 0 in List Data as the quantity of the product. These List Entries in the event data are numbered starting at 0, not 1, indicating it is the first item in an array of items. The number does not equal the quantity of products in the event. For instance, if {{ event.extra.line_items.0.product.name }} is the variable entry for an image, the 0 indicates that it is the first item in the array (and not that there is no product images).
For more information explaining this, I recommend reading this section of Event Variables In Emails.
Thanks for sharing your question in the Community as I’m sure it will inform many others!
Best,
Taylor
Hi,
I am having the same problem. I have read the guide but there isn't clear instructions to what must be inputted to retrieve the quantity to display correctly, other than you mist input the ‘exact’ event variable which still displays incorrectly, I must be miss interpreting the instructions?. Please can you provide an example?
Many thanks!
Michael
Now pSOLVED] Thanks!
Hi
Happy to hear you were able to solve the issue! Do you mind sharing out your workflow and what you discovered with the Community in case it could help another member having a similar issue in the future?
Thank you for participating in the Community!
-Taylor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.