03-03-06 11: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:
>
[ Post a follow-up to this message ]
|