Skip to main content

HI! I am trying to exclude a specific product from a repeated content block (the administration fees)). I am using event data for the logic. I have entered the following logic:

event.ProductnamenList.title != 'Administratiekosten (eenmalig)'

 

The event is called ‘ProductnamenList’
The product variable is called ‘title’
The specific product is ‘Administratiekosten (eenmalig)’

 

However, the product ‘Administratiekosten (eenmalig)’ is still showing up in the order overview. What am I doing wrong?

Hi @PennyTinyLibrary,

Welcome to the Community.

You can hide items from the Dynamic Table Block using conditional statements in each column.

You can base this on product titles, SKUs, prices, etc. An example would be:
{% if item.product.title != "Exact Product Title" %} Display this content. {% endif %}
If you are unsure about using conditionals, I would recommend chatting with a developer to help you build those statements!

 

Hope this helped,

Alex


Thank you, it works!


Is this also possible for dynamic images in Dynamic Table Blocks?


Hi @PennyTinyLibrary,

For your images or dynamic tables, I would take a look at this article and use the show/hide feature to display specific blocks only. 

 

Thanks!

Alex


Hi @PennyTinyLibrary,

Welcome to the Community.

You can hide items from the Dynamic Table Block using conditional statements in each column.

You can base this on product titles, SKUs, prices, etc. An example would be:
{% if item.product.title != "Exact Product Title" %} Display this content. {% endif %}
If you are unsure about using conditionals, I would recommend chatting with a developer to help you build those statements!

 

Hope this helped,

Alex

Hi @alex.hong I used this solution to tackle a similar problem and it kinda worked too. 

But now, as you can see in the image above, I am getting all of this white space from the content that is hidden. So is there no way to remove this?

{% if event.line_price != 0 %} {{ event.name|default:'' }} {% endif %}

This is the code that I am using. 


Hi there @rohan12334

 

I answered your question in another thread you created below! 

 

Thanks for sharing your question with us,

-Taylor 


Reply