News:

Support the VirtueMart project and become a member

Main Menu

A solution on Add to cart speciffic bug

Started by eldravo, April 11, 2012, 21:10:05 PM

Previous topic - Next topic

eldravo

This was a speciffic problem I had.
After searching and searching on this forum I found a partial solution wich I would like to extend for virtuemart community.

Whenever I entered to www.mydomain.com the "Add to cart button" just do not worked on any browser (tried on Firefox, Chrome, IE).
If I entered to mydomain.com without www, the "Add to cart button" worked well on any browser (tried on Firefox, Chrome, IE).

I do not know the reason why this happens, but I consider this a bug and this is the reason of my post on this section.

How can I control that?
Answer: Redirecting every visitor from www.mydomain.com to mydomain.com without www. (Not "the" solution, but "a" solution)

Here you can find a good solution:
http://www.scriptalicious.com/blog/2009/04/redirecting-www-to-non-www-using-htaccess/
http://www.scriptalicious.com/tools/www-redirect-generator/

You have to insert this code on your .htaccess file (do not get confused with htaccess.txt)

THIS CODE:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

BETWEEN HERE:
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
INSERT CODE HERE

## End - Custom redirects

Hope this works for you as it did for me.

Studio 42

Hi, eldravo

Are you sure this is not a porblem in virtuemart 1.1.x and not virtuemart 2.0 ?
Because this problem is know.

eldravo

Electrocity

I am 100% sure. I have installed Joomla! 2.5.1 and Virtuemart 2.0.2 on a Linux Godaddy server.

This problem was driving me crazy. I didn't knew what was happening until I read something written by Banquet.Tables regarding this problem, and searched for an answer outside this forum.

Maybe you can check by yourself at www.kikas.com.mx

Regards,