简体   繁体   中英

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

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM