Virtuemart. The “Buy” button doesn’t work.



Recently I’ve come across the following problem: there is one occasion when the “Buy” button doesn’t work in the shops made on Joomla + Virtuemart. At the beginning I thought that this is a problem with inactive cookies but I was wrong.

The problem is connected to the prefix “www” and settings in the admin panel. If the domain in admin panel is www.yourdomain.com, then if a user enters your domain without “www” he/she is not able to buy anything as the “Buy” button doesn’t work. And vice versa.

How to solve this problem?

There are two ways: via .htaccess file and via VirtueMart.cfg.php.

The second way is easier.

Find a file  VirtueMart.cfg.php (administrator/components/com_virtuemart/virtuemart.cfg.php)

Find a code:

define( ‘URL’, “www.site.ru/” );
define( ‘SECUREURL’, “www.site.ru/” );

and choose it to:

define( ‘URL’, $mosConfig_live_site.$app );
define( ‘SECUREURL’, $mosConfig_live_site.$app );

Everything should be sorted now.

  • Share/Save/Bookmark

If you enjoyed this post, make sure you subscribe to my RSS feed!

4 Responses to “Virtuemart. The “Buy” button doesn’t work.”
guimaluf Posted on May 9, 2011 at 1:43 pm

i do that thru joomlaexplorer and my website get a blank page. after i recover the configuration the blank page still live!
where is my site? how i get back my web site?

guimaluf Posted on May 9, 2011 at 1:44 pm

i acidentaly mess the code. my fault, sorry

Anthony Posted on May 14, 2011 at 12:08 pm

No probs!

laurentiu tudorache Posted on August 17, 2011 at 8:42 am

It works! Thank you!!!

Post a Comment