Solved

Exclude products from abandoned cart emails

  • 13 February 2021
  • 29 replies
  • 5347 views

Userlevel 1
Badge +2

Hello!

I am wondering if it is possible to exclude certain items from the dynamic table block for the abandoned cart e-mails. Or only include certain items/ collections. These are items that are “in” their cart but I do not want to send them to encourage them to finish checking out. For example I have the cloverly app for offsetting carbon footprint for shipping and I also have an app that I use to have multiple options for products. I don’t want these items showing in the abandoned cart e-mail. Is there a way to go about excluding these?

Thanks so much for any help!

Natalie

 

 

 

icon

Best answer by retention 15 February 2021, 17:42

View original

29 replies

Badge

@retention this is super useful, is there any way we can add multiple tags in the if statement? 

I tried adding “ or ‘tag2’ “ but that does not work obviously… Or maybe are other product attributes than tags we can use this in this statement like if the product belongs to a collection? I also tried item.product.collection and iten.product.collections but that did not work either.

 

{% if 'tag1' or ‘tag2’ in item.product.tags %}

code

{% endif %}

 

A million thanks in advance!

Are you able to apply this coding to SMS text messages for AC too?
And I am guessing the code works for Browse Abandonment Flows as well?

 

Please advise.

 

Brynn

Userlevel 7
Badge +60

Hey @bill_wishgarden 

So glad to hear it worked for you!

Hey great Community, 
 

I have the same issue with excluding our “Shipping Insurance” from Klaviyo abandoned cart emails. I changed the codes provided in this conversation before: 

 

{% if not 'ac_exclude' in item.product.tags %}
<h3><!--StartFragment--></h3>
<h3><a href="{{ organization.url }}products/{{ item.product.handle }}">{{ item.product.title }}</a></h3>
<h3><!--EndFragment--></h3>
<p>Anzahl : {{ item.quantity|floatformat:0 }} &mdash; Total: {% currency_format item.line_price|striptags|floatformat:2 %}</p>
{% endif %}

 

and changed the image to the provided dynamic variables: 

 

{% if not 'ac_exclude' in item.product.tags %}{% if item.product.variant.images.0.src %}{{item.product.variant.images.0.src}}{%else%}{{item.product.images.0.src|missing_product_image}}{%endif%}{%endif%}


It worked fine that the product is not included anymore but all orders what had included the “Insurance” have now the product name with this small sample image on the left bottom under the normal images. I have absolutely no idea how to remove that? Can anybody help me out? Thanks so much!!

 

 

Reply