Episerver CMS and Commerce - my notes

CurrentPage missing on product pages
You assign a EPiServer page to act as a product template, but, in the template file the CurrentPage is a "faked" page with its ID coming from the Commerce custom page provider. This means that you can not use Epi properties on that page, and that is really bad. If anyone discover a way to get the real CurrentPage, I would be glad to hear about it.

License configuration on servers without manager (load balanced environment)
It's a little tricky to set up the web front servers, I had a annoying bad license request, even though I put the Epi-Commerce license in the www root of the site. After some trial and error I found out that copying the whole \Shared\Licensing\ folder into each server at same place (or path configured in web config's mediachase.license part) and do not forget to give app pool identity read access to that path.


Excluding a catalog node from search
There is no method in API to exclude a catalog, so you have to do it with the SqlWhereClause, like this:

var pars = new CatalogSearchParameters();

pars.SqlWhereClause = " [CatalogEntry].CatalogEntryId not in (select NodeEntryRelation.CatalogEntryId from NodeEntryRelation " +
            " inner join CatalogNode on NodeEntryRelation.CatalogNodeId = CatalogNode.CatalogNodeId and NodeEntryRelation.CatalogId " +
            " in (select * from @Catalogs_temp) and CatalogNode.Code = '" + catalogCodeToExclude + "') ";

Inga kommentarer:

Skicka en kommentar