About manual discount, we support it only for line item. It is not supported for shipment/order level. That's from the old promotion system. As you can see, in Commerce Manager, you can add manual discount for line items when adding item to the cart/order and that's only place where you can add manual discount in Commerce Manager.
That's sad. It is a common requirement for admins to be able to set any amount/percent discounts to the whole order. As it was not working in Commerce Manger, we are implementing it in the separate module.
Any other options to achieve this? Also, can I rely on the manual discounts for line items in future?
Yes, the manual discounts for line items will still be there. It's active feature and we have no plan to change/replace it.
But that's a good point. Manual order/shipment-level discount would be a nice addition. I can imagine the scenarios where that would make senses. No promises yet, but we will look into it.
I have a suggestion you could try, it's not super straight forward but here it goes:
From the user interface you could set the manually discounted value on your own meta field ("ManualDiscount" or something) on the desired level (Shipment, OrderForm, OrderGroup), instead of creating PromotionInformation at that point.
Then you can add code that runs AFTER you run the promotion engine to create the promotioninformation for the manual discount, based on the data stored in your meta field.
You'll have to manually add the discount amount to the OrderForm / Shipment as well after the fact since the promotion enginge won't do it for you.
We do something similar in a project, but the discount is dynamically generated instead of manually set. Since we make use of workflows it is done in the CalculateDiscountVNextActivity, right after the PromotionEngine.Run() is called.
Actually, I wrote a blog post yesterday about manual order discount: http://marisks.net/2017/04/09/manual-order-discount/
Nice approach with doing it in a processor. :)
Want some feedback on your implementation example?
I am trying to add a manual order promotion same way as it is possible to add a manual line item promotion.
For a line item this works:
I tried to add a manual discount for the order form same way:
But after I run promotions this way:
Episerver removes my manual order promotion and does not apply it.
What is the correct way to add manual promotion to the whole order?