Javascript error shopify product page

I am facing a very odd and frustrating issues in my product page that has something to do with Javascript errors mostly "cannot read properties of undefined ( classlist ) "

Its been more than a month and I have been running errands can’t really understand what is actually happening, so the thing is that customers who come to my product page and click “add to cart” then they are not lead to the /checkoout page instead the product page reloads and customer stays stuck in one product page long story short the add to cart button is not properly functioning for the customer they click and the product page just reloads but the button should lead them to the /checkout page as I have setup the button this way but no luck.

Secondly is that to better understand what is going on I installed microsoft clarity so it records customer sessions so I can see what is going on there I saw this button problem as explained above but something even more, during the session recording I saw clarity told me that there were several around 50 - 60 javascript errors in repeating pattern and that error was mostly 98% of the time "cannot read properties of undefined ( classlist ) " and then clarity also told me that this error might have impacted page functionality like buttons not working etc and also variant selection problem.

I am not sure how to fix this, the theme I am using is the basic free theme “Trade” so such errors should not come. What makes this super problametic is that when I do this no such error occurs button is working properly everything is working smooth the variants,buttons, pills the whole page is 100% working fine along with the entire website but only my customer who come from my native advertising platform where i run ads face this problem.

So only my customer face this problem, not me not anyone else everyone can place order in my store 100% working website but only only my customers who come from my ad compaign face this issue, maybe it has to do something with the pixel from the advertising platform? not sure

Please can someone assist me with this error I believe a Javascript and website development expert can fix this issue, I have so far burnt 600$ in ads with 0 conversions this bug is blocking all my conversions

1 Like

Hi friend I recently faced this But I just have to firstly remove all the apps In installed that are not really essentials for me and then I changed the theme I was using the trade as well before but I switched to dawn and it is working perfectly by default You can try this

And In addition take time to make proper research and keep track on what works before investing in ads most of we shopify store owners do make this mistake and it cost alot

You absolutely need to share a link to your store.

Trade (together with other themes from the Dawn family) is used by thousands of stores and most of them work fine, so this must be specific to your setup.

People who can diagnose your problem without seeing it first-hand belong to fantasy books, not this forum :slight_smile:

Have you tried to follow your own ads to see if pixel breaks it for you?
Can you tell how others can try to replicate – what ad do needs to be followed?

Did clarity reported user agent of these sessions – were these standalone browsers or built-in browsers of the social net app?
These built-in ones can have their own quirks; but again, usually Trade works fine with those too.

Again – share a link!

Hi @Oaks9326

Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

Best regards,
Devcoder :laptop:

Just checked and I can add to cart. Taboola acting up again?

But this is something fascinating. Come on dude… seriously? You misspelled your own name??? wtf

You should get rid of the fake Trustpilot badge (I know it’s from Gem Pages builder app), and the “125,632+ Satisfied Customers” crap. It’s fake. We all know it’s fake. Makes you look fake too.

Oh and having that ®️ is illegal. You certainly never registered any trademarks and this will get your store shut down in a heartbeat.

If these are the error you suspect, then these are for Announcement bar animation and these are not related to your cart/checkout not working.

This happens because you have entire header with display:none; – in this case you may as well hide the announcement bar section (by clicking an eye icon in Customizer), this will stop these errors.
(Your visible “announcement bar” is from Gem Pages)

@Oaks9326

Hi, How are going, the issue has solved yet?

If you still facing the issue, you can share the url your store here, I will help you to check.

Hello, friend. I checked your issues. I think I need to check your site on myend. Can you share your site and password(if its dev theme).

About js issue, it needs to check on the code and then fix. When you share the site, I can find where it’s showing.

Thank you