VPCART supports running more than one shop in one database.Each can share
products and have products that are unique to them.
Note : If you
want to setup two sites using one db, do not put the second site into the same
domainwith a different subfolder. We would suggest you to put the second site
into anew domain or subdomain rather than into a subfolder.
The reason for
this is that when both sites are put into the same domain, the session in both
sites will be mixed together and you might have a lot of session issues
later.
If you put a second site into a new domain or into a subdomain of the
main site, both the new domain/subdomain and the main site will have their own
session variables and will not mixwith each other.
The following is a basic guide on how to set up product matching:
1. Create 2 VPCART sites on your server. Open shop$config.asp (under “config” folder and “admin/config” folder) in each and point both to one database.
2. In
the database, there is a spare blank configuration table called
configuration1.
In the first site, log into your administration
and then run the copy configuration utility to populate the second
configuration table for the second site.
To do this, login to your
administration and go to :Misc>Multi Sites Set Up
Tool
The new configuration table name is configuration1.
Running this tool will copy your current configuration table data across the
second site.
Click Continue.
3. Open
shop$config.asp file
(under “config” folder and “admin/config” folder) eachin the second site and
change the following so it is pointing to the second configuration
table.
const
xconfigtable="configuration1"
4.
Open shop$config.asp(under
“config” folder and “admin/config” folder) in the first site and enter a name
for it into the xproductmatch
field.
const
xproductmatch="store1"
Next, change the
xshopidvalue to something unique.This can be anything as long as it is
different to the xshopid of other VPCART sites installed on your
server.
const
xshopid="mystore1"
5. Repeat Step 4 for the second site, except change the xproductmatch and xshopid so it is different compared to the first store.
6. Login to the administration for the first site and go to the Configuration & Setup>Software Configurationtab. Search for xproductmatch and set it to Yes. Repeat this process for the second site.
7.
Login to the administration for the second site and go to :
Website>Layout Manager.
Enter the xshopid value of the second site in the
New Store text box (if you do not remember what is the value
of your xshopid for second site, please refer to step 5 above). Then try
to click the “New Store” button after you have entered a value.
Now
you can start adding a layout for your second site. You can add the left column,
center column or right column for the second site.
8. For all products you add into your database, ensure that you enter the value from xproductmatch for either the first or second shop into the Match Product field of the View/Edit product administration page.If you leave this field blank, the products will display in both sites.
Note: If you have more than two stores and you want a product to appear in multiple stores but not in all stores, in the Match Product field of the product record, you can enter a comma-delimited list of shops you want the product to appear in.
For example - shop1, shop4, myshop
Product matching now includesxshopid of the store to
be saved into Orders table. The value of xshopid is saved in the
“storematch” field in Orders table. This is to restrict admin users that
are “Restricted Administrator” type to only see orders containing the
Store ID for the site they have accessed throughthe admin. However,an admin user
that is a “Normal Administrator” can access all orders that comes from
all stores.
In VPCART 8.00, there is also an enhancement to shopexd.asp
to ensure that if a user manually updates the id in the URL, a validation is
carried out to ensure that they are legitimately allowed to view that
product.
For example, if a merchant has setup product matching for
two stores, store A and store B. Let’s say product X with catalog id 1 belongs
to store A. When customers open this link shopexd.asp?id=1 from store B, the
customers cannot view product X. They can only view the product X in store
A.