Skip to main content

Hello,

I am trying to include a block of up to 3 product images, based on items a customer has ordered (a product review prompt).

I want them to appear side by side, and so have used a 3 column table.

However, when there are only 1 or 2 products to show, the extra columns in the table just show a small error box, because there are no 2nd or 3rd images to retrieve.

 

How can I do this dynamically, so that it only tries to retrieve item images that are there?

 

thanks

Hello @Alcockmichael,

Thanks for sharing your question with the Klaviyo Community!

When setting up a dynamic table block to display products side by side versus on top of one another, when done correctly, it is expected to see empty boxes when previewing the email while in the Klaviyo interfere when only one or two out of the three products are purchased. However, when viewing the email in a Live email send or even when previewing using the Send as an email option, those empty boxes will not be present; unlike when previewing the email using the Show directly in Klaviyo option. 

Previewing directly in Klaviyo will display those empty boxes simply to highlight that there are technically elements there within the email that was unable to call or retrieve the dynamic data to display. Keep in mind, that when building a dynamic table block to render side by side, you’ll need to manually build out each column to reference products in the array format of 0, 1, 2, etc. 

I hope this helps!

David


Thanks for the reply @david.to.

I tried this, but when I get the preview email, I still get the boxes :

The above order was only one item (item 0 is in the middle for aesthetics). When previewing with multiple items, I get the correct behaviour:
 

 

Any thoughts?

 

Thanks

Michael


Hey @Alcockmichael,

I would suggest reviewing how you’ve manually built out that dynamic table as this may indicate some error in how the dynamic table block was set up. In addition, keep in mind that since you are not technically cycling through the products in an array format to dynamic display the product and product information in a vertical layout, you would not need to select the “dynamic” function of the table block and should instead only need to use the “static” function. If you still had the “dynamic” aspect enabled versus the “static” option, this will cause the block to attempt to pull in details that would not be present per the data sourcing of the block. 

Because you would be manually building out and referencing each of these products individually versus automatically cycling through them, using the static function would work best.

Have a great day!

David 

 


Thanks @david.to .

 

In the end reverted to vertical product layout, as couldn’t work this out.


Hey @Alcockmichael,

Sorry to hear you’re having troubles implementing this! If you need hands on assistance I would suggest seeking a Klaviyo Partner who specializes in email design or template development who can better assist or working with a email design specialist who you are familiar with! 

Thanks for being a part of the Klaviyo Community!

David


Reply