E-commerce web.config settings

You can modify your on-line store behavior and functionality by adding and configuring keys in your project's web.config file.

Configuring E-commerce Solution web.config settings

You can configure E-commerce Solution keys in the appSettings section of the web.config file (located in the root of the website):

<configuration>
  <appSettings>
    <add key="CMSEnableOrderItemEditing" value="true" />
    .
    .
    .
  </appSettings>
</configuration>
On this page

Related pages

The system offers the following E-commerce Solution keys:

Key

Description

CMSEnableOrderItemEditing

If set to true and the order is not  marked as paid, you can Edit () order item price, name and quantity. The default value is false.

Editing order item properties

CMSUseMetaFileForProductImage

If set to true (default value), the system asks the user, while creating or editing a product (product option), to select a product image from the file system on their computer. The system then uploads the product image to a server, and saves it as a product metafile (a product image page of the cms.file type is not created). The path to this metafile is saved as the product image path (SKUImagePath).

If set to false, the system asks the user to select a page of the cms.file type as a product image. The path to the selected page is saved as the product image path (SKUImagePath).

CMSShoppingCartExpirationPeriod

Specifies the number of days after which the shopping cart is considered expired. The Deleting old shopping carts  scheduled task removes the shopping cart from the system.

Configuring your custom web.config settings

You can add your custom settings (keys and their values) into the appSettings section of the web.config file (located in the root of the website).

Use the AppSettings property of the CMS.Base.SettingsHelper class to work with your custom settings.

Example

The example shows how you can get the value of the MyCustomKey key.

string value = CMS.Base.SettingsHelper.AppSettings ["MyCustomKey"];