Commerce Server General - RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2006 > RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE
Ravi Shankar

2006-03-03, 6:18 pm

Here is the code (please verify as I'm doing this off the top of my head)

Dim oOGSO as OrderGroupSearchOptions
Dim oOGS as OrderGroupSearch

oOGSO = new OrderGroupSearchOptions()
oOGSO.FetchOrderFormInformation = true
oOGSO.Columns.Add("OrderGroup.[ordergroup_id]")
oOGSO.PageSize = 25 ' must

oOGS = new OrderGroupSearch(CommerceContext.Current.OrderSystem)
oOGS.UserID = CommerceContext.Current.UserID
oOGS.OrderNumber = <your order number> ' substitute with the order number

Dim oDSOrders as new Dataset()
oDSOrders = oOGS.Search(oOGSO)

'
' If there is an order as per your requirement then you should get a table
with ONE
' record

Dim sPOId as string =
oDSOrders.Tables(0).Rows(0).Columns(0).Value.ToString() ----- something like
this.. basically get the value of the first column of the first row of the
ONLY table in the dataset.

Dim oPOGUID as guid = new System.guid(sPOId)
Dim oUserGUID as guid = new System.guid(CommerceContext.Current.UserId)
Dim oPurchaseOrder as PurchaseOrder

oPurchaseOrders = CommerceContext.Current.OrderSystem.getPurchaseOrder _
(oUerGUID, oPOGUID)

Dim oCart as basket
oCart = CommerceContext.Current.OrderSystem.getBasket(oUserGUID)
oCart.Add(oPurchaseOrder)

'
' This should add the PO to the basket
' Hope this helps !!
--
Ravi Shankar


"Jeremy" wrote:
[vbcol=seagreen]
> could you show me how to use basket.Load - maybe some code? I cannot find it
> in the retail site nor can i find how to do it on the web. people just say
> use basket.load(purchaseorder) but nothing else.
>
> your help would really help.
>
> "Ravi Shankar" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com