Copied to clipboard

Flag this post as spam?

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


  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 14:02
    Kasper Skov
    0

    Mini-cart not updating after 2.2 update

    Hi

    I just upgraded the starter-kit to version 2.2. But now the mini-cart doesn't seem to auto-update its content (orderlines and price) via ajax when adding to the basket. No script errors detected. Only a full page reload does the trick. Any ideas?

  • Anders Burla 2560 posts 8256 karma points
    Oct 21, 2013 @ 14:27
    Anders Burla
    0

    Did you see the breaking changes for TC 2.2 - it should answer your question :)
    http://documentation.teacommerce.net/revision-history/

    Kind regards
    Anders

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 14:40
    Kasper Skov
    0

    I might be missing something, but I don't see how any of them should have effect on that.

  • Anders Burla 2560 posts 8256 karma points
    Oct 21, 2013 @ 14:45
    Anders Burla
    0

    The HasCurrentOrder is used in the Minicart so that might be why it won't work. BUT if it works with normal page render - then try and see using a dev tool (FireBug) what happens when the post is done and what the error message is.

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 14:50
    Kasper Skov
    0

    Yep I'm aware of that. That would cause the macro not to render as you said. As I stated in my question, there are no script errors what so ever.

    I really hope you can help, as I have no idea where to look :)

  • Anders Burla 2560 posts 8256 karma points
    Oct 21, 2013 @ 14:52
    Anders Burla
    0

    If i should be able to help - then I properly need a link. Else it will be quite hard to debug anything :)

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 14:56
    Kasper Skov
    0

    Alright. I will need to publish it to web then. I'll let you know when its up.

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 15:16
    Kasper Skov
    0

    Hi Anders

    Try and add a product to the cart here http://firmafisken.azurewebsites.net/shop/fisk/

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 15:37
    Kasper Skov
    100

    I solved it. I remove the 'ajaxForm' class from the form tag. I guess the class took effect after the update. The page now does postback and the cart is updated.

  • Anders Burla 2560 posts 8256 karma points
    Oct 21, 2013 @ 15:38
    Anders Burla
    0

    Hmm - then post is working. But the updating of the UI fails. Maybe you have moved some of the HTML, CSS or some of that so things isnt updated in the UI. Try and debug your e-commerce javascript

  • Anders Burla 2560 posts 8256 karma points
    Oct 21, 2013 @ 15:44
    Anders Burla
    0

    That class is just to say that things should be posted using ajax. So it worked that way before the update as well :)

    You have to look into your JavaScript if you want to support ajax posting and updating your UI correctly from the response.

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 15:54
    Kasper Skov
    0

    Yep got it. As you said, it just didn't update the UI.

    So I added the ajaxPost class again to the form and removed the new javascript references the notification said I should add after the installation of 2.2 package. So I guess there was some mix up with all the references.

    I seems to work now. It does make a full page postback though. So it doesn't seem like an ajax post. I cant remember if it did that before the update, or whether that is the way it is suppose to be.

    You can check it out for yourself if want at the link I posted earlier.

  • Kasper Skov 66 posts 346 karma points
    Oct 21, 2013 @ 15:58
    Kasper Skov
    0

    Ah didn't see your last answer. Alright. So I guess the ajax post and updating the UI from the response never worked out of the box. I just had an idea that it might would, since the form has the class 'ajaxPost' in the starter kit. The full page postback is just fine. I can live with that.

    Now I just have to worry about getting some custom properties on the order lines :S

    Thanks for your time Anders

Please Sign in or register to post replies

Write your reply to:

Draft