How to run multiple sites on one database in VPCart (v8)

How to run multiple sites on one database in VPCart (v8)


If you are using VPCart 9.xx, please follow our User Guide chapter below:
https://helpnotes.vpcart.com/userguide900/#!Documents/runtwoormoreshopsofftheonedatabaseproductmatching.htm

If you are using vpasp 7.xx, please jump to this helpnote :
http://helpnotes.vpasp.com/kb/604-Tips-and-Tricks-for-Version-8/993-How-to-run-multiple-sites-on-the-one-database-in-VPASP-70/

Using VPCart (v8) you can run different templates and also display different home pages for each site running off the one database.

Assume you already have 1st site running in older version, and you want to setup 2nd site with latest VPCart, here are the steps :

Step 1.
First please ensure you have upgraded existing site (1st site) to latest version 8.xx Pac:

http://www.vpasp.com/sales/upgrade.asp

After you have purchased the upgrade for latest pack, you can try to install the upgrade for 1st site by following our Upgrade Guide.

Step 2.
Next, after 1st site upgraded to latest version, you can try to configure product matching.

Login to the administration for the 1st site and go to the Advanced Settings > Software Configuration menu.
Search for xproductmatch and set it to Yes .

Step 3.
Open shop$config.asp for 1st site under "config" folder and "admin/config" folder and ensure the following settings are configured as below eg:

If your existing xshopid is vpaspstore1, then please fill in const xproductmatch with a value for your site. You can enter the same value like you used for xshopid eg.
const xShopId = "vpaspstore1"
const xproductmatch = "vpaspstore1"

Note : Please change the value vpaspstore1 to your own unique shop id and product match value for 1st site.

Step 4.
Upload a default version of latest VPCart to the second domain. Do NOT go through the Install Wizard or Upgrade Wizard.

Step 5.
5a. Copy file shop$config.asp at "config" folder from your 1st site and paste into the "config" folder and "admin/config" of 2nd site.
5b. Open the file shop$config.asp at "config" and "admin/config" folder from your 2nd site and make the following changes e.g :

const xshopid = "vpaspstore2"
const xproductmatch = "vpaspstore2"
const xconfigtable="configuration1"
const xmysite="http://www.enteryour2nddomain.com"

Note : Please change the value vpaspstore2 to your own unique shop id and product match value for 2nd site.
Set the xconfigtable to use configuration1.
And change the http://www.enteryour2nddomain.com to your 2nd domain url.

Save your changes and upload to the "config" folder and "admin/config" folder locations in the 2nd site.
Both sites are now accessing the one database.

Step 6.
Log into the 1st site admin.
Then go to : Misc > Multi Sites Set Up Tool .

For the value of "Old Configuration Table" must be filled in with your 1st site xconfigtable value from shop$config.asp.
Example, if 1st site has this value :
const xconfigtable="configuration"

Then, the "Old Configuration Table" should be entered with : configuration.

For New Configuration Table, leave it with default value which is configuration1.
Then click Continue button.

This makes a copy of the main configuration table for the 2nd site and allows you to have each site running independently each with its own settings.

Step 6.
6a. Log into the 2nd site admin.
If you do not know the admin url for 2nd site (you maybe created from fresh files), then use this url eg : http://www.enteryour2nddomain.com/admin/shopadmin.asp
Please use the same admin login details used on 1st site.

6b. Go to Advanced Settings > Software Configuration > Click "Reload Shop Configuration"
6c. Go to Advanced Settings > International > Language tab > Click "Reset Language"
Choose your default language eg. English and Continue.

6.d. Go to Website > Layout Manager > You will see all sections there are showing red color that means nothing will show in your homepage for 2nd site.
Please click edit for which section you want to display on your 2nd site homepage, and then set Enable to Yes.

For example, if you want to display Left Container, then click Edit and set Enable to Yes.
or if you want to display very top section Top Header Container (Desktop), then do the same by enabling them.
You may need to enable most of the sections from header until footer for the homepage of 2nd site.

Please refer to our user manual chapter 4.21 Layout Manager to setup the layout. Our user manual is available at : http://helpnotes.vpasp.com/

Step 7.

You can now start creating unique content, products and categories for each site.

The way the system works is:

a). If a product record has an entry in the Product Match field it will only show in the relevant site
b). If a product record has NO entry in the Product match field it will show in all sites.
c). If you have multiple entries in the Product Match field such as vpaspstore1,vpaspstore2 it will show in both of the referenced sites.

You can do the same with the content and categories as well.

Step 8.
Log into the 2nd site admin and go to Store > Page Manager.

Create a new page record for your 2nd site homepage.

Make what changes you need to, upload a new image etc and then in the Match Product field enter vpaspstore2.

Ensure Use as Home Page is Yes and click Update Record.

You now have a unique home page for each site.

Good luck!


Times Viewed:
3949
Added By:
Wilson Keneshiro
Date Created:
12/22/2016
Last Updated:
11/7/2020