How to enable and configure a multistore in PrestaShop 1.5-1.6
PrestaShop 1.5 introduced options with which you can enable and set up a multistore. With a single PrestaShop installation you can have many shops and all of them can be managed from the same admin panel.
In this article we'll outline the basic things that you have to do and consider when enabling and configuring a multistore. For screenshots and more details check out the tutorial on how to set up a multistore in PrestaShop 1.5-1.6.
Configure a Multistore with Different Domains, Subdomains or Subfolders
You can set the shops that you add to be subdomains or subfolders of the domain name of your main shop, or you can configure them to be with entirely different domains. Regardless of your choice, the options that you have to configure in the admin panel of your PrestaShop are the same. Nevertheless, there are some things that you have to consider, in particular if you decide to use different domains.
Let's say, for example, that your main shop is accessible at yourdomain.com. Let's have a look at what form the URLs of the shops in your multistore will have, depending on whether you decide to use subfolders, subdomains or different domains:
- Subfolders - if you use subfolders, the URLs of the shops will have the form yourdomain.com/shop1, yourdomain.com/accessories, etc. Note that you don't have to create any subfolders on your hosting account.
- Subdomains - the URLs of the shops in the multistore will have the form shop1.yourdomain.com, accessories.yourdomain.com, etc. You don't have to create any subdomains, however wildcard subdomains should be enabled for your hosting account. All HostKnox accounts are compatible with wildcard subdomains.
- Different Domains - whatever domain names you have you can use them for the shops in your multistore. Each domain name that you decide to use for a shop in the multistore has to be pointed to the nameservers responsible for the hosting account on which your PrestaShop is installed. You can change the name servers from the domain name registrar with which the domain name is registered.
You also have to add the domain name to the virtual host file of your account. HostKnox customers can do this from the section Domain Names and DNS Settings of the Pixie control panel. In cPanel the equivalent is to park the domain name.
Activate the Multistore Feature
The multistore feature is disabled by default. To enable it, go to Preferences menu>General sub-menu in the admin panel of your PrestaShop and on the page that opens set the option Enable Multistore to Yes.
Multistore Options in the Admin Panel
After you enable the multistore feature a whole new section will become available in the admin panel. To access it, go to Advanced Parameters menu>Multistore sub-menu. This will open a page with some options. You'll see a table that lists the existing shop groups. Each shop in the multistore is added to a shop group. Initially, there should a default shop group that contains the original store created during the installation of the application. Each group that you add will be listed in the table. You can use the respective buttons in the table to edit the options of the shop groups and to delete the groups (you can delete a shop group only if there are no shops in it).
On the same page there's a drop-down menu with which you can change the default shop.
There's also a panel with the multistore tree. It lists the shop groups, the shops in each group, and the URL addresses of the shops. If you click on the name of a shop this will display a table listing all the shops. For each shop in the table there is a button with which you can edit its options and another one with which you can delete it.
The options that you can configure when you edit shop groups and shops are the same ones as when adding new shop groups and shops. We'll discuss them in the next two sections.
Create Shop Groups
As we mentioned, when you add a shop to the multistore you have to put it in a shop group. By default, PrestaShop has one shop group. If you want to, you can add more. A shop group can be configured so that the shops in that group share customers, orders and product quantities. This cannot be done with shops from different shop groups. To create a new shop group, go to Advanced Parameters menu>Multistore sub-menu and on the page that opens click on the button Add a new shop group.
This will open the form for adding shop groups. Type a name for the group in the respective field. The name is not visible on the frontend. If you want the shops in the group to share customers, product quantities and orders, enable respectively the options Share customers, Share available quantities to sell and Share orders. The one for sharing orders can only be enabled if the other two are enabled. Note that once you enable the sharing of customers and a customer registers on any of the sites in the group, you won't be able to disable that option. After an order is placed you won't be able to disable the option for sharing orders either.
When customers are shared, a customer can log in with the same credentials on any of the sites in the group, no matter which site was used to create the account. When product quantities are shared, a product has a total quantity for all the stores in the group. When orders are shared, a customer who places products in the cart of any site in the group will be able to complete the order from another site in the same group.
If you want to be able to add shops to the group, make sure the Status option is set to Yes. Then click on the Save button.
To add a new shop to the multistore, go to Advanced Parameters menu>Multistore sub-menu and click on the button Add a new shop. On the form that opens type a name for the shop in the respective field. This name is not shown on the frontend. From the drop-down menu Shop group select the group to which you want the shop to belong. From the drop-down menu Category root you can select one of the existing root categories. This will be the root category of the shop that you're about to add. The option Associated categories will list the selected root category and all of its subcategories, no matter with which shop or shops in the multistore they are associated. Mark the categories that you want to be associated with the new shop. From the Theme option select the theme that you want to be activated for the new shop. You can change it later with any of the other installed themes.
Under these options you'll see the settings for importing data into the new shop. By importing data you can save a lot of time for building and configuring the new shop. You should at least import the modules, so that the new shop can function properly. To import data, make sure the option Import data is enabled. Then from the drop-down menu Choose the source shop select the shop from which you want to import data. Under it you'll see listed the different types of data. Those that have their checkboxes marked will be imported.
After you're ready with all the options click on the Save button and the shop will be created. To make its frontend accessible you have to configure its URL options. We'll discuss this in the next section of this article.
Shop URL Options
In order for customers to be able to access the frontend of a shop in your multistore, you have to configure the URL options of that shop.
After you add a shop you'll be automatically brought to a page with a table that lists the shop and the other shops in the group. For the shops for which you haven't configured the URL options there will be a button Click here to set a URL for this shop.
You can also access this page with the table by going to Advanced Parameters menu>Multistore sub-menu and clicking on a name of a shop in the multistore tree.
On the page with the URL options make sure that the correct shop is selected from the Shop drop-down menu. If this is the first URL that you add for this shop, the option Is it the main URL for this shop will be enabled by default. A shop can have more than one URL; one is the main URL and the rest of the URLs are redirected to it. If you want people to be able to use that URL to access the shop, set the Enabled option to Yes.
Under these options you'll see the settings for configuring the actual URL of the shop. The options Domain and SSL Domain are set to the domain name of your main store by default (e.g. yourdomain.com). If the new shop is going to be a subdomain (e.g. store1.yourdomain.com), or a different domain (e.g. anotherdomain.com), type it in both fields. Don't put the http:// part, just the domain name. If the store is going to be a subfolder shop (e.g. yourdomain.com/store1), don't change these two options.
If your PrestaShop is installed in a subfolder on your hosting account, the subfolder path will be automatically specified in the field Physical URL. This is the path to the installation in relation to the root web-accessible folder (e.g. public_html) on your hosting account. You don't have to change this option. Under it you'll see the option Virtual URL. You only have to configure this option if you want the new shop to be a subfolder of the main shop. For instance, if the main shop is yourdomain.com and you want the new one to be accessible at yourdomain.com/store1, then in the field for Virtual URL put store1. In the field Final URL you'll see what the final URL of the new shop will look like.
After you're ready with the options don't forget to click on the Save button.
Manage Shops in a Multistore
When you configure options in the admin panel of a multistore you can select whether all stores should be affected, whether only the stores from a particular shop group should be affected, or just a particular store. At the top of each page in the admin panel there's a drop-down menu with which you can select the scope.
Regardless of the scope that you select some options affect all shops, while others can be configured only per store. Depending on the scope that you select, these options will be specifically marked and/or there will be a warning message on the page.
For some more details and screenshots check out the tutorial on how to set up and manage a multistore in PrestaShop 1.5-1.6.