Posted on 22/02/2021 15:57:39
Hi Nicolai,
I was trying to avoid using contexts because it seems more complicated to set the current cart. Using Cart commands seemed a bit more straightforward.
CartContext was out first approach but it seems more complicated to switch the information about carts without changing a lot in the templates.
Our requirement is that we need to separate one of the product types in a separate order.
I can easily decide to add it to a separate OrderContext but I have some trouble displaying information in Minicart or Cart without separating the pages and templates.
I need to have the same order flow for all product types.
With CartCommands it seemed that I can simply set a Cart as "Active" using "setcart":
<a href='@baseurl&cartcmd=setcart&CartID=@cart.GetString("Ecom:Order.ID")'>Set Cart</a>
And this would change what I see in the minicart and order flow, which means I can already use the current templates and setup.
I don't know if I can do the same with OrderContext. If I can, this would be my first option indeed.
What do you think?
Thank you,
Adrian