3

While setting fulfillment to cart line whenever there is one product in cart, getting below error even i had selected all required fulfillment option in Fulfillment Configuration for respective site in Commerce Control Panel and triggered Ensure\Sync default content path, sync content item or sync content path api from postman and cleared cache multiple times.

Error: Fulfillment 'B146622D-DC86-48A3-B72A-05EE8FFD187A' is not a fulfillment permitted for cart '{a6ed1d70-d982-4abe-b913-2a89c1587eeb}'.

After investigating found out that,inside ValidateCartLinesFulfillment block ISetCartLinesFulfillmentPipeline pipeline there is if condition that checks cart line count is equals one and then added the above error message.

Below is the screen shot of code from ValidateCartLinesFulfillment block. ValidateCartLinesFulfillment

What does this code block is meant for?

1

I could not figure out the intention of that code but we can overcome this error by removing ValidateCartLinesFulfillment block from ISetCartLinesFulfillmentPipeline pipeline.

Below is the code snippet that can be added configuresitecore.cs file in sitecore commerce plugin to remove the ValidateCartLinesFulfillment block.

enter image description here

1

If I guess your requirement is correct, you should need to have fulfilments added for each cartline. Now coming to the issue, If you do have only 1 Product in the cart, you can add it to CartFulfilment itself instead of CartLineFulfilment. And that is why Sitecore might also have considered the same that means if there is only 1 product in the cart then add Fulfilment to Cart itself instead adding specific to Cartline. So no need to remove the Pipeline block for validating the cartline fulfilment.

I dont think this can be considered as a bug from Commerce side.

Hope this solves your problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.