VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: bkruiger on January 05, 2016, 12:02:05 PM

Title: Empty cart
Post by: bkruiger on January 05, 2016, 12:02:05 PM
I am running VM 3.0.12 on Joomla 3.4.8 and i can not add any products to my cart.
After "add to cart" the cart opens but the products are not added.
Title: Re: Empty cart
Post by: jenkinhill on January 05, 2016, 12:37:37 PM
Is usually a JavaScript problem related to a Joomla template issue. URL?
Title: Re: Empty cart
Post by: bkruiger on January 05, 2016, 12:42:02 PM
http://www.marnes.nl

Beez3 and my custom template have the issue. The protostar template does not have the issue.
After adding an item in protostar there is no working template in which I can update/delete items from the cart.
Title: Re: Empty cart
Post by: GJC Web Design on January 05, 2016, 13:08:45 PM
QuoteBeez3 and my custom template have the issue

so you should see JS errors in your console .. these need to be fixed
Title: Re: Empty cart
Post by: bkruiger on January 05, 2016, 13:23:27 PM
I don't see any JS errors, or I am not looking in the right place...

error.php only shows a few login errors and com_virtuemart.log.php only shows some missing product images.
I can not find any other errors in the console/log files. The console it self is nog showing any errors.
Title: Re: Empty cart
Post by: jenkinhill on January 05, 2016, 13:37:38 PM
You have multiple JavaScript errors as shown using Firebug Console.

On the home page:

TypeError: $.mobile._registerInternalEvents is not a function
$.mobile._registerInternalEvents();

TypeError: jQuery(...).chosen is not a function
jQuery(this).chosen({enable_select_all: true,select_all_text : vm2string.select_...

TypeError: jQuery(...).off is not a function
jQuery(document).off("updateVirtueMartCartModule","body",Virtuemart.customUpdate...

TypeError: plus.off is not a function
plus

And on the cart page:

TypeError: $.mobile._registerInternalEvents is not a function
$.mobile._registerInternalEvents();

TypeError: jQuery(...).off is not a function
jQuery(document).off("updateVirtueMartCartModule","body",Virtuemart.customUpdate...

TypeError: el.off is not a function
el.off('click',Virtuemart.updFormS);

I suspect part of the problem is your Crapisteer template loading its own jQuery in addition to the VM version. It is an older version and probably screws VM:
<script src="/templates/marnes/jquery.js"></script>  - I would stop that one loading.

Make sure that in VM Config/Templates/Activate Css Styles & Javascripts that all boxes are selected except the last (Use external google jQuery library) and that "Display modal popup upon 'Add to cart'" is selected in Config/Checkout.

You would be better off using a proper Joomla/VM template such as from www.virtuemarttemplates.eu rather that Artisteer, which uses non-standard Joomla coding.

Title: Re: Empty cart
Post by: bkruiger on January 05, 2016, 14:13:10 PM
Thank you for your quick responces :)

Not really the awnser i hoped for, but still thank you.
I will try to kill the artisteer jquery to, hopefully, get it to work. I am using Arstisteer for years and had no issues until now.
Title: Re: Empty cart
Post by: welrachid on January 06, 2016, 00:21:53 AM
just tested it now.
works fine when i press "bestellen" - adds to my cart and directs me to checkout
Title: Re: Empty cart
Post by: bkruiger on January 06, 2016, 06:50:39 AM
After taling to the owner of the shop we desided to use a template from the suggested website.
Adding items works again. Deleting items still does not work. You need to change the amount to zero and update the cart to delete an item. Still not the way it should be, but the issue this the thread is for is resolved.
Title: Re: Empty cart
Post by: GJC Web Design on January 06, 2016, 10:24:21 AM
Did you contact Spyros at http://www.virtuemarttemplates.eu/ about the delete problem?  He is very proactive..