virtuemart add to cart button not working
Virtuemart is a great piece of eCommerce software to use in conjunction with joomla.
If you've been building a store and find like me that you have problems with the add to cart button not working, then here is a collection of ideas that i have used, to get it working for me.
The first thing to do is check that it is working when you type your domain name with www.
My problem was that when i had the www infront of my domain, the add to cart button worked perfect, but when i had no www infront, then the add to cart button wouldn't work.
The options to fix this are:
going into your virtuemart configuration settings settings, and selecting site. There should be settings relating to your site address, and you can try putting the www in front of the address if its not already there.
If you find that doesn't work, then try editing your .htaccess file (this applies only if you have mod rewrite on)
Add the line
rewriteCond %{HTTP_HOST} ^domain\.com$
rewriteRule ^.*$ http://www.domain.com%{REQUEST_URI} [R=permanent,L]
below where it says
RewriteEngine On
This method finally worked for me, and forces any visitors who arrive at your site without the www, to be forced to be redirected to the working www site.
This has no effect on the visitors and they won't even notice.