Sitecore Commerce Connect – Connecting Sitecore XP and XC

Within this article I would like to deal with some groundwork regarding Sitecore XC. As hopefully all of you know Sitecore XC is an extension to standard Sitecore XP, which enriches Sitecore with a powerful commerce engine. The big question is:

Does everyone of you know how exactly XP and XC are connected, and how you can have influence on this connection?

To answer that question, I would like to give you a general overview of that connection layer, which is called Commerce Connect.

Therefore I would like to start with the standard definition Sitecore gives us within doc.sitecore.net.

“Sitecore Commerce Connect is the Sitecore commerce API for storefront developers and is an integration layer between a front-end webshop solution and a back-end external commerce system. The back-end system can be any e-commerce system for which Commerce Connect connectors have been created by Sitecore or a third-party vendor.”

Architecture

Now we want to have a look, how this Commerce Connect is integrated within a common commerce scenario with XP and XC components and where we can see that piece of software. For that, let us have a look at the following graphic.

2018-10-19 19_32_15-Sitecore XC From A to Z.pptx - PowerPoint

This graphic show a standard architecture overview of a standard Sitecore XC integration. As a base we always have standard Sitecore XP, at this point with related software like, SIF and SxA, which we optionally can use for Sitecore XC. On top of that we have the commerce engine of Sitecore XC. Now highlighted the imported area of the diagram, where we can see the connection of XP and XC. Commerce Connect is installed with the installation of two packages “Sitecore Commerce Connect Core” which installs the basic Commerce Connect module and “Sitecore Commerce Engine Connect” which installs very specific functionality, which is used to implement the connection between Sitecore XP and XC. This package, patches all the general implementations, with concrete implementations for Sitecore XC. Commerce Connect in the end then acts as a middleware with which it is very easy to communicate with the commerce engine via standard and predefined interfaces, pipelines and so on.

Now lets have a look, what we get, when we have installed the Commerce Connect packages. This is especially imported, if you have the need to add, delete or modify something for your custom business needs.

Items

Lets first investigate the items we get. In the content editor we get a new area called “Commerce” as you can see below.

2018-10-19 19_35_49-Sitecore XC From A to Z.pptx - PowerPoint

In scenarios, where you connect other external commerce systems to Sitecore XP, this area is even more imported, than in the case, where we integrate Sitecore XC. The most imported sections under the Commerce item are

  • Commerce Control Panel
    • Commerce Engine Settings
      • Commerce Terms
      • Shared Settings
      • Storefronts

Nowadays the section Catalog is not used anymore from the Content Editor, because Sitecore XC has its own tool for handling Commerce Catalogs, the Merchandise Manager. Therefore the Sitecore recommendation is not to use Content Editor anymore for dealing with  catalog data.

Within the section Commerce Terms we set all the commerce related texts, which are used within the Sitecore XC Business Tools. Lets have a look how, with the example of adding a custom condition to the Promotion Manager. To add a custom condition it is enough to create a class like seen below.

2018-10-21 13_47_42-Customer.Sample.Solution - Microsoft Visual Studio

Within the ConfigureSitecore file just register the new rules and conditions with the following command.

2018-10-21 13_55_14-Customer.Sample.Solution - Microsoft Visual Studio

After you did that, you have only one single step left to do. Now you have to go tho the Content Editor under the Commerce Terms section and find, in this case, the area for Conditions. There you add a new Item, which has exactly the same name, than the used in the Attribute EntityIdentifier. Within this Item you now can add your individual text for your new condition. You can also use placeholder for custom input with the syntax [PROPERTYNAME] and a property within you class of type IRuleValue<TYPE>. 

2018-10-21 13_50_31-Content Editor

If you correctly did that, you can just open the Promotion Manager and the under the conditions list your custom condition with your individual text.

2018-10-21 14_11_56-HappyHour

2018-10-21 14_12_17-HappyHour

You can see the new condition with its entity name, and if you choose it, choose your custom input, in this case StartHour and EndHour.

I think the sections Shared Settings and Storefronts are quiet self explaining. Within Storefront you create your individual Storefronts for you Sitecore instance and link them to the specific environments, these storefronts should use.

