Could not get pipeline: commerce.carts.createOrResumeCart (domain: )

251 views Asked by At

I'm using Sitecore 7.2 and Commerce Server 11.0. When I ran below code to create a cart:

var cartServiceProvider = new CartServiceProvider();
// Create the request. 
var createCartRequest = new CreateOrResumeCartRequest("ShopName", "UserID");
// Call the service provider to get the cart 
var cart = cartServiceProvider.CreateOrResumeCart(createCartRequest).Cart;

then I got error: Could not get pipeline: commerce.carts.createOrResumeCart (domain: )

Anyone know how to fix that?

2

There are 2 answers

0
YUZ On

There is the following piece of code and explanation in the \App_Config\Include\CommerceServer\CommerceServer.Connectors.Carts.config

<!--
    NOTE: This CreateOrResumeCart Sitecore.Commerce pipeline has been removed as in CS, detecting newly created carts is not possible.
  -->
  <commerce.carts.createOrResumeCart>
      <patch:delete/>
  </commerce.carts.createOrResumeCart>

I guess this explains the exception.

0
Chris Auer On

Whenever I see an error that has (domain: ) in it, I usually solve it by clearing all the cache from my browser. I am not sure if it will work in this case, but it looks so familiar. Or you can just try it with Incognito mode in chrome.

Hope it helps.