CyberStore Cart Web Service
MethodUpdateCartLine
CyberStore Cart Web Service > All Operations Resource Group : UpdateCartLine (Method)
Description
Updates an existing line in a cart.Updates an existing line in the shopper's cart. Introduced in v2.21
Request (UpdateCartLineSoapIn)

The request body is of type UpdateCartLine.

Request Body Parameters

NameDescriptionData Type
The identifier of the cart detail line to updatexml:int
The stock code for the cart detail line to updatexml:string
The quantity for the cart detail line to update.xml:int

The type of the unit of measure.

Valid options are as follows:

  • Stocking: "stocking", "STK", "S" or 1
  • Alternate: "alternate", "ALT", "A" or 2
  • Other: "other", "OTH", "O" or 3
  • Preferred: "preferred", "PREF", "P" or 0

    or
  • Specify the UOM by the unit label text prefixed with an @ sign. For example "@EA"

xml:anyType

An object with optional parameters.

Available parameters

  • Warehouse - a valid warehouse code, which when sent will request the line be shipped from the specified warehouse. Assumes the item is stocked in the specified warehouse.

xml:string
Example
The following example shows how to perform the web operation in CyberStore
// Example:
//     Update the line with ID 1003
//     changing the quantity to 2
//     including the warehouse of S as an option

MakeAJAXCall("Cart.UpdateCartLine", {
    ID: 1003,
    StockCode: 'B1208',
    Qty: 2,
    UOM: 0,
    Options: {
        Warehouse: 'S'
    }
}, console.log)
200 Response (UpdateCartLineSoapOut)

The response body is of type UpdateCartLineResponse.

Response Body Parameters

NameDescriptionData Type

A string value containing a JSON object containing the results of the cart, after the update and including a snapshot of the line as it was prior to the update.

 

{
    "Data": {
        "ItemCount": 2,
        "SubTotalAmount": 262.0,
        "Weight": 2.0,
        "Volume": 0.0,
        "LastUpdated": "2022-03-29T16:06:49.86",
        "SubTotal": "$262.00 ",
        "Detail": [{
            "Row": 1,
            "ID": 1003,
            "Item_ID": 632,
            "Parent_ID": -1,
            "StockCode": "B1208",
            "Description": "Seat Stay Tube",
            "Quantity": 2,
            "UOM": "EA",
            "UnitType": 1,
            "DefaultPriceAmount": 131.0,
            "CustomerPriceAmount": 131.0,
            "DiscountPriceAmount": 131.0,
            "WebPriceAmount": 131.0,
            "TotalPriceAmount": 262.0,
            "UnitWeight": 1.0,
            "UnitVolume": 0.0,
            "IsBackordered": false,
            "Warehouse": "S",
            "LastUpdated": "2022-03-29T16:31:19.293",
            "URL": "/ECommerce/product/b1208/seat-stay-tube",
            "Photo": "/Ecommerce/site/images/Photo1/B1208.jpg",
            "DefaultPrice": "$131.00 ",
            "CustomerPrice": "$131.00 ",
            "DiscountPrice": "$131.00 ",
            "WebPrice": "$131.00 ",
            "TotalPrice": "$262.00 "
        }],
        "OriginalDetail": {
            "OrderHeader_ID": 24784,
            "Item_ID": 632,
            "StockCode": "B1208",
            "ProductName": "Seat Stay Tube",
            "CartDate": "2022-03-29T16:31:10.813",
            "Quantity": 1,
            "UnitType": 1,
            "UnitLabel": "EA",
            "UnitMass": 1.0,
            "UnitVolume": 0.0,
            "UnitPrice": 131.0,
            "Price": 131.0,
            "DefaultPrice": 131.0,
            "CustomerPrice": 131.0,
            "DiscountPrice": 131.0,
            "ItemWarehouse": "S",
            "CustomData": "{}",
            "ModifyDate": "2022-03-29T16:29:35.047"
        }
    },
    "Result": {
        "Success": true,
        "Message": "The cart line has been updated successfully. There are 2 items in the Shopping Cart.",
        "ElapsedTime": "38 ms"
    }
}

xml:string
See Also
All Operations Resource GroupCyberStore Cart Web Service