ConfigurationMultiple Domains and Websites

Multiple Domains and Websites

Configure Multiple Websites

Out of the box, one webshop is configured in Sana Commerce , but you can easily add additional webshops. In order to do this, you should take the following steps:
  • Add a new webshop in the Sana Commerce SQL database:
    • Add a new webshop to the 'Websites' table: create a new record, enter the name and the default language for it.
    • Create a new record in the 'WebsiteSettings' table. After this you have two choices of filling the 'Fields' column: by creating a SQL scipt which will automatically fill it or by configuring the webshop settings using backoffice. If you choose the second option please read the last paragraph.
    • Specify on which domains the webshop will run: open the 'WebsiteDomains' table, create a record and enter the ID of the additional webshop and a domain name. If you want to add an additional domain name to your webshop please read this chapter.
    • Specify the languages that should be available in the new webshop: open the 'WebsiteLanguages' table and create records for each language by entering the 'WebsiteId' of your webshop and the 'LanguageId' in the appropriate fields.
    • Copy the content from the already available webshop to the new one. We recommend you to use the SQL script which will automatically copy sana texts and content pages for your new webshop.
  •  Configure your webshop in the 'web.config' files of the backoffice and Starter Site:
    • Add the new 'site' node to the 'sites' section in the 'sanaCommerceLive' configuration section (for a description of the 'site' node properties, please read this chapter).
    • Set the 'defaultsite' attribute of the <sites> node to the default site. The 'defaultsite' attribute points to the webshop that is used by default when the backoffice is opened for the first time.
    • Select providers from the <modules> section to work with your webshop. All providers are divided into five main subsystems; the description of each provider is stored in the 'description' attribute.
  • Add the domain name of your webshop in IIS (please check the previous chapter for more details).
  • Request a new license file for the new domain. Please read about requesting a license file here.
  • Open the Sana Commerce backoffice and check if the new webshop appears in the list. For more information about configuring a webshop in the backoffice, please read this chapter.
The availability of each setting on the 'Settings -> General' page is configured in the 'WebsiteSettings' table in the Sana Commerce SQL database. If you want to show or hide a specific setting, open the table and set the 'configurable' attribute to 'false' or 'true', depending on whether or not the specified setting should be shown for the webshop in the backoffice. 
ConfigurationMultiple Domains and Websites