Skip to main content
Solved

Display Product Image and Title in a Dynamic Table Block for Added to Cart


Forum|alt.badge.img+2

Hi,

I have a problem with the Dynamic Table, I want the product title and product picture to show and I’m following the tutorial but some information the variable seems missing.

The trigger is “When someone Added to Cart” and the Event Variable for the product title is {{ event.Name }}

Im not sure what to put on the Data Source

Thank you,

Pablo

Best answer by Dov

Hello @PabloS,

Thank you for sharing your question with the Klaviyo Community. And thank you @julie.accardo and @Spark Bridge Digital LLC for your contributions. 

@PabloS, unlike Started Checkout, the Added to Cart metric only stores 1 product and it’s associated event data (Brand, Price etc.) per event. This means that there are no items to iterate over using a row collection and alias.

The solution is to simply click on the event data in the preview and copy and paste those tags directly into your email (see example screenshots below). Also, disable any block repeat function you may have enabled or that will break the block.

 

 

Thanks and have a wonderful day.

 

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

9 replies

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

Hi @PabloS,

 

You don’t need to make any changes to the row collection or row alias. The row alias is replacing the row collection in the tag which allows the tag to go over every instance of that data within the event which allows us to display all items added to cart.

 

We use the row alias in place of the row collection. In your case, I’d recommend switching {{ event.Name }} to {{ item.Name }} and see if that works for you!

 

Have a nice weekend!

Julie


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • June 7, 2021

Hi Julie,

 

Thank for your reply. Unfortunately its not working, can you please tell what to fill in in each option.

Thank you!


Spark Bridge Digital LLC
Partner - Gold
Forum|alt.badge.img+33

Hey Pablo!

 

Give this a try -

 

And grab fields within your data that contain the row collection removed from the variable in it. You’ll also trim down the Row alias (items down to item)

It’ll look something like so in your table -
 

 

Since I can’t see your full preview data, I can’t give specifics on what fields you have available to work with but should be something close to this. 

Let me know if you get stuck though.


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • June 10, 2021

Hi,

 

I think I know why is not working, I just dont know how to solve it. This Flows trigger is “When Someone Added to Cart” and not “When Someone Check Out Started” and this is why I dont have the Variable product.title. For product name I only have the variable “name”.

This are the only variables I have available.

Thank you,

Pablo


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • June 10, 2021

Hello @PabloS,

Thank you for sharing your question with the Klaviyo Community. And thank you @julie.accardo and @Spark Bridge Digital LLC for your contributions. 

@PabloS, unlike Started Checkout, the Added to Cart metric only stores 1 product and it’s associated event data (Brand, Price etc.) per event. This means that there are no items to iterate over using a row collection and alias.

The solution is to simply click on the event data in the preview and copy and paste those tags directly into your email (see example screenshots below). Also, disable any block repeat function you may have enabled or that will break the block.

 

 

Thanks and have a wonderful day.

 


Forum|alt.badge.img+6
  • Contributor IV
  • 13 replies
  • November 2, 2022

Hi @Dov, i’m using WooCommerce and i’m setting up an abandoned cart flow based on the added to cart metric.

I’m adding a “back to cart” CTA, will the following dynamic code from the abandoned checkout flow still work or do i need to change it?

{{ organization.url|trim_slash }}/cart?wck_rebuild_cart={{ event.extra.CartRebuildKey }}

 

Thanks!


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • November 2, 2022

Hi @Shiroyasha,

Thanks for sharing this question with the community.

You’ll need to use the tag associated with the product URL in the CTA.

The tag you mentioned won’t work because it relies on a cart rebuild key {{ event.extra.CartRebuildKey }} which is not populated in flows triggered off of Added to Cart.

I hope that’s helpful.


Forum|alt.badge.img+6
  • Contributor IV
  • 13 replies
  • November 3, 2022

Hi @Dov, do you mean {{ event.AddedItemURL }} ? 


Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • November 3, 2022

Hi @Shiroyasha,

I apologize I was mistaken earlier. I noticed you mentioned you’re using WooCommerce in which case there will be a cart rebuild key included in the event data. That means your original suggestion will work.

You can use the following tag in the CTA of the Abandoned Cart flow triggered off of Added to Cart:

{{ organization.url|trim_slash }}/cart?wck_rebuild_cart={{ event.extra.CartRebuildKey }}

Apologies for the confusion, thanks for being a community member.