Updating a property on a finalized order, falls back to original value after iis restart
Hey there I have an issue for something that I keep banging my head against.
So i have a finalizedorder where i want to update a property upon.
So I this:
order.Properties.AddOrUpdate("music", "just some string");
This property had a value before i just want to update it. Afterwards check the order again and the property value is actually updated. BUT then i do an iis restart(hitting web.config or whatever floats IIS boat) and then fetching the same order and the value on the property is back to what it was original. What is this voodoo :)
The order is saved automatically when using the Razor or JavaScript API (TC.AddOrUpdateOrderProperties, TC.RemoveOrderLine, etc.), but you need to do it manually when making changes directly on the order object.
This allows you to perform multiple changes in a single Save.
order.PaymentInformation.PaymentMethodId = 1;
order.Properties.AddOrUpdate("music", "just some string");
order.Save();
Updating a property on a finalized order, falls back to original value after iis restart
Hey there I have an issue for something that I keep banging my head against.
So i have a finalizedorder where i want to update a property upon.
So I this:
This property had a value before i just want to update it. Afterwards check the order again and the property value is actually updated. BUT then i do an iis restart(hitting web.config or whatever floats IIS boat) and then fetching the same order and the value on the property is back to what it was original. What is this voodoo :)
TC v. 3.2.4 and Umbraco v. 7.5.14
Hi Rasmus,
It looks like you might be missing a order.Save() after changing the property :)
Is that normally needed when I call it specifically on the list?
The order is saved automatically when using the Razor or JavaScript API (TC.AddOrUpdateOrderProperties, TC.RemoveOrderLine, etc.), but you need to do it manually when making changes directly on the order object.
This allows you to perform multiple changes in a single Save.
Thanks for explaing :)
is working on a reply...