Hi, hoping someone can help me with this. I’m using the Dawn theme on a store I’m building for a client, but having some trouble with collapsible tabs on the product pages.
Each product has a set of FAQs, but they differ in number. I need to be able to add up to 10 collapsible tabs, but some of the products will only have data in, say, three of them. Is it possible to hide the tabs that are empty? They’re currently showing as empty lines, like this:
Hi, I tried using this solution, but it didn’t work.
Using the Dawn theme and did exactly as written. As you can see below I added the code to the correct places, saved it but nothing is happening. What am I doing wrong?
Hi, I’m also having difficulty getting this to work. It seems to work for the collapsible content section but not the collapsible rows within the product information section. Does anyone know how this can be done?
After trying to get this to work for a good 30 minutes I realised the solution wasn’t solving the Collapsible row block on the product page (under the description) but rather the Collapsible content section which is a separate feature. To get this to work for the Collapsible rows you need to edit main-product.liquid and put the condition inside ‘collapsible_tab’ case like so:
Thank you for posting your solution, Baldur! This is exactly what I needed. I’m so close to being able to launch my store now that issue has been resolved.
This helped me! In my case I had prefilled headings and I wanted to hide blank rows, so I ended up using only the block.settings.row_content one and it’s working great. Thank you!
FYI to others - this solution works when you use Collapsible Rows in a different “Collapsible Rows Section.” If you’re trying to hide rows in the product information section, you should try the other solutions that modify the main-product.liquid section. I started off with one and then ran out of blocks and so have moved to the other. So I’m actually using both solutions and they seem to be working well.