NOTE: Currently there is a bug in the choice of environments. The field for choosing an environment was deleted in the last version, so for every storefront Sitecore always falls back to the standard environment, which is set in the /Y.Commerce.Engine/Sitecore.Commerce.Engine.Connect.config.

2018-10-21 14_07_01-C__inetpub_wwwroot_commerce.sc_App_Config_Include_Y.Commerce.Engine_Sitecore.Com.png

To get rid of that, just go to the Storefront template and add the field again to the template

On the left side, we see, how the field should look like, in the example of Sitecore Commerce 8.2.1. On the right side, we see, that the Environment field is gone within Sitecore XC. The logic in the background is still there, so it is enough to manually add that field again to storefront template. Sitecore already registered that as a bug.

Pipelines

Now lets go on to the next stuff, we get after installing Commerce Connect.

As you can see in the graphic above we get a bunch of new config file and within these configs a bunch of new commerce related pipelines. These pipelines are an essential part of Commerce Connect. Within the graphic above you can for demonstration reason see the AddCartLines pipeline. The left graphic shows, what is installed within the standard Commerce Connect packages, from Sitecore Commerce Connect Core. There we only get a standard pipeline with some really basic processors, which in the end only trigger analytics events and handle xDB stuff. The magic we get with a new config file, which we get after installing Sitecore Commerce Engine Connect. The right graphic shows, that the new config file patches the existing pipeline with custom processors, especially e.g with the processor AddCartLines. These patches and processors hold all the business related logic to establish a proper connection to the external commerce system, in this case Sitecore XC. These processors in the end make the rest API calls and communicate with the commerce engine. Both configs together build a fully working and functional pipeline to on the one hand trigger external system logic, and on the other hand track everything within Sitecore XP xDB.

The question now is, how are these pipelines  be triggered. The answer comes in the next chapter API.

API

Last but not least, what I want to mention within my article is the OOTB available API Sitecore Commerce Connect gives us to interact with external commerce systems. From the previous chapter, you already know, that we got a bunch of different pipelines. Now we see, how we can trigger these pipelines from code.  Sitecore Commerce Connect is delivered with a various number of so called Service Provider. If you use these service provider from Commerce Connect, in the end the corresponding pipelines are called and executed and you do not have to take care of anything else, just using these service provider correctly.

Bild3

Above you can see such a service provider call from an implementation of Sitecore Comemrce 8.2.1. As you can see, there is some piece of business logic with grabs the parameter, checks them and builds up the necessary request object for our commerce connect call. Then the commerce connect call, in this case, UpdateCartLines is executed with its request object. As result we get a very specific result object, which holds the information, if the call was successful, if not the error, and the inner object, in this case the modified cart object, which we then can use for our further purposes.

All these Commerce Connect calls are structured in the same way. They have their own request and result object, and only have to be triggered correctly.

Within Sitecore Commerce 8.2.1 we still had to implement our business logic around the commerce connect service provider.

But from Sitecore XC on, we do not have to do that anymore, cause from that time on, Sitecore integrated commerce functionality into the SxA including such implementation for commerce connect service provider.

As you can see in the image below, you can find these implementations in the DLL Sitecore.Commerce.XA.Foundation.Connect.dll und the namespace Sitecore.Commerce.XA.Foundation.Connect.Managers2018-10-19 19_44_14-JetBrains dotPeek

There you can find the various Managers to interact with Commerce Connect, like CartManager, CatalogManager etc.2018-10-19 19_44_27-JetBrains dotPeek

If you have a closer look at on of these Managers like the ICartManager, you can see all the available implementations, which can be used within your Sitecore XP solution, without the need to write a single line of code.

2018-10-19 19_45_21-JetBrains dotPeek

Note: If you reflector through the implementations, you will notice, that some of the functionalities of Commerce Connect are not implemented right now. These functionalities, then would have to be implemented by you on XP and if necessary on XC side, to be fully working.

2018-10-21 14_35_08-JetBrains dotPeek.png

Conclusion

Within this article you learned how Sitecore XP and XC are connected. You saw the different parts like, items, pipelines and API you get with the installed middleware. And especially how you can influence the standard behavior and where you have to make your changes for your custom business needs.

Sitecore Commerce 8.2.1 Update 2 – Installation of Commerce Server with SQL Server User

