Help with Sizes other then small not being added to cart

Boliye
Excursionist
39 0 12

Hey There! Facing problem with the option to add sizes other then small to the cart. Like on default I can add the small size to the cart but when I select either medium or large they can't be added to cart. And when I revert back to select small again, I can't even add that to cart. Attaching images below to clear out what I am saying

 

Store Link: https://8eb6a2-25.myshopify.com/

 

 

 

Product Link: https://7kdxgkj1q2aom77h-86989799727.shopifypreview.com/products/denim?_pos=1&_psq=denim&_ss=e&_v=1....

 

 

 

Password: door

 

 

Small size.png

 

and when I select medium

 

medium.png

 

and when I go back to choose small size its greyed out as well.........

 

small2.png

Replies 4 (4)

AnneLuo
Shopify Partner
210 44 50

 

That's because after switching the size button, your code reported an error, which resulted in the subsequent code not being executed.

 

AnneLuo_1-1710418666946.png

 

AnneLuo_0-1710418648673.png

 

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me on luomingxia@shinetechsoftware.com.
Boliye
Excursionist
39 0 12

Greetings Anne! Thank you for finding the error. I saw your reply but can't find how you fixed it. Please if you could tell me what to do or what to edit to solve this problem? Thanks a lot!

AnneLuo
Shopify Partner
210 44 50

 

The inventoryVisibility dom was not found in the above code. You need to know why this dom does not exist. If you need to avoid this error, you can add a non null check. Just like:

if (inventoryVisibility) {
     inventoryVisibility.classList.remove('visibility-hidden');
}
If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me on luomingxia@shinetechsoftware.com.
Boliye
Excursionist
39 0 12

Hey there Anne! I did what you told me, please see screenshot below. But the problem is that now no sizes are being added to the cart and just loading

 

Error.png