Access and modify the shopping cart of the current visitor.
Click a method name to copy it.
Adds a product to the shopping cart
product_id => The id of the product to add to the cart product_quantity => The quantity to add to the cart product_order_options_user => User selected options when ordering a product product_price => Price disable_merge => When true, if an identical product already exists in the cart, no merge will occur bought_for_contact_id => Allows the product to be linked to a different contact product_title => Used only if no product_id set product_sales_description => Sales invoice description )
Returns the shipment items
Returns the shopping cart as an array with the details of the products, calculated tax and shipping
Products in shopping cart
Returns any comments the customer may have on their order
Returns the number of item rows in the shopping cart
Returns the total quantity of products in the shopping cart
Number of products
Returns the country of the contact uses this cart
Returns the current currency id
Returns an array of discounts for this order
Determines if the the current cart is used from an admin or public page.
This should be set to true on any admin page using the cart.
Returns whether or not the 'guest checkout' option is disabled for cart.
This is derived from the products in the cart.
Returns whether shipping is required for the products currently in the cart
Returns whether the cart is submittable or not
Retrieves the order minimum value as configured in the config item
Returns the payment method used when the order is processed
Retrieves the ordered quantity for a specific product for a specific contact
Returns a column of the orders shipping details
Returns an array of any errors encountered when calculating shipping
Returns the configuration options for the shipping method
Returns the page of the recommended step in the ordering process
Check if the cart has products in it
Check if the contact is currently logged in
Check for all the required fields
Check if shipping is required
Returns the total dollar value of the items in the shopping cart
Returns the dollar value total of just the products in the cart
Total for products
Returns the dollar value total of the shipping
Returns the dollar value total tax for the items in the cart
Returns the label for the tax rate - eg: 'GST'
Returns the tax rate - eg: '10%'
Returns the total weight for the cart.
Returns whether the cart has free shipping
Returns whether the cart has discounts
Returns whether or not a product is in the cart
Returns whether or not a product has been added to the cart
Adds a product to the cart with quantity $iQuantity
If the product already exists in the cart, the quantity is increased by $iQuantity
Removes all the items from the cart.
Removes all items in the cart that do not have quantity
Removes all of a particular product from the cart
Renders any extra pricing information such as discounts or payment method hooks
Sets any comments the customer may have on their order
Sets the context of the contact who owns the cart
Note: Setting this value only persists for the length of the current request
When set to true, the invoice will be created on the contact's company on cart completion
Shipping details array
Updates a row in the cart to have a different quantity / options
If the product already exists in the cart, the quantity is set to $iQuantity
Product order options
The following fields are used when retrieving and saving entities.