Today I would like to give a short but useful manual to install the Sitecore Commerce Server without the need of a local or AD administration user. As all of you know the normal installation manual gives us as requirement to have a local administration user called CSFndRuntimeUser, see Installation Manual. As written in this article, it is of course also possible to use an active directory user with the same rights than the local administration user.   This is especially necessary when your architecture separates the CM, CD and SQL Server from each others. But one question is still open and came across when I tried to set up a production environment. What to do in the case you have no active directory and therefor no active directory user, but you have a distributed environment? In this article I will guide you through the steps of installing commerce server without the need to have a windows or an AD user.

The base of the installation is still this one from sitecore itself. Most of the steps mentioned in that manual can be done the same way as before. The changes will take action when we reach the steps from Setup a Commerce Server site mentioned here.

The command  Initialize-CSSite would normally use the user taken in the Application Pool of the IIS Site and would create the necessary commerce server databases with these rights. Because we have no user, which could be used for that case, we cannot run that command, but have to run some other commands as workaround, which in the end have the same result, but you can provide the commands with the information of the user which should be taken.

First of all you should have a look at a general problem regarding the Inititalize-CSSite command, before you apply the new commands. This article from the kb here https://kb.sitecore.net/articles/635619, mentions an error which could occur after applying an windows update. So it is strongly recommended to to these steps in that article to avoid side effects later. After you have done the steps mentioned there, you can proceed with the steps of installing commerce server site.

  1.  New-CSSite “YOURCOMMERCESERVERSITENAME
  2. Add-CSCatalogResource -Name “YOURCOMMERCESERVERSITENAME” -SqlUserName “MYUSERNAME” -SqlUserPassword “MYPASSWORD” -ConnectionString “Provider=SQLOLEDB.1;Password=MYPASSWORD;Persist Security Info=True;User ID=MYUSERNAME;Initial Catalog=YOURCOMMERCESERVERSITENAME_productcatalog;Data Source=MYSERVER
  3. Add-CSInventoryResource -Name “YOURCOMMERCESERVERSITENAME” -SqlUserName “MYUSERNAME” -SqlUserPassword “MYPASSWORD” -ConnectionString “Provider=SQLOLEDB.1;Password=MYPASSWORD;Persist Security Info=True;User ID=MYUSERNAME;Initial Catalog=YOURCOMMERCESERVERSITENAME_productcatalog;Data Source=MYSERVER
  4. Add-CSMarketingResource -Name “YOURCOMMERCESERVERSITENAME” -SqlUserName “MYUSERNAME” -SqlUserPassword “MYPASSWORD” -ConnectionString “Provider=SQLOLEDB.1;Password=MYPASSWORD;Persist Security Info=True;User ID=MYUSERNAME;Initial Catalog=YOURCOMMERCESERVERSITENAME_marketing;Data Source=MYSERVER
  5. Add-CSProfilesResource -Name “YOURCOMMERCESERVERSITENAME” -SqlUserName “MYUSERNAME” -SqlUserPassword “MYPASSWORD” -ConnectionString “Provider=SQLOLEDB.1;Password=MYPASSWORD;Persist Security Info=True;User ID=MYUSERNAME;Initial Catalog=YOURCOMMERCESERVERSITENAME_profiles;Data Source=MYSERVER
  6. New-CSWebService -Name “YOURCOMMERCESERVERSITENAME” -Resource Catalog -IISSite “CSServices”
  7. New-CSWebService -Name “YOURCOMMERCESERVERSITENAME” -Resource Profiles -IISSite “CSServices”

Where MYUSERNAME is a SQL User, MYPASSWORD is the password of the SQL User, YOURCOMMERCESERVERSITENAME is the predefined name of your commerce server site and MYSERVER is the SQL Server with name or IP.

After applying all of these 7 commands, you will have done all steps from the official manual equivalent to commands 4, 5 and 6.

2017-12-29 16_29_21-10.99.1.4 - Remote Desktop Connection.png

2017-12-29 16_34_05-10.99.2.4 - Remote Desktop Connection

In the end we have all the necessary commerce server DBs with the proper rights and the IIS Sites with the necessary web services like seen in the example above.

 

 

 

Sitecore Commerce 8.2.1 Update 2 – Initialize Environment for custom environment fails

