Re: How to hide specific products from automated abandoned cart emails?

How to hide specific products from automated abandoned cart emails?

Mussty
Excursionist
39 3 15

Hi All,

 

I'd like to know if there is a way to exclude a product from the dynamic listing on the abandoned cart/checkout emails by using product tags?

 

To give you more context I use an app to add a one time service fee per order, it gets automatically added to the customers cart as a product as there is no other way to add a custom fee in shopify. 

 

If the customer abandons the cart/checkout, I want to be able to exclude this fee product from listing on the abandoned cart/checkout emails and only to show the actual products they were trying to purchase.

 

I hope that makes sense. 

 

Thanks 

Replies 5 (5)

Yeady123
Explorer
61 7 9

@Mussty you can exclude a specific product from the abandoned cart/checkout emails by using product tags in Shopify. Here's how you can do it:

  • Go to your Shopify admin and select the product that you want to exclude from the abandoned cart/checkout emails.
  • Scroll down to the Tags section and add a new tag, such as "exclude_from_abandoned_emails" (you can choose any tag name you prefer).
  • Save the changes to the product.

Now that you have added the product tag, you can create a custom abandoned cart/checkout email template that excludes any products with that tag. Here's how you can do it:

  • Go to your Shopify admin and navigate to Settings > Notifications.

  • Find the abandoned cart/checkout email template that you want to customize and click Edit.

  • Scroll down to the email template code and look for the section that displays the abandoned products.

  • Modify the code to exclude any products with the "exclude_from_abandoned_emails" tag. You can do this by adding a conditional statement that checks if the product has the tag, and if so, skips it in the product listing. For example, here's a sample code snippet that you can use:

 

{% for line in line_items %}
  {% if line.product.tags contains 'exclude_from_abandoned_emails' %}
    {% continue %}
  {% endif %}

  <!-- display the product here -->
  {{ line.product.title }}
  {{ line.price | money }}
{% endfor %}
Save the changes to the email template.

 

  • With these changes, the abandoned cart/checkout emails will exclude any products that have the "exclude_from_abandoned_emails" tag, including the service fee product that you mentioned.

- Was my reply helpful? Click "Like" to let me know!
- ----Was your question answered? Mark it as an Accepted Solution
You can get in touch with me via WhatsApp on +88013-13075440
Email: shahinkhan2424ft@gmail.com
Mussty
Excursionist
39 3 15

Hi @Yeady123, thank you for the suggestion.

 

When I go to edit the email template, I don't see anywhere to edit code. Please see screenshot below. 

 

Mussty_0-1676478390696.png

 

Yeady123
Explorer
61 7 9
  • Go to your Shopify admin and navigate to Products > Collections.
  • Click the Create collection button to create a new collection.
  • Give the collection a name, such as "Abandoned Cart Exclusions".
  • In the Conditions section, set the conditions so that the collection only includes the products you want to exclude from the abandoned cart/checkout emails. In your case, you would set the condition to "Product tag is not equal to exclude_from_abandoned_emails".
  • Save the changes to the collection.
- Was my reply helpful? Click "Like" to let me know!
- ----Was your question answered? Mark it as an Accepted Solution
You can get in touch with me via WhatsApp on +88013-13075440
Email: shahinkhan2424ft@gmail.com
Mussty
Excursionist
39 3 15

Hi @Yeady123, apologies I don't follow with regards to the collections suggestion? 

 

I am not able to edit code for the automation emails it seems. 😞

Mussty
Excursionist
39 3 15

Hi @FeedHub, thank you for taking time to help me with this. 

 

Unfortunately I don't see the options you mention on the product page. Please see screenshot below: 

Mussty_0-1676552013259.png

 

I have already hidden the service fee product from my All collection, I have also hidden this from search engines and internal search by adding the metafield feature seo.hidden set to true. I'm not entirely sure how this is linked to hiding it from abandoned emails?

 

It seems none of the Shopify Email App templates are editable with code. This is so lame on Shopify's part.