We use the Cart and related objects to store state during our checkout flow. I would like to use the OrderForm.Payment to temproary stor which payment type the user has selected, but there seems to be a problem removing the Payment entries from the list.
Hi all
We use the Cart and related objects to store state during our checkout flow. I would like to use the OrderForm.Payment to temproary stor which payment type the user has selected, but there seems to be a problem removing the Payment entries from the list.
I have tried with this code:
orderForm.Payments.Clear();
orderForm.AcceptChanges();
This does not work. When I load the cart again, any old Payment objects still exist in the collection.
I have resorted to this code instead, and this seems to work:
foreach (MetaObject mo in orderForm.Payments)
{
mo.Delete();
}
orderForm.AcceptChanges();
Is this a bug, or am i doing something wrong?
Regards
Anders