Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDERS - Commerce server
This is a discussion on Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDERS - Commerce server ; Please help, i keep seeing Basket.Load but cannot find it. I want to update
existing orders but i DO NOT want to overwrite one's existing cart if they
have one. How do i do this. I want to update shipping ...
-
Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDERS
Please help, i keep seeing Basket.Load but cannot find it. I want to update
existing orders but i DO NOT want to overwrite one's existing cart if they
have one. How do i do this. I want to update shipping and billing address,
cc info and line items qty.
PLEASE HELP
-
RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDERS
Hi Jeremy,
Basket.Load is to create an instance of the user's basket based on what is
stored in the Database. Basket.Add on the other hand is used to add the
contents of a OrderTemplate or PurchaseOrder into the existing user basket.
If you're using Retail2002 site then you'll be able to locate the
Basket.Load call in the TransactionContext Class
otherwise Basket.Load can
be found in the documentation at
http://msdn.microsoft.com/library/?u...asp?frame=true
If you do not want to override the existing cart then you should create an
OrderTemplate, move the contents of the cart into that OrderTemplate, Save
it. Clear the basket, load the PO, make modifications, save the PO, clear the
cart, load the OrderTemaplate, save the basket & delete the OrderTemplate 
Simple Huh ?
--
Ravi Shankar
"Jeremy" wrote:
> Please help, i keep seeing Basket.Load but cannot find it. I want to update
> existing orders but i DO NOT want to overwrite one's existing cart if they
> have one. How do i do this. I want to update shipping and billing address,
> cc info and line items qty.
>
> PLEASE HELP
-
RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE
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:
> Hi Jeremy,
>
> Basket.Load is to create an instance of the user's basket based on what is
> stored in the Database. Basket.Add on the other hand is used to add the
> contents of a OrderTemplate or PurchaseOrder into the existing user basket.
>
> If you're using Retail2002 site then you'll be able to locate the
> Basket.Load call in the TransactionContext Class
otherwise Basket.Load can
> be found in the documentation at
> http://msdn.microsoft.com/library/?u...asp?frame=true
>
> If you do not want to override the existing cart then you should create an
> OrderTemplate, move the contents of the cart into that OrderTemplate, Save
> it. Clear the basket, load the PO, make modifications, save the PO, clear the
> cart, load the OrderTemaplate, save the basket & delete the OrderTemplate 
> Simple Huh ?
> --
> Ravi Shankar
>
>
> "Jeremy" wrote:
>
> > Please help, i keep seeing Basket.Load but cannot find it. I want to update
> > existing orders but i DO NOT want to overwrite one's existing cart if they
> > have one. How do i do this. I want to update shipping and billing address,
> > cc info and line items qty.
> >
> > PLEASE HELP
-
RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE
Silly me
I should have started off by asking you which version of Commerce
Server you're using ? If you're dealing with the "Retail" site then I presume
you're on Commerce Server 2000. In which case you should look for LoadBasket
call in the basket (or cart).asp
Otherwise in CS2002 look at
http://msdn.microsoft.com/library/?u...asp?frame=true
for a code example on how to work with the basket object on an aspx page.
If you're working with the Retail2002 site then the basket operations are
documented as part of the "Transactions" Control at
http://msdn.microsoft.com/library/?u...asp?frame=true
--
Ravi Shankar
"Jeremy" wrote:
> 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:
>
> > Hi Jeremy,
> >
> > Basket.Load is to create an instance of the user's basket based on what is
> > stored in the Database. Basket.Add on the other hand is used to add the
> > contents of a OrderTemplate or PurchaseOrder into the existing user basket.
> >
> > If you're using Retail2002 site then you'll be able to locate the
> > Basket.Load call in the TransactionContext Class
otherwise Basket.Load can
> > be found in the documentation at
> > http://msdn.microsoft.com/library/?u...asp?frame=true
> >
> > If you do not want to override the existing cart then you should create an
> > OrderTemplate, move the contents of the cart into that OrderTemplate, Save
> > it. Clear the basket, load the PO, make modifications, save the PO, clear the
> > cart, load the OrderTemaplate, save the basket & delete the OrderTemplate 
> > Simple Huh ?
> > --
> > Ravi Shankar
> >
> >
> > "Jeremy" wrote:
> >
> > > Please help, i keep seeing Basket.Load but cannot find it. I want to update
> > > existing orders but i DO NOT want to overwrite one's existing cart if they
> > > have one. How do i do this. I want to update shipping and billing address,
> > > cc info and line items qty.
> > >
> > > PLEASE HELP
-
RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE
i am using cs2002. i am going to try like you suggested with a temp and save
the basket and all of that. thanks for your help. if you have any other
suggestions, i would appreciate it.
"Ravi Shankar" wrote:
> Silly me
I should have started off by asking you which version of Commerce
> Server you're using ? If you're dealing with the "Retail" site then I presume
> you're on Commerce Server 2000. In which case you should look for LoadBasket
> call in the basket (or cart).asp
>
> Otherwise in CS2002 look at
> http://msdn.microsoft.com/library/?u...asp?frame=true
> for a code example on how to work with the basket object on an aspx page.
>
> If you're working with the Retail2002 site then the basket operations are
> documented as part of the "Transactions" Control at
> http://msdn.microsoft.com/library/?u...asp?frame=true
> --
> Ravi Shankar
>
>
> "Jeremy" wrote:
>
> > 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:
> >
> > > Hi Jeremy,
> > >
> > > Basket.Load is to create an instance of the user's basket based on what is
> > > stored in the Database. Basket.Add on the other hand is used to add the
> > > contents of a OrderTemplate or PurchaseOrder into the existing user basket.
> > >
> > > If you're using Retail2002 site then you'll be able to locate the
> > > Basket.Load call in the TransactionContext Class
otherwise Basket.Load can
> > > be found in the documentation at
> > > http://msdn.microsoft.com/library/?u...asp?frame=true
> > >
> > > If you do not want to override the existing cart then you should create an
> > > OrderTemplate, move the contents of the cart into that OrderTemplate, Save
> > > it. Clear the basket, load the PO, make modifications, save the PO, clear the
> > > cart, load the OrderTemaplate, save the basket & delete the OrderTemplate 
> > > Simple Huh ?
> > > --
> > > Ravi Shankar
> > >
> > >
> > > "Jeremy" wrote:
> > >
> > > > Please help, i keep seeing Basket.Load but cannot find it. I want to update
> > > > existing orders but i DO NOT want to overwrite one's existing cart if they
> > > > have one. How do i do this. I want to update shipping and billing address,
> > > > cc info and line items qty.
> > > >
> > > > PLEASE HELP
-
RE: Is Basket.Load and Basket.Add the same?? CHANGE EXISTING ORDE
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:
> 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:
>
> > Hi Jeremy,
> >
> > Basket.Load is to create an instance of the user's basket based on what is
> > stored in the Database. Basket.Add on the other hand is used to add the
> > contents of a OrderTemplate or PurchaseOrder into the existing user basket.
> >
> > If you're using Retail2002 site then you'll be able to locate the
> > Basket.Load call in the TransactionContext Class
otherwise Basket.Load can
> > be found in the documentation at
> > http://msdn.microsoft.com/library/?u...asp?frame=true
> >
> > If you do not want to override the existing cart then you should create an
> > OrderTemplate, move the contents of the cart into that OrderTemplate, Save
> > it. Clear the basket, load the PO, make modifications, save the PO, clear the
> > cart, load the OrderTemaplate, save the basket & delete the OrderTemplate 
> > Simple Huh ?
> > --
> > Ravi Shankar
> >
> >
> > "Jeremy" wrote:
> >
> > > Please help, i keep seeing Basket.Load but cannot find it. I want to update
> > > existing orders but i DO NOT want to overwrite one's existing cart if they
> > > have one. How do i do this. I want to update shipping and billing address,
> > > cc info and line items qty.
> > >
> > > PLEASE HELP
Similar Threads
-
By Application Development in forum Commerce server
Replies: 3
Last Post: 10-11-2005, 10:13 AM
-
By Application Development in forum Commerce server
Replies: 1
Last Post: 02-16-2005, 01:01 PM
-
By Application Development in forum Commerce server
Replies: 8
Last Post: 02-16-2005, 11:41 AM
-
By Application Development in forum Commerce server
Replies: 1
Last Post: 09-28-2004, 03:58 PM
-
By Application Development in forum Commerce server
Replies: 0
Last Post: 06-28-2004, 07:38 PM