Hi,
Is it possible to change a OrderLineFieldValue in the cart without having the product to be added multiple times?
Im adding a value using:
var commentField = ol.OrderLineFieldValues.FirstOrDefault(x => x.OrderLineFieldSystemName == "CommentField"); if (commentField != null) { commentField.Value = "MyValue"; } ol.Save();
With the above the value gets saved on the orderline.
If I increase or decrease the quantity in the card - the existing orderline is update (quantity) - and the OrderLineValue is update - just as it should be.
(The orderlinefieldvalue is based/calculated on the quantity in the cart).
But if I add the exact same product from the productpage to the cart again - a new orderline is added with the same product.
I want to avoid that and just update the quantity and on top of that - change the OrderLineFieldValue based on the total quantity.
How is that possible?
DW 8.9.2.18