Posted on 12/08/2020 12:34:55
Hi Nikolai,
The solution is using DW 9.6.5.
This is an example of what is in code - atleast some of the important stuff:
OrderLineService orderLineService = new OrderLineService();
OrderService orderService = new OrderService();
Order order = new Order();
order.IsCart = true;
// Set general information
order.PaymentMethodId = "PAY1";
order.CustomerAccepted = true;
order.ShopId = "SHOP1";
order.LanguageId = "LANG1";
order.CurrencyCode = "DKK";
order.CurrencyName = "DKK";
Product product = Dynamicweb.Ecommerce.Services.Products.GetProductByNumber(productNo.InnerText, true);
OrderLine orderLine = order.CreateOrderLine(product);
orderLine.Currency = currency;
orderLine.Quantity = Convert.ToDouble(qty.InnerText);
orderLineService.SetUnitPrice(orderLine, Convert.ToDouble(price.InnerText.Replace(".", ",")), true);
orderService.SetOrderComplete(order);
orderService.Save(order);
orderService.UpdateCartToOrder(order);