Skip to Content
0
Former Member
Nov 27, 2008 at 05:25 PM

HELP - netpoint.api - how to get current shopping cart object by sessionid

28 Views

Hi,

I need to retrieve the current shopping cart object (NPOrder) by sessionid on the webtools site when the user is not logged in yet. I have tried these code. But items get mixed up on different sessions.

NPOrder myCart;

NPPartPricingMaster PriceList;

string userID = ((NPBasePage)Page).UserID;

string SessionID = ((NPBasePage)Page).SessionID;

PriceList = new NPPartPricingMaster("WebPrice");

myCart = new NPOrder(UserID, SessionID);

myCart.AddPart(Request.QueryString.Get("AddPartNo").ToString(),

System.Convert.ToInt32(Request.QueryString.Get("Quantity").ToString()), "", "", PriceList,

Request.QueryString.Get("tbNote").ToString());

myCart.Save();

Thanks for help!

David