Solved

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

  • 4 June 2021
  • 9 replies
  • 1243 views

Badge +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

icon

Best answer by Dov 10 June 2021, 18:13

View original

9 replies

Userlevel 5
Badge +34

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

Badge +2

Hi Julie,

 

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

Thank you!

Userlevel 6
Badge +31

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.

Badge +2

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

Userlevel 7
Badge +61

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.

 

Badge +5

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!

Userlevel 7
Badge +61

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.

Badge +5

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

Userlevel 7
Badge +61

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.

Reply