Maybe some of you already tried to create a new commerce instance and used already the command InitializeEnvironment on his / her new environment. And maybe also some of you did not execute that initialization on a standard Sitecore Instance, but on a new custom one. So maybe you already ran into that issue, that this command finished with a strange error. Nevertheless if you already got that issue or will get it, this little article can help save some time on that. The exact call I am talking of is the following

http://localhost:5000/commerceops/InitializeEnvironment(environment=’******CommerceShops&#8217;)

 {
“@odata.context”:”http://localhost:5000/CommerceOps/$metadata#Commands/$entity&#8221;,”@odata.type”:”#Sitecore.Commerce.Core.Commands.InitializeEnvironmentCommand”,”Id”:”c2d86f617f10468b8adcaf0fb49566b5″,”ResponseCode”:”Error”,”Messages”:[
{
“MessageDate”:”2017-12-12T20:36:17.1612883Z”,”Code”:”Error”,”Text”:”Failed to get connection for Sitecore”,”CommerceTermKey”:”ConnectionError”
}
],”Models”:[
],”ActionUrl”:null
}

This error tells us, that the authoring system is not able to get conection to Sitecore. So I tested the most obvious sources of that error.

The first source could be, that the host, entered in the config of the environment is not reachable from the authoring system. The second one would be, that it is reachable, but the login credentials are wrong.

2017-12-22 15_55_23-C__stash_alnatura-commerce-core-engine_Sitecore.Commerce.Engine_wwwroot_data_Ser

Both points were ok for my case. So for me there was no reason, why it should not be able to connect to sitecore. To investigate this issue deeper, Sitecore recommended to look into the fiddler session of that call. Therefore it was necessary to make some changes on the web server to also track all the traffic from the authoring system to other sources and not only the single call of InititalizeEnvironment. This article describes very good, which changes have to be made, to let also that kind of traffic to be captured by fiddler. After I made all of these changes and executed the command again, I got the following output

2017-12-22 15_54_12-Progress Telerik Fiddler Web Debugger

You can see, that the authoring system is in deed able to connect to sitecore backend, but a specific call seems to fails. This call simply tries to access the following item in sitecore master database sitecore/content/home. Now comes the part, where I said, if you have not a standard installation anymore. In normal projects I work on this demo home item from sitecore standad installation is normally rmeoved and replaced by a project specific home item. In addition it is also common, that the location of our new home item is slightly diffrent than that. So for example our content tree looks something like that

2017-12-15 13_44_32-Content Editor

You can see that our home item is under the path sitecore/content/B2B/home. Because of that little fact, the whole InititalizeEnvironment process is not working properly anymore. An easy and quick hotfix for that issue is to simply add the necessary item again under sitecore/content/home. The template can be some random one, because only some kind of item has to exist under that path.

Sitecore has registered that bug under the public reference number 34646 and also delivered an own hotifx. As it is with every hotfix, do not use it in combination with other hotfixes and use it on your own risk, or contact your sitecore support to get a special dedicated fix for you. The one I got is available under this link.

In my case, after adding the home item the problem was solved for me and the command ran through completely without any error anymore.

Sitecore Commerce 8.2.1 Update 2 – Merchandise Manager shows a general error when opening a catalog

In this article I want to describe a behavior of the Merchandise Manager which made it impossible to use a catalog anymore.

While working a bit with products, importing them and updating them, I wanted also to have a look into the Merchandise Manager to change there something. Unfortunately I was unable to use the Merchandise Manager anymore with my catalog because I got a General Error directly on the root level of the catalog

2017-11-30 16_35_06-Alnatura B2B - MerchandisingManager.png

I was able to see in the network log, that Sitecore tried to get categories to display, but failed with error 500. Because I did not find anything wrong, I contacted Sitecore Support, who helped me to understand, what causes the issue.

The issue is, that Sitecore at this point tries to retrieve the categories. To do that is uses the Display Names of the items. But not from the Language you are currently working in, but always  with the Language en-en. But now the issue is, because the system has only items / products in German it also has only Display Names of items in German. So at first to fix this issue, the idea was to set for all products an English item version and add Display Names in en-en. Because I didn’t want to do that, I got another approach to fix that issue. Support told me, where to set this hard coded language, from where the system tries to retrieve the Display Names.

