News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Cart Module does not update correctly

Started by frighten, February 06, 2014, 12:50:03 PM

Previous topic - Next topic

frighten

J! 2.5.17
VM 2.0.26d
All extensions up to date.

Hi fellow Joomlers

For some days now (in my forth to be more exact) I have been struggling with a critical issue. I donĀ“t know if this is the correct place for this issue, but considering I found similar posts during my searches, here we go:

When I click Add to Cart (no matter if from product page och category) then:
1. Modal popup pops up.
2. The VirtueMart Cart module shows 1 item. (while the modal popup is displaying)
3. As soon as you click continue shopping on the modal popup, the VM cart module goes back to show "empty cart". Sometimes, very seldom, the first item I put to cart stays, and the cart shows "1" instead of "Empty Cart".
4. If I continue adding a 2nd item, the VM cart module now ads up and display 2 items while the popup is there.
5. I Click Continue Shopping on the popup, the VM Cart Module goes back to Empty. And so it goes for eternity.
6. Now if I click on another menu item, the correct value is shown in the Cart Module.
7. I go back to the first category (or page) where I added the products from and again Empty Cart.
8. I open the cart and all the product are there.

To make this even more frustrating. The Items in the cart can not be easily deleted or updated. Don't know if the two problems are related.

A. I have tried with several templates, same problem.
B. Disabled JQuery everywhere possible, and running "JQuery easy" instead. No JQuery errors in debugging.
C. Not using Cache, and have clean Browser cache.
D. Tried with: IE9, Chrome 32, FF 25 and Saffari. On several computers.
E. Disabled all thinkable extensions.
F. Also disabled the modal popup and are taken to the cart each time I add a product.
G. Pulled my hair out of anger.

I can surely go on... but if you visit gregwar.se and start adding products from Category "Smaker" (Menu item "Smaker") you might get as frustrating as me.

Reaching my hand out for help.



jenkinhill

I see a possible issue as you are loading jQuery1.8 which is too high a version for the fancybox script to work properly. I think the highest you can go in jQ1.7.1  - VM default version is currently 1.6.4 

I don't think jQueryEasy is required.

As for the minicart, that is a Ajax cart module, not the one supplied with VirtueMart, so you probably should ask the developer of that module. As it uses Ajax to update it is possible that it is not working because of the jQ issue I mentioned above.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

frighten

Hi
Thank you for your reply.

I tried it before, and now again, to run JQuery 1.7. Still the same problem. It is now set to 1.7.0

When debugging with Firebug etc I can not see there is any conflicts with JQuery.

With minicart, I guess you are referring to the Cart Module in upper right corner? I am sorry to say that I have not installed any additional modules for the cart. This one is actually the "VirtueMart Shopping Cart" module v2.0.24b?! as of November 19 2013 developed by The VirtueMart Development Team. Guess the shopping cart module was not included in the update of VM? The design of it might be overidden by the template. But I have the same problems with both the Atomic and the beez templates among others, so I can not open heartily blame this template :o(



jenkinhill

Yes that is not the standard display so it is using overrides. Problem with overrides is that they can also contain extra code and JavaScript to change funtion. If you have a directory at [yourjoomlatemplate]/html/mod_virtuemart_cart then try renaming it to stop the override from loading and then try it.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

frighten

Ok. The override folder is renamed and the cart module now looks different. The problem remains as I suspected as I did try different "Standard" templates before.  :-(
I'll keep it renamed until problem is resolved. Maybe it will be easier to reach our goal.

Problem also remains if I rename the entire HTML folder in my template.

I also checked the default.php inside /modules/mod_virtuemart_cart/tmpl/
Two comment rows at the top says:
// Ajax is displayed in vm_cart_products
// ALL THE DISPLAY IS Done by Ajax using "hiddencontainer" ?>

This should be the file included in the VM install, and what i can understand it also uses AJAX. Is this correct?

jenkinhill

Yes, AJAX is used to update the cart module and refresh the complete page where necessary.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

frighten

Hello
I found the reason for this behavior.
It is something about the server it runs on. Before my original post I also tried it on my local server and had the same problem. A few days ago I finally tried another hosted server, and the problem was gone. Then I updated my local server and problem was gone here to. So soon we will move from the first hosted server provider to another, because we can not tell exactly what is causing this.

Thanks for your input jenkinhill.