EPiServer Commerce R1 – Trigger Lucene Searching and Indexing

If you want to use certain parts of the Commerce Manager (e.g. Marketing -> Promotion -> “Order: Buy X, get N quantity of Y at a discount”. -> Catalog entries picker, the Commerce default Lucene search indexer must be active.

Else you get this error inside the picker window:

The searchindex creation can be triggered manually through Manager -> Administration -> System settings -> Search Index.

Scheduled jobs should be available in CMS but here is how to trigger the indexing through code:

via Searching and Indexing.

Build index command

SearchManager searchManager = new SearchManager(applicationName);


Set EPiServer Commerce 1 caching on nodes/entries

entries and nodes cache timeout is set to 1 minute.

Changes in Commerce should affect the “productpage” in the website immediately but  sometimes the cache invalidation dont work. The above setting is ultimately the cache timeout then.


EPiServer Commerce R2 SP1 available metatypes and their UI representations

List of Commerce meta properties types and their Commerce manager representation UI:ScreenShot671 The meta type is the same as the field-“name” but remove “test” E.g. “datetime”, “integer” type and so on.

All seem to validate in a predictable way, e.g. the email type must be a valid email in the textbox, except the “Url” meta type which doesn’t seem to validate at all(?).

The “file”-type is multi file upload initially.

“imagefile” type has a preview of the image.

“dictionary” doesnt seem to have any remove value function(?).

If invalid data is entered, a red * will appear next to the field and in the top of the page upon save.

A little warning though, this is tested in Chrome web browser which isn’t the best browser when using the Commerce Manager (IE 7 is recommended). Some types might behave behave in a better way in Internet Explorer.

Extra warning: when I added all the different meta fields the “Catalog Node Edit” function stopped working in Commerce Manager UI. Like this:

There is probably one of the properties that is not working correctly in the Commerce manager UI (buggy). And the function BindMetaForm() just fails.

Lesson learned: mess gently, very gently with commerce meta properties!

More on the subject – How to Create custom metafields controls in the UI: http://sdk.episerver.com/commerce/1.1.1/Content/Developers%20Guide/Architecture/ExtendCustomizeMetaFieldControls.htm

The Nansen blog: Fixing EPiServer’s context menu bug in Google Chrome

As all of you using Google Chrome on an EPiServer website, know that the right click menu isn’t opening correctly in your browser. The problem appears when you have scrolled down on a page and try to open the context menu – the menu will open at the top of the page as if you had not scrolled the page…

via The Nansen blog: Fixing EPiServer’s context menu bug in Google Chrome.

EPiServer Commerce 1 and Associations

If working with associations in EPiServer commerce (e.g accessories or related products) and wonder which associations are active – just look in the tables CatalogAssociation  and CatalogEntryAssociation.

The column CatalogAssociationId indicates the foreign key in CatalogEntryAssociation table.

Replace 123 with your CatalogAssoicationId.



Episerver Commerce 1.1 Dev Guide – Shopping Cart

Key files and controls
Overview of cart object
Accessing/adding cart items
Workflows/How totals are calculated
Cart persistence

The workflow updates a number of properties of the Cart to indicate various totals. These properties allow you to easily display the price for a line item, the discount amount, and the after-discount-price. These include

Cart.SubTotal is the total for the cart, after discounts are applied.

LineItem.ListPrice is the price before discount

LineItem.ExtendedPrice is the price for a lineitem, given the quantity of the item and applicable discounts.

LineItem.LineItemDiscountAmount is the total amount of discount for a LineItem.

Shopping Cart.

Handling EPiServer users and roles – reference list – Epinova

Thank you Arild Henrichsen!
If you need some code for:
Handling EPiServer users and roles  in EPiServer 5 and 6.
Such as:
– Retrieving users
– Authenticating users (login/logout)
– Creating and deleting users
– Creating, assigning and deleting roles/groups
– Retrieving/setting user profile properties
– Access rights for users and roles

Just go here:
Handling EPiServer users and roles – reference list – Epinova.