CyberStore Documentation
GetShoppingCart

Returns the current Shopping Cart contents for the logged-in user.

 

GetShoppingCart Post Parameters

The GetShoppingCart operation has the following supported properties for posting queries:

Parameter

Description

ClientCode

A unique value assigned to your application after it is registered within the CyberStore Console > CyberStore Connect maintenance screen. You must include this value in your request.

SessionToken

A unique value assigned by the CyberStore application to a user’s unique session. It is created after a successful login to the website via the CyberStore login screen. You must include this value in your request. Information about how to receive and capture the SessionToken is described in more detail later in this document.

ClientSession_ID

A unique identifier created by the application that runs on your registered client application. You need to capture it and send it with your request. CyberStore Connect utilizes this value, combined with the SessionToken and ClientCode, to validate the authenticity of the request.

GetShoppingCart Query Results

When you submit a request to the GetShoppingCart operation, the response message is returned as an XML string. A query posted with the required, authenticated parameters returns results similar to the XML string below:

   
Example GetShoppingCart Query Results
Copy Code
<?xml version="1.0" encoding="utf-8"?>
<CyberStoreConnect>
  <Profile>
    <FirstName><![CDATA[Susan]]></FirstName>
    <LastName><![CDATA[Brown]]></LastName>
    <FullName><![CDATA[Susan Brown]]></FullName>
    <Username><![CDATA[sbrown@bikesblades.com]]></Username>
    <EmailAddress><![CDATA[sbrown@bikesblades.com]]></EmailAddress>
    <CustomerClass><![CDATA[Wholesaler]]></CustomerClass>
    <Customer><![CDATA[000002]]></Customer>
    <CustomerName><![CDATA[Bikes & Blades – North]]></CustomerName>
    <ViewList><![CDATA[Wholesaler View]]></ViewList>
  </Profile>
  <LineDetails>
    <LineDetail>
          <StockCode><![CDATA[A100]]></StockCode>
          <ItemName><![CDATA[15 Speed Mountain Bike Boys]]></ItemName>
          <ItemType><![CDATA[B]]></ItemType>
          <Quantity><![CDATA[1]]></Quantity>
          <UOM><![CDATA[EA]]></UOM>
          <UnitPrice><![CDATA[560.00]]></UnitPrice>
          <TotalPrice><![CDATA[560.00]]></TotalPrice>
          <UnitMass><![CDATA[10.000000]]></UnitMass>
          <TotalMass><![CDATA[10.000000]]></TotalMass>
          <UnitVolume><![CDATA[0.300000]]></UnitVolume>
          <TotalVolume><![CDATA[0.300000]]></TotalVolume>
          <ShipDays><![CDATA[0]]></ShipDays>
    </LineDetail>
    <LineDetail>
          <StockCode><![CDATA[A101]]></StockCode>
          <ItemName><![CDATA[15 Speed Mountain Bike Girls]]></ItemName>
          <ItemType><![CDATA[B]]></ItemType>
          <Quantity><![CDATA[2]]></Quantity>
          <UOM><![CDATA[EA]]></UOM>
          <UnitPrice><![CDATA[560.00]]></UnitPrice>
          <TotalPrice><![CDATA[1120.00]]></TotalPrice>
          <UnitMass><![CDATA[10.000000]]></UnitMass>
          <TotalMass><![CDATA[20.000000]]></TotalMass>
          <UnitVolume><![CDATA[0.300000]]></UnitVolume>
          <TotalVolume><![CDATA[0.600000]]></TotalVolume>
          <ShipDays><![CDATA[0]]></ShipDays>
    </LineDetail>
  </LineDetails>
  <SubTotal><![CDATA[1680.00]]></SubTotal>
  <EventResponse>
    <Module>API</Module>
    <Severity>0</Severity>
    <Number>000</Number>
    <Message>Success!</Message>
  </EventResponse>
</CyberStoreConnect>

 

The XML string above contains the following elements:

 

Element

Description

Profile

The information about the logged-in user’s session profile. See GetProfile for the complete definition of the Profile Results.

LineDetails

All detail lines in the Shopping Cart.

LineDetail

A single detail line in the Shopping Cart.

LineDetails/LineDetail/StockCode

The Stock Code for the detail line.

LineDetails/LineDetail/ItemName

The Item name for the detail line.

LineDetails/LineDetail/Quantity

The quantity of Items in the detail line.

LineDetails/LineDetail/UOM

The unit of measure for the detail line.

LineDetails/LineDetail/UnitPrice

The price per single Item in the detail line.

LineDetails/LineDetail/TotalPrice

The total price of all Items in the detail line (i.e., Quantity x Unit Price).

LineDetails/LineDetail/UnitMass

The weight of a single unit of the Item in the detail line.

LineDetails/LineDetail/TotalMass

The total weight of the detail line (i.e., Quantity x Unit Mass).

LineDetails/LineDetail/UnitVolume

The volume of a single unit of the Item in the detail line.

LineDetails/LineDetail/TotalVolume

The total volume of the detail line (i.e., Quantity x Unit Volume).

LineDetails/LineDetail/ShipDays

The Ship Days for the Item in the detail line.

SubTotal

The total price for all detail lines (i.e., line 1 TotalPrice + line 2 TotalPrice + …. + line z TotalPrice).

EventResponse

The details about the success or failure of the request including a module, severity, response number and message. A response number of ‘000’ with a message of “Success!” indicates that the request has been completed successfully.

EventResponse/Module

The CyberStore module that is responsible for the response. Typically “API” is returned.

EventResponse/Severity

The severity of the response.

Values = 0 to 9

EventResponse/Number

The value that uniquely identifies the specific response.

 

EventResponse/Message

The message returned by CyberStore that describes what occurred.

See Also

CyberStore Connect Response Number Codes