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?
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.
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.
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
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.
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
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?
Did you see the breaking changes for TC 2.2 - it should answer your question :)
http://documentation.teacommerce.net/revision-history/
Kind regards
Anders
I might be missing something, but I don't see how any of them should have effect on that.
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.
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 :)
If i should be able to help - then I properly need a link. Else it will be quite hard to debug anything :)
Alright. I will need to publish it to web then. I'll let you know when its up.
Hi Anders
Try and add a product to the cart here http://firmafisken.azurewebsites.net/shop/fisk/
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.
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
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.
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.
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
is working on a reply...