Browser: Chrome 110
I want to show an element in archive shop, if the product color attribute is bigger than zero!
So i apply this condition to an element {post_terms_pa_color:value} bigger than zero. but its not working

Browser: Chrome 110
I want to show an element in archive shop, if the product color attribute is bigger than zero!
So i apply this condition to an element {post_terms_pa_color:value} bigger than zero. but its not working

Hey Mehdi,
thanks for your report.
I understand you want to show the element when there is at least one color attached to the product? If so please use the following comparison instead:
Best,
André
Thank you for your time and response
Yes i want to show an element when at least one attribute attached to that product.
I applied The condition you suggested, but it hide the element even though i have few color attributes in my category (archive).
What i actually want to achieve is that: In each product category archive, if there is no products with specific attribute so hide an element.
Hey Mehdi,
if I understand your scenario correctly you could create a custom function which loops through all products within the current category and see if at least one of them has a color attributed attached to it. If so the function returns true, otherwise it returns false. You can then use this function in your condition: {echo:your_custom_function}.
Alternatively you could create your own condition for this using the conditions API.
This is not a bug though. ![]()
Best,
André
Can you help me with that?
If there is no indexed attribute in that archive, hide the filter element.
So how can i achieve to the number of indexed attribute to use it in my custom condition
.