News:

Support the VirtueMart project and become a member

Main Menu

Add to cart button isn't working

Started by EIF, October 09, 2013, 20:06:26 PM

Previous topic - Next topic

EIF

I don't know since when, but my 'add to cart' button isn't working anymore. The strange thing is that it sometimes does work, (with some users), but mostly not.

Reading this forum a noticed other posts with the same problem, but with no solution for me.

I tried enabling fancybox, but that didn't the trick. (I only keep seeing a 'loading' icon)
Disabling the virtuemart jquery didn't work.
When I disable the add to cart pop-up, the product is added to the cart, so this pop-up must be the problem.
Also using de default virtuemart template has this problem, so it isn't a template issue.

Can someone please help me out with this? Please check at: http://waterpijp-bong.nl

Versions I use are:

Virtuemart: 2.0.24  (just updated. Version 2.0.22 had also the same problem_
Joomla: 2.5.14
PHP: 5.3.27




jenkinhill

IE10 gives these errors on add to cart for black-sand-glass-bong-with-leaf-headshop:

SEC7118: XMLHttpRequest for http://www.waterpijp-bong.nl/index.php?option=com_virtuemart&nosef=1&view=productdetails&task=recalculate&virtuemart_product_id=81&format=json&lang=nl&quantity%3D1%26quantity%255B%255D%3D2%26option%3Dcom_virtuemart%26virtuemart_product_id%255B%255D%3D81 required Cross Origin Resource Sharing (CORS).
black-sand-glass-bong-with-leaf-headshop
SEC7120: Origin http://waterpijp-bong.nl not found in Access-Control-Allow-Origin header.
black-sand-glass-bong-with-leaf-headshop
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

black-sand-glass-bong-with-leaf-headshop
SEC7118: XMLHttpRequest for http://www.waterpijp-bong.nl/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=nl&quantity%3D1%26quantity%255B%255D%3D2%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D81&_=1381354504124 required Cross Origin Resource Sharing (CORS).
black-sand-glass-bong-with-leaf-headshop
SEC7120: Origin http://waterpijp-bong.nl not found in Access-Control-Allow-Origin header.
black-sand-glass-bong-with-leaf-headshop
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

black-sand-glass-bong-with-leaf-headshop
SEC7118: XMLHttpRequest for http://www.waterpijp-bong.nl/index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=nl&quantity%3D1%26quantity%255B%255D%3D2%26option%3Dcom_virtuemart%26view%3Dcart%26virtuemart_product_id%255B%255D%3D81&_=1381354505653 required Cross Origin Resource Sharing (CORS).
black-sand-glass-bong-with-leaf-headshop
SEC7120: Origin http://waterpijp-bong.nl not found in Access-Control-Allow-Origin header.
black-sand-glass-bong-with-leaf-headshop
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

You will see that Access is not given to http://waterpijp-bong.nl  - without the www.

Using www. in front of the url allows the add to cart to function OK. So it is a hosting/access issue, easily solved by using .htaccess to force the use of www. in urls.
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

EIF

Thanks for the quick solution, jenkinhill! It is working fine again.

But why is it that it is not working without www. in front? Using www. have no use. The url without is also more clean, and in my case corresponding with the name of the company.
Also for google indexing it is possible to use no www. in the urls.

Could this be parameterised? Or is it manually possible to get this to work?

jenkinhill

It will be related to your server setup. Some servers are set that www. is required, but you can still advertise the url without www. if you use .htaccess to ensure that on the site the www. is always inserted.
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

EIF

Ok. Does if affect google indexing? Or is it better that google also index the website with www?

jenkinhill

You can tell G to use www. or not for any of your sites within their webmaster tools. It makes no difference to rankings.
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

EIF

OK, thanks for your help. I changed the .htaccess back to use www and keep google as it is, indexing it with no www.