A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
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