Shopify themes, liquid, logos, and UX
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
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
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.
Once again -- https://community.shopify.com/c/shopify-design/mobile-drawer-menu-doesn-t-open-broadcast-theme/m-p/3...
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
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.