Posts

Installing EpiServer Community on a commerce site

Installing EPiServer relate on an EPiServer CMS 7 site working with EPiServer Commerce can be a challenge, This post can be helpful for those who are trying to do this or facing issue in installing other EPiServer products. Technologies under discussion are EPiServer CMS 7.1, EPiServer Commerce 1 R3 EPiServer Relate+ 7 Issue: Installing Commerce and Relate (Community) is a no go http://world.episerver.com/Support/Bug-list-beta/bug/95414/ Issue details: An unhandled error has occured:  The argument is null or empty. Supply an argument that is not null or empty and  then try the command again. When executing At C:\Program Files (x86)\EPiServer\CommonFramework\7.0.844.1\Install\System Sc  ripts\Upgrade Site.ps1:93 char:17 + -SqlServerName <<<< $properties.DatabaseServerName `  An unhandled error has occured:  The argument is null or empty. Supply an argument that is not null or empty and  then try the command again. When exec...

Unwanted Lucene Search Results in EpiServer Commerce R2

Issue: User was getting unexpected search results for products, e.g. with a search key word ‘Sate’ he was getting same result as for ‘Site’. Although for most of the clients they will happy with these results but this particular client was unhappy with this result due to their business requirements. We do not have any word like ‘Sate’ in our Database or in Index file for Lucene. Clearly it was Fuzzy search that was causing this although in code we have set FuzzySearch = false; Reason: // Perform Lucene search SearchResults results = searchFilterHelper.SearchEntries(criteria) as SearchResults ; In the Mediachase.Commerce.Website, Version=5.2.243.2, SearchFilterHelper's SearchEntries() method, below: public virtual ISearchResults SearchEntries(CatalogEntrySearchCriteria criteria) {  try  {   _Results = Manager.Search(criteria);  }  catch (SystemException)  {   if (HttpContext.Current.IsDebuggingEnabled)    throw; ...

Clone a purchase order and convert into cart

We have a requirement for our client that he can masquerade user and can create a new cart based on some existing Purchase Order(e.g. for damaged/lost orders). Option 1: Get The OrderForm and other objects from PurchaseOrder and assign it to new Cart. It did not work as result was a nasty output. On saving Purchase Order for new cart, OrderForm from Parent was assigned to new cart and parent Purchase order lost its associated OrderForms. Option 2: Clone the Purchase Order and create a cart based on that but it will not work because. (I tested this with EpiServer Commerce R2SP2) Type 'Mediachase.Commerce.Orders. PurchaseOrder ' in Assembly 'Mediachase.Commerce, Version=5.2.628.0, Culture=neutral, PublicKeyToken=6e58b501b34abce3' is not marked as serializable . Solution: We can clone OrderForms and OrderAddresses. Therefore I created a clone copy of OrderForm and order addresses and added that into the Cart. Below piece of code helped me to achieve ...

Get the CatalogNode of Product Listing Page

  There are some instances when we need to know the Parent nodes of a Page based on [catalogue] Product Listing. E.g. I have a scenario when we are setting up header menus for products. Editor can select a parent Node for display child nodes as menus. But episerver classes doesnot provide any public function to return the CatalogNode of an active Product listing page. Following piece of code can help us in these scenarios. private string nodeName = string .Empty; //Is it a category listing Page bool isCatalogNodePage = BreadcrumbsFactory .IsCatalogNodePage(CurrentPage); //Is it a product listing page bool isProductPage = BreadcrumbsFactory .IsProductPage(CurrentPage);             //Get the parent catalog node/s of this page. if (isCatalogNodePage) { CatalogNode node = CurrentPage.GetParentCatalogNodeCode();        if (node != null )    ...