InstallationInstall Sana Commerce Webshop on Web and Database Server

Install Sana Commerce Webshop on Web and Database Server

Interfaces Add-on Installation

Installation of Interfaces Add-on for Sana Commerce is the same for SDK and the 'Ready to deploy' version. In order to install Interfaces Add-on for Sana Commerce follow these steps:

Step 1: Copy the 'Sana.Commerce.Tasks.OrderExport.dll' and 'Sana.Commerce.Tasks.ProductImport.dll' files to the 'bin' folder of the Sana Commerce backoffice. The 'Order Line Import' task is available in 'Sana.Commerce.Tasks.OrderExport.dll'. The 'Product Stock and Price Import' task is available in 'Sana.Commerce.Tasks.ProductImport.dll'.

Step 2: Run the 'CreateStoredProcedures.sql' script on your database. It will create the stored procedures that are needed for the correct work of the 'Product Import', 'Order Export' and 'Product Stock and Price Import' tasks.

Step 3: Configure the 'Product Import', 'Order Export', 'Product Stock and Price Import' and 'Order Line Import' tasks. This configuration is performed in the backoffice 'web.config' file:

  • Locate the 'Interfaces configuration section.txt' file, which contains the tasks configuration sections;
  • Copy the whole text of this file into the <tasks> section of the 'web.config' file, so it will look as follows:
<tasks taskContentConnectionStringName="LocalSqlServer">
<task name="ProductImport"
title="Product import"
type="Sana.Commerce.Tasks.Import.ProductImportTask, Sana.Commerce.Tasks.ProductImport"
time="1:00am"
enabled="true"
sourceCustomerProviderId = "AXCustomerProvider"
sourceCatalogProviderId = "AXCatalogProvider"
sourceWebsiteCode = "B2xAX"
destinationWebsiteCode = "B2xSql"
importOnlyModified="true"
batchSize="100"
horizontalVariantComponentGroupCode="Size"
horizontalVariantComponentGroupTitle="size"
verticalVariantComponentGroupCode="Color"
verticalVariantComponentGroupTitle="color"
normalVariantComponentGroupCode="Variant"
normalVariantComponentGroupTitle="variant"
allowManualStart="true"
sortNumber="1"
/>
<task name="OrderExport"
   type="Sana.Commerce.Tasks.OrderExport.OrderExportTask, Sana.Commerce.Tasks.OrderExport"
   title="Order export"
   time="1:00am"
   enabled="true"
   sourceWebsiteCode = "B2xSql"
   destinationOrderProviderId = "AXOrderProvider"
   destinationCustomerProviderId = "AXCustomerProvider"
   batchSize="100"
   allowManualStart="true"
   sortNumber="2"
/>
<task name="ProductStockandPriceImportTask"
   type="Sana.Commerce.Tasks.Import.ProductStockandPriceImportTask, Sana.Commerce.Tasks.ProductImport"
   title="Product stock and price import"
   time="1:00am"
   enabled="true"
   sourceCustomerProviderId="AXCustomerProvider"
   sourceCatalogProviderId = "AXCatalogProvider"
   sourceWebsiteCode = "B2xAX"
   destinationWebsiteCode = "B2xSql"
   batchSize="100"
   importType="StockandPrice"
   allowManualStart="true"
   sortNumber="3"
/>
<task name="OrderLineImport"
   title="Order lines import"
   type="Sana.Commerce.Tasks.OrderLineImport.OrderLineImportTask, Sana.Commerce.Tasks.OrderExport"
   time="1:00am"
   enabled="false"
   sourceOrderProviderId = "AXOrderProvider"
   destinationWebsiteCode = "B2xSql"
   allowManualStart="true"
   sortNumber="4"
/>
</tasks>
  • Check the configuration nodes and specify the necessary values.

For more information about the tasks configuration, please read the 'Add-ons and Modules' section.

Step 4: Add 'Sana.Commerce.Tasks.ProductImport' assembly mapping to the <hibernate-configuration> section in the 'web.config' file:

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
       <session-factory>
                  ………
                  <mapping assembly="Sana.Commerce.Tasks.ProductImport" />
                  ………
      </session-factory>
</hibernate-configuration>

 

Microsoft Dynamics AX Configuration

Configure Microsoft Dynamics AX for the 'Product Import', 'Order Export', 'Product Stock and Price Import' and 'Order Line Import' tasks:

Step 1: Open the Microsoft Dynamics AX client, select 'Webshop' in the left pane and open the 'Webshops' form.

Step 2: Select the webshop and go to the 'Overview' tab. In the 'Import' section you need to specify 'Import shipping cost account' and 'Import payment cost account'.

For more information please read this chapter.

Step 3: In the 'Identification' section you need to specify 'Template customer code (B2C)' that will be used during the 'Product Import' and 'Product Stock and Price Import' processes. The product prices imported to the Commerce Provider webshop will be based on the specific prices for this customer. The same goes for the stock amount of the products which will be based on the warehouse and site configured for this customer.

The 'Prices incl. sales tax' option on the customer's form must be enabled, since the Commerce Provider webshop, where the products will be imported in, only supports the B2C scenario.