I followed a tutorial to help show my stock on the product pages. The tutorial uses the same theme that I have, Debut, it's from 2021 and was very easy to follow, but the inventory still does not change when I select the different variants. I have redone this about 6 times.
Here was the tutorial: https://www.youtube.com/watch?v=7aeYyBasHak
Here are screen shots of where I added the code they provided. Any idea what I did wrong?
Solved! Go to the solution
This is an accepted solution.
If your theme is recent recent, then this code would not work, because the latest version of Debut does not include jQuery library, which is necessary for code like yours $('#product-inventory') to work.
You may confirm this by looking in your Developer tools console. If you see "$ is not defined" in red -- this is the reason.
Share a (preview) link to your shop for better diagnostics.
Thanks for your reply. This would make sense, since I only started the account a couple of weeks ago. I managed to get in touch with the Shopify design team and used part of my complimentary design time to get them to help with this. They added a check box in my theme customization that does the function, so I don't have to mess with my code anymore. I'm going to mention your answer in the video comments though, in case any other debut users have the same problem!