Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MBE 191 posts 752 karma points
    Mar 28, 2019 @ 11:41
    MBE
    0

    ajaxSubmit is not a function at TCService.TCService.postForm

    Hi guys,

    Have any of you encountered a problem when adding something to the basket? The product is being added to the basket but the amount isn't.

    I do however get this console error:

    ajaxSubmit is not a function at TCService.TCService.postForm

    My JS order in my bundle.js is:

    • "scripts/jquery3.1.1.js",
    • "scripts/jquery_form",
    • "scripts/bootstrap.js",
    • "scripts/jquery_validation.js",
    • "scripts/tea-commerce.min.js",
    • "scripts/product.js",
    • "scripts/validation.js",
    • "scripts/cart.js",
    • "scripts/teaCommerceEvents.js",
    • "scripts/slimmage.js",
    • "scripts/magnificPopup.js",
    • "scripts/productPage.js",
    • "scripts/picturefill.min.js",
    • "scripts/lazysizes.min.js",
    • "scripts/main.js"

    The problem can be seen here, I have unminified the JS file: https://roldskovcykelshop.dk/olie-pleje-energi/energi/energy-gel-citrus-te-40-g/

    It seems to be a problem with line: 568 enter image description here Image URL: `

    https://our.umbraco.com/media/upload/40e35141-c212-480f-9a75-b55cbcca458e/2019-03-28_12h56_08.png
    

    `

    I can't seem to figure out what the problem could be

  • Matt Brailsford 2189 posts 10695 karma points MVP 6x c-trib
    Mar 28, 2019 @ 13:36
    Matt Brailsford
    0

    Are you missing a .js extension on the scripts/jquery_form include? If so, this would explain it as it appears the ajaxSubmit method isn't present, which is part of jquery forms.

  • MBE 191 posts 752 karma points
    Mar 28, 2019 @ 21:36
    MBE
    0

    Hi Matt,

    I totally missed that part! Pretty amazing how blind you can sometimes get.

    But unfortunately it doesn't solve the initial problem which was adding products to the basket.

    Upon adding 5 items the basket gets updated if you refresh the page, but going to the basket itself reveals the product with 0 quantity.

    Is it a problem you have seen before? If not, I'll look into all the javascript I have included to see if, for whatever reason, something should have messed it up.

    // Mike

  • Matt Brailsford 2189 posts 10695 karma points MVP 6x c-trib
    Mar 29, 2019 @ 09:09
    Matt Brailsford
    0

    Hi MBE,

    When you say it doesn't solve the initial problem, are you saying you are still getting the JS error?

    I've not seen this myself, but it's hard to diagnose without seeing your markup for adding the items to the basket and the associated javascript. Ultimately it should work so I'm guessing it's an implementation issue somewhere.

Please Sign in or register to post replies

Write your reply to:

Draft