The item, which stores this information is in the core database under “/sitecore/client/Applications/MerchandisingManager/Catalog/PageSettings/CatalogChildrenTabs/Categories”. On that item you only have to go into the Presentation Details and there into the rendering CommerceDatasource. Inside that rendering you can set the property Language. There just enter for example de-de and the category items are now retrieved with the German display names which works perfectly fine.

2017-12-01 15_36_49-Desktop.png

Sitecore Commerce 8.2.1 Update 2 – Coupons are created and used with a wrong amount

In this little article I want to show you a strange behavior I encountered while creating and using coupons with Sitecore Commerce 8.2.1. This article is an addition to the article Sitecore Commerce 8.2.1 Update 2 – Customer & Order Manager show wrong amounts. In that article I already talked amount wrong amounts int the Pricing & Promotion Manager and also in the Customer & Order Manager.

Sitecore was able to deliver a hotfix especially for that behvior to display the values correctly in the Culture DE in the Business Tools. The fix Sitecore provided you can find under this link. Sitecore warns to use that fix in combination with other delivered hotfixes and that this hotfix was especially created to fix that issue.

After applying this fix it seemed that this solved the issue with wrong amounts. But after we used some coupons and added them to the cart, we encountered again this issue. In the Business Applications the amounts are displayed correctly, but if you add the coupon to the cart it again uses the wrong amounts. For example if you have the coupon, which should take action at cart subtotal of 100 Euro and should reduce the cart subtotal with 10 Euro, we got the following result

2017-11-30 15_09_37-Demo Cart Page

The threshold now is 10.000 instead of 100 and the amount reduced is now 1.000 instead of 10, so the values are again the ones which were seen earlier in the Pricing & Promotion Manager. So now we have a big mismatch between the amount the Promotion Manager displays and what is taken for real, which is worse than before. Currently Sitecore is on that Issue, but again it has something to do with the culture of the IIS but also with the culture of the operating system.

This issue appears if you have for example the following set up.

2017-12-08 09_26_01-Remote Desktop Manager [QSRVUAT01]

2017-12-08 09_26_23-Remote Desktop Manager [QSRVUAT01]

If you change these set up to EN like this

2017-12-08 09_25_49-Remote Desktop Manager [QSRVUAT01]

2017-12-08 09_26_07-Remote Desktop Manager [QSRVUAT01]

the error wont appear anymore. Two things is important when you change that setting. First reset the IIS and second you have to create new coupons, because the wrong amount is saved on the coupon on creation time. So if you have created a coupon with the old culture the value will still be used and displayed wrong on the cart even after changing the culture. Only after creating a new coupon with the new culture the correct values will be stored within the coupon and later used on the cart.

 

Sitecore Commerce 8.2.1 Update 2 – A broken cart line leads to an cart, which is not usable anymore

In this little article, i want to describe a problem, which could unfortunately happen to everyone. The scenario in which this issue can been recognized is the following.

A user puts some product into his / her shopping cart and then leaves the website with the filled cart. In the meanwhile some products are removed from Sitecore for some reason, e.g. when they are not in the collection anymore. Now the user comes back to the shop and wants to continue shopping. The problem now is, that this is not possible anymore. Every interaction with the cart will now lead to an authoring system error. Nevertheless the user tries to put new items into the cart or just want to the whats in there. After some investigation I found this error in the authoring system logs.

39 12:59:15 ERROR PipelineAbort:Cart ‘DefaultCart81a675c6-c5ae-4c89-8508-bbf0422c7d27b2b’ has invalid lines.
39 12:59:15 ERROR PipelineAbort:Cart ‘DefaultCart81a675c6-c5ae-4c89-8508-bbf0422c7d27b2b’ has invalid lines.

In the end this shopping cart is not usable anymore, because it  consists of items, which cannot be found anymore in Sitecore. You can also see that, if you have a closer look into the cart and especially into the cart lines. You will then see, that the Sitecore Item ID is saved and also used internally.

2017-11-28 09_20_22-Alnatura - Microsoft Visual Studio (Administrator)

2017-11-28 09_20_02-Alnatura - Microsoft Visual Studio (Administrator)

In the moment i realized that, I contacted Sitecore Support to report that wrongdoing. Sitecore was able to reproduce the behavior and registered this as a bug under the reference number 28574.

