Home › Forums › WoodMart support forum › Javascript error indexOf on "Add to cart" button on woodmart.
Javascript error indexOf on "Add to cart" button on woodmart.
- This topic has 10 replies, 2 voices, and was last updated 5 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
August 8, 2019 at 6:23 am #136733
covetiParticipantWhen visitors are in our homepage and they use the “quick view” of a product.
We are getting javascript error whenever they click add to cart.Cannot read property ‘indexOf’ of undefined on theme.min.js
As this is a minified script we can’t investigate further about the problem.
Is there a not minified js version available that we can check out?August 8, 2019 at 6:24 am #136736
covetiParticipantAdding a screenshot of the error
Attachments:
You must be logged in to view attached files.August 8, 2019 at 6:25 am #136738
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
August 8, 2019 at 3:04 pm #136890
covetiParticipantOk, just sent login again.
Also kindly note we have an existing ticket before with related issue.
The next button to it (AddToCart) in the quickview popup.Maybe you can fix it too while you’re at it?
ThanksAugust 9, 2019 at 6:05 am #136988
Artem TemosKeymasterPlease, disable all external plugins first. Also, update our theme to the latest version and remove all the code from the custom JS section.
August 9, 2019 at 6:59 am #137007
covetiParticipantDid you guys login to check the staging?
Did you do anything in our production server yesterday?
We had downtime yesterday (webhost said its theme related) so we just wanted to ask if it was you guys. If it was you, please work on staging only.Why do you guys keep asking to remove plugins first.
The plugins in there are almost basic to what the business needs to functions.
I think we can not disable anymore.
It shouldnt actually affect the woodmart as they have different functions.If you are blaming particular plugin, please enumerate which plugins conflicts your theme.
August 9, 2019 at 8:28 am #137023
Artem TemosKeymasterWe didn’t perform any changes and work on the link you sent in the latest message. Such issue is caused by some extra JS code so please, disable plugins and remove your custom code first so we can check.
August 9, 2019 at 12:09 pm #137131
covetiParticipantOur site went down due to different issue and not this post of add-to-cart but webhost shows its theme code.
It’s not js code if its a PHP error that took the site down.The JS code in our custom are just tracking scripts.
Which custom code are you talking about removing?We also updated to latest version 4.0.2 and its now different and not same with our production.
August 9, 2019 at 12:19 pm #137134
Artem TemosKeymasterTry to disable redirect to the shopping cart option in WooCommerce settings.
August 12, 2019 at 9:51 am #137624
covetiParticipantWhich redirect should we disable. I think that might be a fix.
The code in functions.js about
$(document.body).trigger('adding_to_cart', [$thisbutton, data]);
is wp ajax is returning HTML of cart,
but the code beneath it expecting a json response.August 12, 2019 at 1:18 pm #137627
Artem TemosKeymasterWe mean redirect to the shopping cart after adding to cart option in WooCommerce. You can find this option in WooCommerce settings.
-
AuthorPosts
Tagged: cart, javascript, php
- You must be logged in to create new topics. Login / Register