Adding Collapsible row and Table blocks

Adding Collapsible row and Table blocks

makaca
Shopify Partner
2 0 0

Hello everyone, Good day to all the community. My question is:

I'm using "ecomus theme". I just want to improve product page designing by adding collapsible row and table to product attributes but it says "no blocks found" in theme. 

I also saw online solutions but main-product.liquid code is also different from the one as shown in solution online. 

 

When I'm adding "Collapsible Row" and "Table to Collapsible Row". Theme say no block exist. Please if you've any suggestion, let me know. Thanks.

Please see pictures for your reference.

1.png2.png3.png4.png

 

Replies 3 (3)

ProtoMan44
Shopify Partner
610 54 92

@makacaHey, thanks for posting here.
 can you please share the link to inspect it, thanks.

It is a idea I hope it will help you to add a collapsible section, but think you need to show you content f table with product metafileds :

{% schema %}
{
  "name": "Collapsible Blocks",
  "settings": [],
  "blocks": [
    {
      "type": "collapsible_block",
      "name": "Collapsible Block",
      "settings": [
        {
          "type": "text",
          "id": "title",
          "label": "Title",
          "default": "Block Title"
        },
        {
          "type": "richtext",
          "id": "content",
          "label": "Content",
          "default": "<p>Block content goes here.</p>"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Default",
      "category": "Custom"
    }
  ]
}
{% endschema %}

<div class="collapsible-blocks">
  {% for block in section.blocks %}
    <details>
      <summary>{{ block.settings.title }}</summary>
      <div class="content">
        {{ block.settings.content }}
      </div>
    </details>
  {% endfor %}
</div>

<style>
  /* Style for collapsible blocks */
  .collapsible-blocks details {
    margin-top: 20px;
  }

  .collapsible-blocks summary {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
    font-weight: bold;
  }

  .collapsible-blocks .content {
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fafafa;
  }
</style>




- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
makaca
Shopify Partner
2 0 0

Dear @PRo, If you could have any suggestion we can add custom section/blocks to theme. Bcz the one(theme) we're using doesn't have collapsible row and table at all. It would be great if you could share any resources about it. Thanks.

 

From this simple:

https://acaciagardencenter.com/products/ceramic-pot-yz027

To this below the cart button collapsible row

https://plntd.ae/collections/pet-friendly-plants/products/prayer-plant-maranta

and this having description collapsible table

https://plntd.ae/collections/pots-planters/products/runic-planter-pot

 

ProtoMan44
Shopify Partner
610 54 92

@makaca i have shared the above the code is a section code that helps you to add collapsible content, come to IB.

if you are talking about the product block, so I need to understand your theme structure for the product page.

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!