Sitcore was able to deliver a hotfix to solve the issue, that the authoring system always runs into a pipeline error. The fix was amongst other things to set that SitecoreProductItemID to null in case the product cannot be found anymore. Before that, the ID was still present there. So you still have the product in your cart and it is still broken, but it wont lead to an authoring exception anymore and you are again able to user your cart.

In addition to that Sitecore fix, I decided to “cleanup” the cart every time I use it. In the moment this Sitecore ID is null, the product is not available anymore and should be removed from cart, so the cart is not full of garbage products. To do so, i currently implemented an extension method for the cart, which runs over all the line items to kick out all the non-existing products.

2017-11-28 09_32_33-Alnatura - Microsoft Visual Studio (Administrator)

The DeleteLineItemFromCurrentCart is the default one from the Commerce Connect API.

With both adaptions, the Sitecore Fix and the Cart extension, the user now is again able to use his cart and proceed with his checkout with having any garbage or dead products in the cart.

If you also want to get the hotfix please use the following link to get it. This fix was especially implemented for Sitecore Commerce 8.2.1 Update 2 and was not designed to work with other hotfixes.

 

Sitecore Commerce 8.2.1 Update 2 – Customer & Order Manager show wrong amounts

After implementing a new cool website with Sitecore Commerce and building a lot of fancy modules and functions, I was recently, finally able to create my own Orders in my custom greenfield project and environment. The last bigger hurdle, was described in the last article about order which are not visible in the Customer & Order Manager. Now after I solved also that problem, I was able to see my newly created orders in Sitecore. So far everything seemed to look good …. on my local dev environment.

2017-11-28 08_26_00-Order Number UB4FVAA

2017-11-28 08_26_21-Order Number UB4FVAA

I tested the code, created some orders and everything was well.  The big surprise came, when I deployed that code to the customer test environment. Also there I created some orders and had a look into the backend to see the result. Unfortunately the result there was totally different.

2017-11-14 22_20_48-Order Number 434Z4FA

Instead of e.g. the price of 76,65 Euro, I got the price 7,656,00 Euro and so on. This behavior could be seen for all price fields, where amounts were displayed.  To check if the problem was a problem of display or data, I called the authoring system directly with Postman and the call  http://{{ServiceHost}}/{{ShopsApi}}/Orders (You can find that call under OrdersAPISamples / API / Orders). The result showed me, that the data are stored correctly, but only displayed wrong, and only in the customer testing environment.

2017-11-14 22_20_26-Remote Desktop Manager [QSRVUAT01]

I also recognized relatively quickly, that the number format was EN. This was also a bigger problem for me while implementing the website modules, which display amounts. The problem was that my local dev environment is an EN system, where as the customer testing environment is a DE system. In addition to the wrongdoing in Customer & Order Manager I recognized a similar behavior in the Pricinig & Pronotion MAnager. I added the possibility for customer to add coupon codes to the cart to get some kind of discount. Locally again, everything works well, but in the customer environment I saw a similar behavior again, that amounts are displayed incorrectly. For example I added a coupon code, which should take action when the cart subtotal is more than 100 Euro.

2017-11-21 08_37_12-Promotion

After saving this Qualification, I got the following output

2017-11-21 08_37_17-Promotion

Instead of 100 Euro, the qualification jumped to 10,000.00 Euro. I assumed directly, that this behavior is closely related to the one from the Customer & Order Manager.

Right now the solution was to ask Sitecore Support for a Solution, because it seems, that the Customer & Order Manager is not able to handle other Cultures like DE.

A good answer is, that Support registered this behavior as a bug under the reference number 5614. Right now there is now proper working fix of that issue, but to change the culture of the target system to EN.

2017-11-28 08_48_55-Remote Desktop Manager [QSRVUAT01]

After changing the Culture to EN the output of the amounts was now correct again.

2017-11-28 08_51_06-Order Number 434Z4FA2017-11-28 08_51_14-Order Number 434Z4FA

 

Sitecore Commerce 8.2.1 Update 2 – Orders are not visible in Customer & Order Manager

Maybe many of you are already or will stumble over this issue.

You have created your instance, implemented some stuff, and now finally you were able to create your first order. When you now look into the backend in the Customer & Order Manager you expect the order to be listed there. But… it is most probable, that you will not see anything. Depending, if your instance is based on a new environment or not.

