In EPiServer Commerce you map your products to a product template and your product listings to a product listing template this are then used to connect Commerce with EPiServer in the "CatalogPageProvider", all this is fine until you for example add a new catalog to Commerce that needs a different template then the default catalog.
This is what happened to us in our project when we added a new site with different design and product catalog into the EPiServer Commerce installation. To solve this problem we extended EPiServers CatalogPageProvider and did our own implementation of the function "GetPageType" that delivered different templates based on the catalog id of the page.
Here is our implementation of the GetPageType function,
public class AvalancheCatalogPageProvider : CatalogPageProvider
protected override string GetPageType(string key)
var store = new CommerceSiteMappingStore();
var dictionary = SplitKey(key);
if (int.TryParse(dictionary["CatalogId"], out catalogId) && (mapping = store.Find(catalogId)) != null)
var nodeType = (NodeType)Enum.Parse(typeof(NodeType), dictionary["NodeType"]);
private static IDictionary
dictionary = new Dictionary ();
string strArray = MappedPPDB.SplitKey(key);
The differences between this implementation and EPiServers is that we return different page types based on the catalog id of the page that is loading.
The mappings are saved in the dynamic data store and editable via a gui plugin in EPiServer, if we can't find a mapping that is configured in our tool we call EPiServers default implementation to let it handle the request.
As I said this is the solution for our project and the needs we had were each catalog is represented by only one page type.