Product description closed by default?

Solved

Product description closed by default?

UK_Aspire_Vendo
Pathfinder
128 8 26

Hey all, I hope everyone is well. 

 

We're running a theme called warehouse by Maestroo, and by default when viewed on mobile the product description tab is open. I'd like it to be closed if possible. 

 

Can anyone assist here with some code please?

 

Here's a direct link to a product. 

Accepted Solutions (2)

PageFly-Amelia
Shopify Partner
626 165 238

This is an accepted solution.

Hi @UK_Aspire_Vendo 

This is Amelia at PageFly - Shopify Advanced Page Builder app.

 

You can try the following steps I have provided to help you solve the problem you are facing:

Step 1: Online Store -> Themes -> Edit Code

Step 2: Choose file theme.liquid

Step 3: Add code above the tag </head>

<script>
window.addEventListener("DOMContentLoaded", () => {
  document.querySelector('.product-tabs__content button.collapsible-toggle').click();
});
</script>

 

Hoping my solution helps you solve your problem.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

Hi @UK_Aspire_Vendo 

 

 

Step 1: Go to Admin -> Online store -> Theme > Edit code

Step 2: Search for the file global.js or base.js and add this code snippet to the end of the file

 

(() => {
if (window.innerWidth < 900) {
    const interval = setInterval(() => {
    const collapsibleToggle = document.querySelector(".collapsible-toggle");

    if (collapsibleToggle) {
        const clickEvent = new Event('click', {
            bubbles: true,
            cancelable: true
        });

        collapsibleToggle.dispatchEvent(clickEvent);
        clearInterval(interval);
    }
}, 100);

setTimeout(() => {
    clearInterval(interval);
}, 10000);
}
})()

 

 If it's helpful, please like and mark it as a solution, thank you
Have a nice day

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 3 (3)

PageFly-Amelia
Shopify Partner
626 165 238

This is an accepted solution.

Hi @UK_Aspire_Vendo 

This is Amelia at PageFly - Shopify Advanced Page Builder app.

 

You can try the following steps I have provided to help you solve the problem you are facing:

Step 1: Online Store -> Themes -> Edit Code

Step 2: Choose file theme.liquid

Step 3: Add code above the tag </head>

<script>
window.addEventListener("DOMContentLoaded", () => {
  document.querySelector('.product-tabs__content button.collapsible-toggle').click();
});
</script>

 

Hoping my solution helps you solve your problem.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

UK_Aspire_Vendo
Pathfinder
128 8 26

Hi Amelia! 

This worked perfectly - thank you so much!

BSSCommerce-B2B
Shopify Partner
1972 564 568

This is an accepted solution.

Hi @UK_Aspire_Vendo 

 

 

Step 1: Go to Admin -> Online store -> Theme > Edit code

Step 2: Search for the file global.js or base.js and add this code snippet to the end of the file

 

(() => {
if (window.innerWidth < 900) {
    const interval = setInterval(() => {
    const collapsibleToggle = document.querySelector(".collapsible-toggle");

    if (collapsibleToggle) {
        const clickEvent = new Event('click', {
            bubbles: true,
            cancelable: true
        });

        collapsibleToggle.dispatchEvent(clickEvent);
        clearInterval(interval);
    }
}, 100);

setTimeout(() => {
    clearInterval(interval);
}, 10000);
}
})()

 

 If it's helpful, please like and mark it as a solution, thank you
Have a nice day

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now