Skip to main content

Hello everyone,

I am trying to hide the shipping insurance ROUTE from the order items section.

I tried this tutorial unsuccesfully:

https://help.route.com/hc/en-us/articles/360026062854-How-do-I-exclude-Route-from-Klaviyo-

using this code in the table for the first column:

{% if item.product.title != 'Route Package Protection' %}{% if item.product.variant.images.0.src %}<img src="{{ item.product.variant.images.0.src }}" style="width: 200px;" width="200" />{% else %}<img src="{{ item.product.images.0.src|missing_product_image }}" style="width: 200px;" width="200" />{% endif %} {% endif %}

and this one for the second column:

{% if item.product.title != 'Route Package Protection' %}<h3><a href="{{ organization.url }}products/{{ item.product.handle }}">{{ item.product.title }}</a></h3>

<p>Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|floatformat:2 %}</p>

{% endif %}

 

Please let me know how I can fix.

Thank you in advance!

Hi @salamiadil ! That code is correct; do you have the correct repeat rule set for the block? It should look like this: 
 

 

If that’s correct, can you share some more detail about what happens when you preview? 


Hi Elise,

It seems nothing gets pulled when I preview. I have attached some picture to show you what I see on screen:

 

Thanks


Is there anything I omitted?

I know I inserted these codes in “source” on the Tinymce.


Hello everyone,

first thanks for helping.

I just wanted to share with you the answer from the Klaviyo team. I hope it can help someone in the future looking for the same treatment:

It looks like we just needed to switch the block back to Dynamic since we do not want to iterate over the cart total, etc. Then we needed to update the item product name tag as well as the Route Shipping Insurance name as it needs to exactly match what gets passed in.

We can use the following conditions in each column instead:

{% if item.product.name != "Route Shipping Insurance" %}{% if item.product.variant.images.0.src %}<img src="{{ item.product.variant.images.0.src }}" style="width: 200px;" width="200" />{% else %}<img src="{{ item.product.images.0.src|missing_product_image }}" style="width: 200px;" width="200" />{% endif %} {% endif %}

 

{% if item.product.name != "Route Shipping Insurance" %}<h3><a href="{{ organization.url }}products/{{ item.product.url }}">{{ item.product.name }}</a></h3><p>Quantity: {{ item.quantity|floatformat:0 }} — Total: {% currency_format item.line_price|floatformat:2 %}</p>{% endif %}

Hi @salamiadil
Thanks so much for coming back to the Community forum and sharing your learnings with others! We really value the opportunity to learn from other Klaviyo customers. One thing I just wanted to call out here is that I made some edits to your original post and blurred out the addresses and names of your customers in the screenshots. Since the Community forum is a public forum that is accessible by anyone, I wanted to make sure we addressed any private information. Just wanted to keep you updated on those changes! 

 

Thanks so much for being a member of the Community! 
-Cass. 


Reply