How can I limit a card product description in code?

Hello,

How can i limit card product description ?? {{ card_product.description }}
I tried to use this code {{ card_product.description | truncate:30 }} but this isn’t working Please help!

1 Like

What’s your store url ?

I can share the code

{% for block in section.blocks %}

{% assign product = all_products[block.settings.produit] %}

{{ product.title }}

{{ product.description }}

{% if product.variants.size > 1 %} {% else %} {% endif %}
{% endfor %}