Skip to main content
Solved

Exclude products in the review email flow


Forum|alt.badge.img+1
  • Contributor I
  • 1 reply

We have a product “Signature On Delivery” that is not a product in our Bigcommerce catalog. It gets added during checkout via the API. Is there a way to exclude products in the review email flow with specific name? eg. 

Something like this:

{% if not 'Signature on Delivery' in item.product.name %}
<div style="text-align:left;"><h3>{{ item.product.name }}</h3>
    <p><a href="{{ organization.url|trim_slash }}{{ item.product.url }}#product-reviews">Review this item</a></p></div>
{% endif %}

 

Best answer by retention

Hi @nhd, welcome to the community!

I think your condition should work so long as your data variables correctly returns a String value and matches perfectly (spaces included).  You may want to use something that might be more precise like a SKU or Product ID instead.

Also, make sure the event data is properly assigned to the alias “item” in your Table.  I’m not super familiar with the event data coming from BigCommerce, but verify that by testing your example.

Here’s a response I wrote for something similar that you can borrow the code snippets from a similar use case:

Let us know how it works out!

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

2 replies

retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 949 replies
  • Answer
  • March 20, 2023

Hi @nhd, welcome to the community!

I think your condition should work so long as your data variables correctly returns a String value and matches perfectly (spaces included).  You may want to use something that might be more precise like a SKU or Product ID instead.

Also, make sure the event data is properly assigned to the alias “item” in your Table.  I’m not super familiar with the event data coming from BigCommerce, but verify that by testing your example.

Here’s a response I wrote for something similar that you can borrow the code snippets from a similar use case:

Let us know how it works out!


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 1 reply
  • March 21, 2023

Thanks for your suggestion @retention. It actually works perfectly. I just did not save my changes thats why it was not working. I did not do the image because that “product” does not have an image but it may be achieved by converting the image block to normal text and apply the same logic above. 

{% if not 'Signature on Delivery' in item.product.name %}
<img src="{{ item.product.images.0.src }}" /> 
{% endif %}

Thank you,