Hide menu Last updated: Aug 31 2017
Area: Episerver Commerce Applies to versions: 10 and higher
Other versions:

PriceType examples

This topic provides examples for using the Episerver Commerce APIs to work with PriceType features, such as how to get price type definitions.

Adding custom price types

To add a new Price Type, add a new line within the SalePriceTypes section in the ecf.catalog.config file.

Note: The value needs to be unique and must be 3 or greater.

Getting all price types - enum and configuration

PriceTypeConfiguration.PriceTypeDefinitions returns all price types, including predefined price types and price types defined in the configuration.

Adding your own customer price group

Customer Price Group is a predefined price type that should be matched with a specific sale code. Options available to marketers are predefined as: Customer, Partner and Distributor.  As a developer, you can add items to that list, to make your own customer price group available in the drop-down.

Populate the list by adding the code in the example below, and call that from your InitializationModule.

Comments