Dynamic collapsable row


I need the final collapsable row to be different for the products that I included in a specific collection, named FINAL SALE%. Do you think you can help me achieve this? Thank you!

Hi @robertsolcan ,

You can use custom data to create product metafields. This will allow you to display different information under collapsible tabs for each product.

Best regards,

Hey @robertsolcan ,

To create a collapsible row that is different for products in a specific collection named “FINAL SALE%” in your Shopify store,

Follow theme steps:

  1. Online Store > Theme > Customize

  2. Open the product template where you want to apply the collapsible row changes.

Add Conditional Logic:

  1. You will need to use Liquid code to check if the product belongs to the “FINAL SALE%” collection.

  2. In the product template file (often found in Section > product-template.liquid or similar), locate the collapsible row code.

  3. Wrap the collapsible row with a conditional statement to check the product’s collection:

{% if product.collections contains 'FINAL SALE%' %}
    
        ### Drept de Retur 14 zile
        

Puteți returna produsele în termen de 14 zile...

        
    

{% else %}
    
        ### Drept de Retur 14 zile
        

Standard return policy...

        
    

{% endif %}

Customize the Content:

Modify the content inside each collapsible row to reflect what you want to display for the “FINAL SALE%” products versus regular products.

After adding and modifying the code, save your changes.

If I was able to help you, please don’t forget to Like and mark it as the Solution!

Best Regard,

Rajat Sharma

Hi @robertsolcan

You can try to create a different product template for products of that specific collection

https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates

I don’t have such a page, only product.json… What should I do?