Hi,
Im currently trying to add a fixed orderline type to a Order, when the Cart is rendered. It's due to minimumbuy - if the customer doesn't buy for at least 150dkk there should be added a orderline "minimumbuy" for the rest about up to 150dkk.
I am trying to do this, but the orderline doesn't seem to be added. When I debug it looks like it is :)
Im using [Subscribe(Ecommerce.Cart.Loaded)]
Any thought on what I could be missing?
var currency = new Currency();
currency.Code = currentCurrency;
var priceInfo = new PriceInfo(currency);
var addedPrice = minimumBuy - orderPrice;
priceInfo.PriceWithVAT = addedPrice;
var ol = Dynamicweb.Ecommerce.Services.OrderLines.Create(cart, "Mindstekøb", 1, priceInfo, OrderLineType.Fixed, "", "");
cart.OrderLines.Add(ol);
Dynamicweb.Ecommerce.Services.Orders.Save(cart);