Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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
website address is: happytappyshop.com
Thank you!
Hello @happytappy ,
Do you have any product which is available for purchase which I can add to cart and check the issue ?
Regards
Guleria
All products should be available, thank you.
Yes that should be but in your store all products are sold out.
Can you provide a link of any one product which is available at the moment ?
Both of variants of this product is sold out.
I’m not really sure what suggest now as it’s all showing as in stock for me
Kindly make the product in stock so that we can provide you solution code.
Hi, I believe I may have fixed the issue now
Not sure its related, but there is a problem in your code (at least one).
sections/header.liquid originally has this code https://github.com/Shopify/dawn/blob/main/sections/header.liquid#L297-L304 :
{% javascript %}
class StickyHeader extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.header = document.querySelector('.section-header');
Yours looks like this:
{% javascript %}
class StickyHeader extends HTMLElement {
constructor() {
super();
}
let items = document
.querySelector(".header__inline-menu")
.querySelectorAll("details");
for (const item of items) {
item.addEventListener("mouseover", () => {
item.setAttribute("open", true);
item.querySelector("ul").addEventListener("mouseleave", () => {
item.removeAttribute("open");
});
item.addEventListener("mouseleave", () => {
item.removeAttribute("open");
});
});
}
Linking code in sections/header.liquid:
<script src="{{ 'menu-dropdown.js' | asset_url }}" defer="defer"></script>
connectedCallback() {
this.header = document.querySelector('.section-header');
Which is a broken code -- open menu on hover code pasted in a wrong place.
Please, restore to original.