We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Broadcast Theme Issue with drawers - HELP

Broadcast Theme Issue with drawers - HELP

TBS2023
Shopify Partner
322 1 45

I am having issues with both my cart and Mobile menu Drawers

I must have done something wrong while playing around with the code 😞

So currently on my live site I have disabled Cart drawer as its not opening when ATC button is clicked

And have used a work around code to get the menu to be visible on mobile - but ideally i would like my mobile menu to appear

 

www.thebodyshop.se >>>LIVE SITE

https://oppv4hu2zphzny1m-86803415371.shopifypreview.com >>>Preview where nothing works

Replies 4 (4)

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

You can try to add this code to theme.liquid file, before </body> and check again 

<script>
document.addEventListener('DOMContentLoaded', () => {
    const hamburger = document.querySelector('.header__mobile__hamburger');
    const menu = document.getElementById('header-menu');

    if (hamburger && menu) {
        hamburger.addEventListener('click', () => {
            menu.classList.add('is-open', 'drawer--animated');
        });
    }
});
</script>

 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

tim
Shopify Partner
4812 598 1733

Once again -- https://community.shopify.com/c/shopify-design/mobile-drawer-menu-doesn-t-open-broadcast-theme/m-p/3... 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
TBS2023
Shopify Partner
322 1 45

i am not sure how to change the HTML structure

the solutions are only opening up a menu but not the Mobile Menu designed on the store front

tim
Shopify Partner
4812 598 1733

This is because theme Javascript expects this element to be present. 

If you have older versions of your theme, have a look at those -- whether the missing element is still present.

Or, you can download a fresh copy of the theme from the theme store, find the header section and compare with what you have in your theme.

Unfortunately, can't give more precise instructions because this is a paid theme and I have no access to its code.

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com