Re: Is it possible to have a description auto closed when seeing the product

Is it possible to have a description auto closed when seeing the product

Hartnum
Excursionist
16 0 4

Hello, 

 

I have a website where i have products with a big description and i am wondering if i can have them auto closed so only if the costumers want to read it they can open it, because right now they are auto open everytime.

 

TOYO theme 

 

"https://fusionwave.dk/products/friskmixer%E2%84%A2" my one product 

Thank you!

Replies 6 (6)

Liquid_xPert_SJ
Shopify Partner
1316 140 199

@Hartnum 

Hi yes this can be done with some custom code also there will be an option in the theme to auto close by default.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Hartnum
Excursionist
16 0 4

either im blind or there isnt a button there... 

if possible could u send a screenshot?

Liquid_xPert_SJ
Shopify Partner
1316 140 199

Open theme.liquud file from the theme files find a phrase that say </body> in that file and paste the code very above of this phrase like 

 

 

//your code

 

</body>

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Liquid_xPert_SJ
Shopify Partner
1316 140 199

@Hartnum 

 

<script>
window.addEventListener('load', function() {
document.querySelector('.product .product__accordion.accordion details').removeAttribute("open");
});
</script>

 

</body>

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.

WebDeskSolution
Shopify Partner
191 42 51

Hello @Hartnum 

 

Please follow the steps below after logging into the Shopify admin:

 

  • Go to your Shopify Admin panel.
  • Click on Online Store > Themes.
  • Find the theme you want to edit and click Actions > Edit code.
  • Search theme.liquid
  • Please add the following script code before the closing of the body tag (</body>) .

 

 

<script>
window.addEventListener('load', function() {
document.querySelector('.product .product__accordion.accordion     details').removeAttribute("open");
});
</script>

 

 

Please hit Like and Mark it as a Solution if you find our reply helpful.

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Shopify Partner | Shopify Development Agency | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9

Hartnum
Excursionist
16 0 4

i dont understand the last bit u wrote? before the closing of the  (</body>) tag? 

if possible can u send a screenshot