We are on commerce 11.4, but have not migrated to the new order system.
I was wondering if it was possible to use the old order system (with CartHelper) with the new promotion system (where you set campaigns etc. under the "Marketing" tab)?
So far I am unable to apply any created item discounts to the cart. I thought it would be done automatically under-the-hood of EpiServer, but even after removing all of our custom workflows the full price of an item is added to the cart rather than the sale price.
I know the promotion was created properly because I can see the correct discount price when using:
promotionEngine.GetDiscountPrices(variation.ContentLink, currentMarket.GetCurrentMarket(), organization.GetPreferredCurrencyCode())
I've tried adding this code when adding to the cart:
promotionEngine.Run((IOrderGroup)cartHelper.Cart, new EPiServer.Commerce.Marketing.PromotionEngineSettings()); cartHelper.Cart.AcceptChanges();
I've tried adding the following to the ecf.app.config file:
<Features><add feature="WorkflowsVNext" state="Enabled" type="Mediachase.Commerce.Core.Features.WorkflowsVNext, Mediachase.Commerce"/></Features>
But the above didn't work.
If I add back in our custom workflow stuff hooked into CartValidateWorkflow, the lineItem.Discounts is empty from the lineItem from the orderForm.
I have also tried cloning the latest version of the QuickSilver repo that still had the old order system (7c4f5afccd9966c68fe65872f6456a5cde64379a on August 12), however this commit unfortunately is uses the old promotion system.
Any advice would be greatly appreciated!
Thanks,
Jordan