ConfigurationMultiple Domains and Websites

Multiple Domains and Websites

Configure Multiple Websites

Out of the box, one website is configured in Sana Commerce , but you can easily add additional websites. In order to do this, you should take the following steps:
  • Add a new website in the Sana Commerce SQL database:
    • Add a new website 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 site settings using backoffice. If you choose the second option please read the last paragraph.
    • Specify on which domains the website will run: open the 'WebsiteDomains' table, create a record and enter the ID of the additional website and a domain name. If you want to add an additional domain name to your website please read this chapter.
    • Specify the languages that should be available in the new website: open the 'WebsiteLanguages' table and create records for each language by entering the 'WebsiteId' of your website and the 'LanguageId' in the appropriate fields.
    • Copy the content from the already available website to the new one. We recommend you to use the SQL script which will automatically copy sana texts and content pages for your new website.
  •  Configure your website in 'web.config':
    • 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.
    • Select providers from the <modules> section to work with your web site. 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 website 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, select 'Site Management > Open site configuration' and check if the new website appears in the list. For more information about configuring a website in the backoffice, please read this chapter.
The availability of each setting on the 'Site configuration' 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 website in the backoffice.
ConfigurationMultiple Domains and Websites