This tutorial covers the following sections:
OverviewIf you decide to run more than one ViArt shop site, you will definitely wish to use the built-in multi site option (available in ViArt shopping cart from version 3.4). Multi site feature allows you to manage any number of sites sharing a single database and a single ViArt Admin console. Each site within multi site structure is completely independent and can be set to have its own content, settings, payment systems, design schemes, etc. The first site is considered the parent site and all subsites are considered child sites, but this is only where it concerns global administration. Back to topConfiguring multi sites in your ViArt ShopThere are 2 ways to set up additional sites with multi site feature:
Create a new subdirectory for each subsite and copy all the files from the parent shop: 1. Create a new subdirectory with a different name (e.g.shop2) in the root folder of your parent site and copy all scripts and templates of your current shop to this folder. This can be done by any FTP client program (e.g.WinSCP). 2. Copy var_definition.php file from your current shop and paste it to the /includes folder of your subsite to save the data of your DB. Please, do not forget to do it for other shops (if you have more than two shops). 3. Login to your ViArt Shop Admin console of your parent shop and navigate to Administration > System > Privilege Groups > Administrator > Edit Permissions. Enable appropriate options from Multisite section and click 'Update' to save the changes. 4. Once done you will see the menu Sites at Administration > System. 5. Click this menu item and further 'Add New' to add a second site. You will be presented with the following screen: where: Title - a required option. Enter the preferred name for your second site here. This name will identify your second subsite and will be displayed in the browser's top bar. Description - this is optional. Specify some information for this site (if any). Duplicate Site Settings - this is optional. Select Duplicate site settings if you wish to duplicate Global or Page Settings (CMS) of your parent site. Leave the options blank if you do not want to copy the settings of the parent site. Clear Site Settings - this is optional. Select Clear Site options to remove default page or global settings that were inherited from the parent site (if any). 6. Once you finish with the settings, click 'Update' to save your changes. You will see that your second site has been added: 7. Click 'Global Settings' next to the second site. You will be redirected to Global settings page where you should specify the correct site URL for your second site: Note: If you are using SSL for your shop, please ensure you've change the SSL site URL as well, e.g: https://www.yoursite.com/Shop_2: Important: You should decide at once whether to use MD5 Password encryption or not, because the method you select for one site will be automatically applied to all your sites. 8. Once Admin settings for multisites are done, FTP to your parent site and open the var_definition.php file (located in the /includes folder). Uncomment the strings:
$session_prefix = "shop";and $site_id = 1; where: shop stands for the title of your parent site (as indicated in the admin console). site_id is the id of the site (as indicated in the admin console). Normally the first site will be the parent site and it will have site_id = 1. If for any reason your parent site has a different site id, you can specify the correct id in the var_definition.php file. 9. Save the file and upload it to the /includes folder of your parent site. Further open the var_definition.php for your second subsite and specify the correct values for the session_prefix and site_id. Save the file and upload it to the /includes folder of your second subsite. 10. Now you can test multisite feature. Using virtual folders to define the subsites from one location: There is also another way to configure multi site option using virtual hosts (if your server supports them). To set multi sites using virtual hosts please do the following steps: 1. Ensure that virtual hosts are configured on your server. This configuration can be either done by your host or by yourself. Please, refer to the below articles on setting virtual hosts: Configuring and Using Virtual Hosts in Apache 2. Once this is done, FTP to your site and open the var_definition.php file. Note: There is no need to create a separate folder for your second site and copy all files there. All settings will be done in the var_definition file. 3. Insert the below code (instead of adding the site ID - as per the first method): $http_host = $_SERVER["HTTP_HOST"]; if (preg_match("/^(www\.)?example\.com$/i", $http_host)) { $site_id = 2; }elseif (preg_match("/^(www\.)?another\.com$/i", $http_host)) { $site_id = 3; } else { $site_id = 1; } where www.example.com - is the URL of your second site www.another.com - is the URL of your third site site_id = 1, site_d = 2, site_id = 3 are ids of your sites (as indicated in the Admin console). This example can be used for three sites. If you will have more sites you are to add one more string of the code per each subsequent subsite: } elseif (preg_match("/^(www\.)?another2\.com$/i", $http_host)) { $site_id = 4; Important: All the Admin settings described for the first method should be done if you use this method as well. Features which can be assigned individually per each siteAssigning categories and products To assign a category per a site please do the following steps: 1. Login to your ViArt Admin console. 2. Navigate to Administration > Products > Products&Categories, select a category and click 'Edit'. 3. Go to the "Sites' tab and unselect the option 'Use this category for all sites'. 4. Select a site on which you wish to show this category: 5. Click 'Update' to save the changes. Perform the above steps to assign other individual categories per each site. To assign an individual product per a site please do the following steps: 1. Login to your ViArt Admin console. 2. Navigate to Administration > Products > Products&Categories, select a product and click 'Edit'. 3. Go to the "Sites' tab and unselect the option 'Use this item for all sites'. 4. Select a site on which you wish to show this product: 5. Click 'Update' to save the changes. The selected product will only be shown on the specified site. If you try to find it on another site you will receive the below error: 6. Perform the above steps to assign other individual products per each site. Setting different user types per a site You can set individual user types per a site. To do this navigate to Administration > Site Users > Profile Settings >, select a certain user type and click 'Edit Type' > Sites tab. Select on what sites to display this customer group from the list of available sites. Click 'Update' to save the settings. This user type will be displayed only on the site you selected. Specifying additional prices per each site Multi-site feature enables you to use individual additional prices for products on different sites. To set the prices navigate to Administration > Products&Categories, select a product and click 'Prices' (under the title of the product). Specify minimum and maximum amounts and the individual pricing. Further, select the user group and the site you want to show the prices on: Assigning article types and categories To assign an article type per each site navigate to Administration > Articles > Articles Settings, select an article type (e.g.News) and click 'Edit Settings'. Further switch to 'Sites' tab and unselect the option 'Use this category for all sites'. Select a site on which you wish to show this article type and click 'Update' to save the changes. You can assign other article types per each of your sites. You can do the same for individual article categories. Navigate to Administration > Articles > Articles Settings, select an article type (e.g.News) and click on it. You will be presented with the categories for this article type. Select a certain category and click 'Edit', further switch to the 'Sites' tab and unselect the option 'Use this category for all sites'. Select a site on which you wish to show this article category and click 'Update' to save the changes. You can assign other article categories per each of your sites. Assigning forum categories To assign a forum category per each site navigate to Administration > Forum > Forum Threads, add or edit a forum category and switch to 'Sites' tab. Unselect the option 'Use this category for all sites' and select a site on which you wish to show this forum category. Click 'Update' to save the changes and assign other forum categories per each of your sites. Assigning manual categories per a site To assign a manual category per each site navigate to Administration > Manual, add or edit a manual category and switch to 'Sites' tab. Unselect the option 'Use this category for all sites' and select a site on which you wish to show this manual category. Click 'Update' to save the changes and assign other manual categories per each of your sites. Assigning certain payment processors per a site You can assign certain payment processors to be used on different sites within your multi sites. The sites can be selected via Administration > Orders > Payment systems, select a payment gateway and click 'Edit System', then switch to 'Sites' tab. Unselect the option 'Use this payment system for all sites' and select a site on which you wish to show this payment processor. Click 'Update' to save the changes and assign other payment gateways per each of your sites. Back to topHow to change static messages on multisitesTo modify static messages so that they are different from the ones on the parent site please log into your ViArt shop admin console via the url for the second or third site (instead of the parent site), e.g Site1.com/admin/admin.php, Site2.com/admin/admin.php, Site3.com/admin/admin.php IMPORTANT: Please ensure you logged out of the site 1 admin and further type the address for site 2 admin and then log in. That way you will be administering site 2 and not site 1. If you don't log despite entering site 2's address you will find that after the clicking on a link you revert back to site 1. Apart from this you can always manually change the messages files via FTP in the messages folder for each particular site. Back to topHow to use images on multisitesIt is not necessary to copy all your PRODUCT IMAGES to each domain as it usually takes a lot of disk space and you may run out of disk quota. Instead, if you specify the image source as the full url to your main site you only need to maintain one set of images. That is a major benefit where there are hundreds or thousands of products; it also saves the tedium of making copies of images for each domain and uploading each. An example of the image URL is as follows: http://www.yoursite.com/images/small/testimage.jpg Back to topConfiguring individual CMS settings for multisitesSet a unique template for each site With multi site option you can assign a different design scheme per each site. To assign a particular layout for one site, please navigate to Administration > CMS > Layout > Edit Layout > Sites tab. Select a site you want to assign to this layout by unticking the default option 'Use this layout for all sites'. Once done click 'Update' to save the changes. Follow the same procedure for other sites. Create different header menu items for different sites Multisite feature enables you to add different menu items to each site (if you use different design schemes). To assign menu items please navigate to Administration > CMS > Layouts > Site navigation and add the menu items you want to be displayed for this particular layout. For example, if you select a Classic layout for the first site and a Rainbow layout for the second site assign menu items to appropriate layouts. You will have something like that: For more information on adding menu items see see section 35.6. Back to topFrequently asked questionsCan have multiple account of same merchant ? ex: paypal1 paypal2 or moneybookers1 moneybookers2 moneybookers3? Sure, you can. Just copy the payment type php file and rename. Then duplicate the method inside the system to use that new file. Then it will allow it to work. Can viart multisite option have separate method of payment for each store? Yes, of course. Please, navigate to Administration > Orders > Payment Systems > edit system (for the payment type) - select 'Sites' tab and specify which site(s) to allocate the payment method. Is there any way of displaying different helpdesk types on a per site level At present it is impossible to display different helpdesk types per a site, but you can use custom fields and create a separate custom field with values for each site within your multi sites. How many licenses should I purchase if I want to have three multi sites? If your domain names will be different, like: www.yoursite.com, www.yoursite1.com and www.yoursite2.com then you'll have to purchase 3 licenses as each license is valid for one domain only. If you will use subdirectories for your sites, like: www.yoursite.com/shop1, www.yoursite.com/shop2, www.yoursite.com/shop3 then you need to purchase 1 license only. I wonder how many sites can I run in a single installation? Basically the only limits relate to the available server resources vs the increased website traffic of all the sites and the load performed by the traffic. If someone orders a product from the second site can we see the order in by logging in to the admin section of the parent site? Or do we go onto the admin section of the second site to see all the orders placed on the second site? You are be able to login to the Admin console of your main site, go to Sales Orders screen and there is a column called Site Name which shows what site the order came from. Back to topPatchesversion 3.6 Patch for packing slips if using a multi-sites feature Patch for Fast Checkout appearing on all multisites Patch for 'admin_user.php' for multisites Patch for downloadable links when using a multisite feature version 3.5 |