November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
I'm not seeing the big picture here, but why don't you apply every discount first, then allow the customer to set the price based on that value? Then you can set the PlacedPrice to the LineItem if the price set is valid.
Nope. DefaultLineItemCalculator just aggregates the calculated values from what I can see.
The problem with having the discount being calculated by the promotion engine etc is that the calculations, discount limits and percentages are calculated based on the catalog price.
Are you certain the promotion engine is calculating based on the catalog price?
I was under the impression the cart is updated with the catalog price in a seperate step in the workflow prior to the discount calculations.
I would save the entered price to a custom meta field on the lineitem and attempt to write my own IPlacedPriceProcessor, the processor would then validate the custom meta price is larger than the catalog price and in that case set the PlacedPrice to the custom meta one.
I'm also missing the big picture a bit, but maybe you can use the solution Maris blogged about for adding a manual discount?
How do I best go about feeding a custom price into the discount/promotion calculation?
Hi.
I am working on a project where I need for the customer to be able to specify the price he/she is prepared to pay per LineItem where the catalog price is used as a lower limit. This is to be done only for select products.
The discounts and promotion engine are then to be applied, making it possible for the customer to enter an amount that is then lowered by a discount (e.g. a percentage).
How can I do this when the IPromotionEngine, IPlacedPriceProcessor etc all calculate their prices based on the price of the catalog. In the promotion engine etc there are no way of knowing which LineItem the price is calculated for and thus no way of obtaining the price from the LineItem instead of from the catalog.
How can I do this? Can I still use the promotion engine or do I need to perform the discounts entirely custom?
What is your recommendation?