First of all, if your new order does not appear under the Order Tab of the Customer & Order Manager, it is a good idea to rebuild the Order Index.

To do that, just go under “Control Panel” -> “Indexing Manager” -> Select “commerce_orders_index” and click “Rebuild”. If you do that, the order index, which is used to display the overview of the orders in Customer & Order Manager will be rebuild and is then up to date.

If the new order is now still not visible, the error might be the same like in my case. In my case I had a look into the index itself via “Luke”. (Nice article about how to use Luke is here) Within that investigation I saw, that the index was full of orders, but not from my new instance, but from the old demo storefront instance. I tested it at first locally on my machine, where I have beside the new instance also the demo storefront set up. The question now was, why are there order from other environments, but not from my one.

The answer is as simple as hidden 😉 With the help of Sitecore, we found out, that if you create a new Environment, what you should do if you want to use Sitecore Commerce in a production environment, you have to adapt a specific config, the Sitecore.Commerce.Engine.Connectors.Index.Lucene.config under \App_Config\Include\Y.Commerce.Engine. Within that config you find a section <Environments> where the environments are specified, which should be crawled for orders.

2017-11-27 17_46_50-C__stash_Sitecore Commerce_Site_Website_App_Config_Include_Y.Commerce.Engine_Sit

Of course our new environment is not present there, but the demo once HabitatAuthoring and AdventureWorksAuthoring. If you now remove those environemtns and insert your one, reset IIS and rebuild the orders index again, you will get your previously created order finally in the Customer & Order Manager

2017-11-27 17_51_37-_C__stash_Sitecore Commerce_Site_Website_App_Config_Include_Y.Commerce.Engine_Si

2017-11-27 17_49_55-Search Results.png

Sitecore Commerce 8.2.1 Update 2 – Using the Commerce Server Manager leads to IIS Error

While working with User Data, I was forced to add some additional fields to the standard user object. To do that, I followed the steps described in this great video. While doing so, I came to the step, where I had to open the Commerce Server Manager under Profile Catalog/User Object. The normal behaviour would be, that some additional widget opens on the right side. But in my case I got a hard IIS error.

iiserror

Also every other entry on this level produced that IIS error. After contacting Sitecore Support, the solution was quiet easy.

The error message tells you, that under default website, it cannot wind a dedicated path. After getting the information which physical path is used, just add under Default Website a virtual folder with exactly that mapping

Alias – Widgets
Path – C:\Program Files (x86)\Commerce Server 11\Widgets

2017-10-22 16_51_22-Internet Information Services (IIS) Manager

After applying that easy fix, the commerce server manager was now able to resolve that path and displaying the correct data.

2017-10-22 16_52_20-Commerce Server Manager  - [Console Root_Commerce Server Manager_Global Resource.png

 

Sitecore Commerce 8.2.1 – Property of Dropdownlist entry is displayed as single line text in Merchandise Manager

In this article I would like to describe a problem in commerce product model creation and editing these models. While implementation I got the task to create a new product model for our customer. I followed all the steps e.g. mentioned here to create a new product model.

At first everything seemed to work perfectly. I created the model and synced it with the Sitecore CMS. After synce every field was exactly how I defined it in the commerce server. After using the merchandise manager I accidentially found out that one type of field is not displayed correct in the merchandise manager. For my product variants I created a new Property as droplist Packaging Unit to differentiate my variants from each others. In the Merchandise Manager I created a new Variant and saw the following

2017-08-14 14_26_42-Testprodukt_Variante 1 - Merchandising Manager

This droplist is not displayed as a droplist, but as a simple single line text field. And I am also able to insert there any input I want to.

I directly checked the item directly in the content editor and found the following

2017-08-14 14_26_32-Content Editor

So as I initially said, everything was synced correctly and was created correctly. Only the merchandise manager displays and then saves this field wrong.

After contacting Sitecore, it was added as bug under the public reference number #30167. For further tracking of this issue just use this number. For now you can continue working or let the content authors work with the merchandise manager, because the system recoginzes after a save attempt, if the inserted value is not correct and proposes in the error screen the correct and supported entries.

2017-10-22 16_29_47-Test - MerchandisingManager