Allow prices with value 0

Vote:
 

Hi!

If the price of a cart item is 0, it will be removed by the CartValidate workflow. Is there some way to prevent this?

I don't want to exclude ValidateLineItemsActivity entirely, since there's so many other things going on in that validation step.

Running EPi commerce 9.18.

#152551
Aug 25, 2016 10:54
Vote:
 

You can always get the Workflow project and 

- Either update ValidateLineItemsActivity to skip removing items with price = 0

- Or update OrderGroupActivityBase.GetItemPrice to not return null for item with price = 0

then build it and replace the default one.

If you don't want to customize the workflow, then perhaps make your item a gift item.

#152554
Aug 25, 2016 11:09
Vote:
 

@Quan

The sane way to customize a workflow would be to override some method - but that's not an option since neither ValidateItems nor GetItemPrice are overridable. What do you mean by "get the Workflow project"?

#152555
Aug 25, 2016 11:17
Vote:
 

The workflow project is open source and available for download at: http://world.episerver.com/download/Items/Episerver-Commerce/episerver-commerce-9-tools-and-code-samples/

#152556
Aug 25, 2016 11:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.