Hi!
When you go to my website which is https://artbyjj.art you can only pick different product variants if you use the quick add option. And this problem is only on desktop and I’ve got no idea what is causing this. I think I recognized it after running paid SEO for my website but could’ve been earlier also. I’ve tried many different fixes, like importing the whole product again (from printify) to my website. I’ve also checked that the different product variations and swatches are okay. When I access my website on my mobile phone I can choose different product colors and sizes without any problem but on desktop I just can’t choose any when clicking the variations. Now also if I add it does sometimes work when you reload the page and wait for 5 seconds, so it’s very strange for me if it’s a bug or something because I don’t really know about the coding side myself. If someone can help and find the issue that would be gladly appreciated! Thank you!
Best Regards,
Jesse Hakala / ArtbyJJ
Hey @ArtbyJJ ,
I dug deep into your website issue and found these two errors in your console that are likely causing the problem with product variants on desktop:
-
Uncaught TypeError: Cannot read properties of null (reading ‘querySelector’) at product-form.js:129:26
-
Uncaught TypeError: productForm?.toggleSubmitButton is not a function at product-info.js:84:22
These errors suggest your product form JavaScript is trying to:
- Access an element that doesn’t exist in the DOM (resulting in null)
- Call a function that doesn’t exist on the productForm object
The fact that it works on mobile but not desktop points to either:
- Different JavaScript loading between devices
- Responsive design differences affecting element structure
- Timing issues where code executes before elements are fully loaded
To fix this, you’ll need to:
-
Check your theme’s product-form.js (line 129) and product-info.js (line 84) files.
-
Add proper null checks before accessing properties:
const element = document.querySelector('selector');
if (element) {
// then access properties
}
- Verify the function exists before calling it:
if (productForm && typeof productForm.toggleSubmitButton === 'function') {
productForm.toggleSubmitButton();
}
-
Look at code execution timing - the fact that “reload and wait 5 seconds” sometimes works suggests a race condition where elements aren’t ready when the code runs.
-
Check for conflicts between your quick add functionality and the main product page code.
You can get this fixed by your developer, or if you’d like us to take a deeper look at your specific implementation, just DM or email your collaboration code and we can give it a shot!
Cheers!
Shubham | Untechnickle