4

While setting fulfilment to the cart line whenever there is one product in the cart, getting the below error even I had selected all required fulfilment options in Fulfillment Configuration for the respective site in Commerce Control Panel and triggered Ensure\Sync default content path, synced content item or sync content path API from the 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 the ValidateCartLinesFulfillment block ISetCartLinesFulfillmentPipeline pipeline there is an if condition that checks cart line count is equals one and then added the above error message.

Below is the screenshot of the code from the ValidateCartLinesFulfillment block. ValidateCartLinesFulfillment

What does this code block is meant for?

2 Answers 2

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 and acknowledge you have read our privacy policy.

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