Shopping Cart in Online Store: Overview of Methods

The shopping cart is a temporary storage area where customers add products and services they intend to purchase. In the cart, customers can adjust the quantity of items, remove unwanted products, and view the total cost of their purchase. When the customer completes the purchase, the cart is linked to the order.

This section gathers methods for working with cart items in created orders.

Quick navigation: all methods

Linking the Cart to Other Objects

Order. Specify the order to which the cart is linked. The list of orders can be obtained using the sale.order.list method.

Products. Add products to the cart by specifying their identifiers. You can obtain identifiers using the following methods:

Currency. Choose the currency in which the price is specified. The list of currencies can be obtained using the crm.currency.list method.

Unit of Measurement. If you are adding a product to the cart that is not yet on the site, specify the code and name of the unit of measurement. This data can be obtained from the list of units of measurement using the catalog.measure.list method.

Linking Cart Item to Payment. Use the sale.paymentitembasket.* methods to specify which cart items have been paid for.

Shipment Table Part. Use the sale.shipmentitem.* methods to specify which cart items to ship.

Overview of Methods

Scope: sale

Who can perform the methods: depending on the method

Method

Description

sale.basketitem.add

Adds an item to the cart of an existing order

sale.basketitem.update

Modifies a cart item in an existing order

sale.basketitem.get

Retrieves information about a cart item in an order

sale.basketItem.list

Returns a set of cart items based on a filter

sale.basketitem.delete

Removes a cart item from an order

sale.basketitem.getFields

Returns available fields of a cart item

sale.basketitem.addCatalogProduct

Adds an item with a product or service from the catalog module to the cart of an existing order

sale.basketitem.updateCatalogProduct

Modifies a catalog product in an existing order

sale.basketItem.getCatalogProductFields

Returns available fields of a catalog product in the cart