Joomla extensions tutorials

Addtocart doesn't work after moving the demo website on the other server?

It is very common problem after moving the demo website on the target server.
While creating your website, most of you are working on the project using the test server or subdomain. After introducing the whole content,usually you make backup of the site that is already finished in order to install the website on the live server.
Then it occur that Add-To-Cart button doesn't work properly - it redirects your current website to the URL you used for testing instead of adding the product to the cart.

What's the problem?

VirtueMart saved the previous demo URL in the configuration file, so you have to enter the correct URL address in this file.

How can you fix that?

Navigate to:  root/administrator/components/com_virtuemart/ and then edit virtuemart.cfg.php file.
Then go to 33 line, where the code starts with the following comment:
// these path and url definitions here are based on the Joomla! Configuration

Now you have to enter your website URL or replace these 2 lines of the code with:

define( 'URL', $mosConfig_live_site.'/' );
define( 'SECUREURL', $mosConfig_live_site.'/' );


15 years in Joomla business

Create Your website with US
Use flexible Joomla templates.


ul. Przyjaźni 9, 84-215 Gowino, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2021 All rights reserved. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.