Developer Workstation Installation

Open 'Developer Workstation Installation' wizard, choose your scenario to see more provider-related information of the installation manual.

Configure Websites

Out of the box, one website is configured in the 'sites' section of the 'web.config' files and it is set as a default site. To configure the websites:

Step 1: Open the 'web.config' file of the Sana Commerce Starter Site project in any text editor
(do the same for the 'web.config' file of the 'Sana.Commerce.BackOffice' project).

Step 2: Locate the 'sites' section in the 'sanaCommerce' configuration section and set the necessary values:

<sites defaultsite="SanaStore" contentProvider="SanaCommerceSqlContentProvider" SendMailToReportAddress="false" ReportAddress="YourEmail">
<site code="SanaStore" shopType="B2X">
            <provider name="CatalogProvider">[ProviderName]</provider>
            <provider name="OrderProvider">[ProviderName]</provider>
            <provider name="ShopProvider">[ProviderName]</provider>
            <provider name="CustomerProvider">[ProviderName]</provider>
            <provider name="CommonProvider">[ProviderName]</provider>

The table below provides the description of all website parameters:

Parameter Description
defaultsite Points to the webshop that is used by default when no webshop is registered on the requested domain name.
contentProvider Defines which content provider is used for all webshops.
SendMailToReportAddress If 'SendMailToReportAddress' is set to 'true', all e-mail messages will be sent to the e-mail address that has been specified in the 'ReportAddress' attribute. This field is used for testing purposes in the dev or beta environments: it makes sure no e-mail is sent to real customer e-mail addresses. Please note that the 'ReportAddress' attribute is the required field even if the option is not used!
code Stores the name of the webshop and can be changed to an appropriate name for your project. This attribute is linked to the similar code record stored in the 'Websites' table in the Sana Commerce SQL database.

Defines the type of the business scenario that is supported by the webshop:

  • B2B - a general 'business to business' scenario. When the webshop is set as B2B, a customer cannot register on the webshop, change customer details, view the shop catalog anonymously or use different payment methods;
  • B2X - a 'business to business' scenario combined with a 'business to customer' scenario. When the webshop is set as B2X, a customer is free from all the restrictions of the B2B scenario;
  • B2C - A general 'business to customer' scenario. When the webshop is set as B2C, a customer is free from all the restrictions of the B2B scenario.

Defines the particular providers for each subsystem of the webshop. By default you cannot change the provider name (attribute 'name'). This can be only when the new managers are added or when the existing framework functionality is overridden.

The provider names can be found in the 'Configure the Providers' chapter.

An important value in the 'sites' configuration section is the value in the code attribute of the site node. This value, in this case 'SanaStore', refers to a record in table 'Websites' in the Sana Commerce SQL database. When you have changed the website name in 'web.config', you also have to change this name in this 'Websites' table as well: 

The 'Websites' Table 

The presentation of the address information on the Starter Site differs for the SQL Provider and NAV Connector webshops. The address information in the webshop is specified during the registration process and also available on the 'Your details', 'Prospect details' pages and on the second step of the checkout process, when a customer needs to specify the address the order should be delivered to.

In case of using Sana Commerce - NAV Connecter with a B2X scenario you need to change the presentation of the address information for the correct data mapping. It can be performed by changing the default value of the 'DetailedAddress' parameter specified in the 'Settings' table of the Sana Commerce SQL database.
Default value: True

To change the default value of the 'DetailedAddress' parameter a SQL script should be executed on the Sana Commerce database:

Step 1: Before executing the script specify the website ID in the script:

UPDATE Settings
      SET Fields = REPLACE(CONVERT(nvarchar(MAX), Fields),
      '<field name="DetailedAddress" type="System.Boolean, mscorlib"><boolean>true</boolean></field>',
      '<field name="DetailedAddress" type="System.Boolean, mscorlib"><boolean>false</boolean></field>')
      WHERE Id = 'YourWebSiteId'

Step 2: When the website ID is specified, execute the SQL script on the Sana Commerce database.

The SQL script will change the default value of the 'DetailedAddress' parameter to 'False' and the presentation of the address information on the Starter Site will correspond to the address fields used in NAV.