I want my product description on each of my product pages appear into a collapsible row. For each description, make it collapsable or accordion.
But on the SENSE Template, there are no customizable settings to do that. I can add separate collapsible rows but not for each product description, and I don’t want to use meta fields because it will be the same work, in 400 times. And I don’t want to create a new template page for every single item in my inventory, more than 400 products…
I’m looking for a code that can help me with the collapsable description for each of my products all in once.
/* Custom CSS Collapsible row*/
/* Style the button that is used to open and close the collapsible content */
.product__description .collapsible {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.product__description .active,.product__description .collapsible:hover {
background-color: #ccc;
}
/* Style the collapsible content. Note: hidden by default */
.product__description .content {
padding: 0 18px;
display: none;
overflow: hidden;
background-color: #f1f1f1;
}
/* Custom CSS END*/
My customers don’t see the description in my website because is not opened the accordion of the product description.
Can you help me to put the accordion description opened by default?
I added by myself the “read more…” in order to not open all the long descriptions, but I don’t know how to have the accordion description opened since the beginning, hope you can help me!
If you are using a free shopify template such as Dawn, this is a more convenient convenience that does not require you to modify the code in the template. Only need to operate in the middle of template editing:
Go to Online Store → Theme → Customize → Product → Product information → Add block → Custom liquid.
Then you can add the same code in custom liquid block:
Does anyone know what the code in the Impact theme should look like?
The main-product.liquid file does not contain code: “when ‘description’ -” as described by @GemPages . thank you very much!
I want to do this but with custom product page templates that I am creating for products, I will be applying the templates to.
Is there a way to do this? It does not give me the option to choose the description for the collapsible row and I am unsure how to go about making this happen as you have to select a “page” for the content of the collapsible row.
We would like the descriptions also to be a collapsable drop down. To make it easier to read for our customers and make it more neat. Please advise how we can achieve this?