Developer forum

Forum » Ecommerce - Standard features » Checkout on specific CartContext

Checkout on specific CartContext

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a solution where we need to use multiple cart contexts. Adding to each CartContext works correctly.

Listing the cart orderlines by CartContext seems to be only available outside of the Cart Module. in a page temp[late or a paragraph Template.

I know there is a Context that can be set on the cart module, but I was woindering if that context can be set from the template by passing some hidden field or from the API.

That would also help for checkout on that specific context.

Any other alternatives could work as well.

Thank you,
Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Are you trying to avoid having multiple checkout pages to handle the different cart contexts? That's how we solved it in the past because everything was different, from templates to settings.

 

If that's not your case, and you are using cart contexts to handle multiple potential carts, then why not have a "Checkout context" as a cart context. Then the user is managing their carts and they want to actually checkout, you would change the reference of that cartId to use the "Checkout context" instead.

 

Would that work for you?

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum