- Business Foundation
- Exporting and importing meta models
- Extending meta models
- Filtering and sorting
- Generating typed business foundation classes
- SQL Meta Model
- Working with entity objects
- Working with SQL Records
- Business Meta Model
- Bundles and packages
- Catalog content provider
- Product variants
- Related entries
- Using a CMS-style rendering template
- Working with the Catalog as IContent
- Assets and media
- Meta Data Plus
- Scheduled Jobs
- Warehouses and inventories
This content is archived. See latest version here
Last updated: Aug 13 2014
This document provides some basic examples of how to use the EPiServer Commerce APIs to work with PriceType features. Examples covered here are for instance how to get price types definitions.
Adding custom price types
You can add a new line within the SalePriceTypes section in the ecf.catalog.config file, this will make a new Price Type to be added to the system.
<add key="NewCustomPriceType" value="3" description="New Custom Price Type" />
<add key="JurisdictionGroup" value="4" description="Jurisdiction Group"/>
Note that the value needs to be unique and it must be greater or equal to 3.
Getting all price types - enum and configuration
PriceTypeConfiguration.PriceTypeDefinitions returns all price types - including predefined price types and price types that were defined in configuration.
public class PriceTypeConfigurationSample
public IDictionary<CustomerPricing.PriceType, PriceTypeDefinition> GetAllPriceTypeDefinitions()
// Get all price types - included predefined and price types from configuration file.
var priceTypeDefinitions = PriceTypeConfiguration.Instance.PriceTypeDefinitions; return priceTypeDefinitions;