ASP Shopping Cart Software top image
home
about VP-ASP
VP-ASP features
View VP-ASP Demo
Contact us about VP-ASP
Our development services
Download the FREE VP-ASP Demo

Q/. How do I set up YVS with 2 sites, same database, different products in each site?

A/.

To set up YVS so you have 2 sites both using the one database you need to use a feature called Product Matching. This feature allows you to define which products are displayed in which site.

Step 1/.
Create 2 YVS sites on your server.

Step2/.
Open the database and make a copy of the configuration table and call the copy configuration2.

Step 3/.
a).Open shop$config.asp in site 1 and point the database connection to where you have the database located.

b).Then add into the xproductmatch field the name of your store as follows:

const xproductmatch="store1"         ' display products matching these

c). Next change the xshopid name to something unique. The xshopid is the name of the "box" that stores your site variables. If you have 2 sites on the same server with the same "box" name they will mix up the settings so make sure you call it something that wont be on any other site.

const xshopid="mystore1"         'Please change this to a new name. Needs to be different for every site

d). Repeat for site 2 except change the names to store2 and insert a new name in xshopid.

Step 4/.
While you have the shop$config.asp file open in site 2 change the following so site 2 is pointing to the new config table configuration2.

const xconfigtable="configuration2"

Step 5/.
Open your site 1 in a browser and enter the admin.

Navigate to the Shop Configuration and do a search on xproductmatch. Set this to Yes and press continue.

Repeat this for site 2.

You may need to run diag_dbtest.asp to ensure you have the connection set up correctly.

TIP: Remember to remove the diag_dbtest.asp file from your server before going live!

Step 6/.
For all products you add into your database ensure you enter either store1 or store2 into the Match Product field in the products table. The actual field name in the database is productmatch.

If you leave this field blank the products will display in both sites.

That's it!

printable version

 

Back to Main Page