Developer forum

Forum » Development » GetCart in API by CartContext

GetCart in API by CartContext

Dimitrij Jazel
Reply

Hi Guys,

Normally I am using THIS to get my cart:

var cart = new Order { IsCart = true, LanguageID = Dynamicweb.eCommerce.Common.Context.LanguageID };

But on this particular solution I am using Multiple CartContext.

How can I be sure that I got my Cart in the right context?

 

Or is there a way to reach the cart by Context ID?

 

/Dmitrij


Replies

 
Nicolai Pedersen
Reply

Set the CartContext on the Context object and then call the cart property - it will look at the current context.

BR Nicolai

 

You must be logged in to post in the forum