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.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #136733

    coveti
    Participant

    When 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?

    #136736

    coveti
    Participant

    Adding a screenshot of the error

    Attachments:
    You must be logged in to view attached files.
    #136738

    Artem Temos
    Keymaster

    Hello,

    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

    #136890

    coveti
    Participant

    Ok, 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?
    Thanks

    #136988

    Artem Temos
    Keymaster

    Please, disable all external plugins first. Also, update our theme to the latest version and remove all the code from the custom JS section.

    #137007

    coveti
    Participant

    Did 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.

    #137023

    Artem Temos
    Keymaster

    We 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.

    #137131

    coveti
    Participant

    Our 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.

    #137134

    Artem Temos
    Keymaster

    Try to disable redirect to the shopping cart option in WooCommerce settings.

    #137624

    coveti
    Participant

    Which 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.

    #137627

    Artem Temos
    Keymaster

    We mean redirect to the shopping cart after adding to cart option in WooCommerce. You can find this option in WooCommerce settings.

Tagged: , ,

Viewing 11 posts - 1 through 11 (of 11 total)