News:

Support the VirtueMart project and become a member

Main Menu

"Add to cart" problem with virtuemart 2.0.20

Started by Framar, December 05, 2013, 15:15:55 PM

Previous topic - Next topic

Framar

Hello,

I'm using joomla 2.5 and Virtuemart 2.0.20

After clicking on the button "aggiungi al carrello" I'm redirected to the shopping cart page ( with root URL and not http://mydomain.com/cart or checkout ) but no product is showing in the cart.
I found on this forum a lot of threads about this problem, but with different solutions and I wouldn't create any problems at the site trying the different solutions whose I read.
So, I post here a link that redirect on a product details page and I ask that someone click on "Aggiungi al carrello" button and can tell me how to fix the problem.

This is the link http://www.lamiaecobottega.it/uomo/bagno-doccia-uomo-400ml-detail.html

Thank you

jenkinhill

The error is that you are not loading VirtueMart's jQuery before vmsite.js and the other jQuery dependent VM scripts.
This line should come before the vmsite.js load:
<script src="/components/com_virtuemart/assets/js/jquery.min.js" type="text/javascript"></script>
but it comes after!

Looking at your loaded template header your JavaScript file loading is all over the place, as if you have hardcoded loading many of the files instead of allowing Joomla and components to load what is required, so later you load the VM js files again......  If that is a hand built template then get the developer to look at it.

Also see  http://forum.virtuemart.net/index.php?topic=118683.0
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

Framar

Thank you very much for your answer, now it works well, but only from the details product page, if I try to click on "aggiungi al carrello" from categories page, it doesn't work.
Maybe, is the problem that I have renamed the span class button from <span class="addtocart-button"> to <span class="addtocart-button-category">?
If yes, how can I make it works with new span class name?
Instead, if is another problem, can you help me again please?

Here is an example of category link where the button doesn't work http://www.lamiaecobottega.it/capelli/shampoo.html

Thanks