Home > Contents > Index >
cart:additem
Adds an order item to the shopping cart.
Syntax
<cart:additem name="cartname
" storeid="storeid
" [type="products"] id="assetid
" quantity="unitspurchased
" price="totalprice
" [list="orderitems
"] [merge="true|false"] [insertbefore="rowid
"] [varname="rowid
"]/>Parameters
name
(required)- Input parameter. Name of the cart object.
storeid
(required)- Input parameter. Positive integer, not more than eight digits, that identifies the store to Sites. This number is assigned by your Transact administrator.
type
(optional)- Input parameter. Type of item to add. The default is
Products
.
id (required)
- Input and output parameter. As input, asset id of the order item that is added to the cart on output.
quantity
(required)- Input parameter. Number of units of this item that the buyer is purchasing. If items are sold in packages, then
Quantity
should represent the number of packages, not the total number of items in those packages.
price
(required)- Input parameter. Total price of this product, specified as an integer or a number with two decimal places.
PRICE
cannot be negative,price
cannot hold a currency character such as a dollar sign ($), andprice
cannot hold a comma (,) as used in many European countries. For example, 42.99 is an acceptable value ofprice
, but $42.99 and 42,999 are not.
- For both tangible goods and digital goods, set
price
to be the total price of the item. Ifquantity
is greater than 1, thenprice
is the total price, not the price of an individual unit. For example, if you sell a gift set of three shirts for $60, you setquantity
to 3 andprice
to $60. You do not setPrice
to $20, the price of each individual shirt.
- For digital subscriptions, set
price
to be the price of each installment payment. For example, if a subscription costs $100, payable in four equal installments, you setprice
to 25.
list
(optional)- Input parameter. List of order item parameters for the item.
merge
(optional)- Input parameter. Boolean: whether to attempt to merge quantity, price with (possibly) existing item with the input
ID
(asset ID).
insertbefore
(optional)- Input parameter. Row identifier of the item before which to insert this item if no merge occurs. The default is to insert at end.
varname
(optional)- Input parameter. Row identifier for the item. This is always set by
additem
, not by the caller, and uniquely identifies the line item in the cart.
Description
See Order Item Parameters for individual item parameter names and values.
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.