Skip to main content
Reference

CartItem SFO

note
FieldTypeComment/Sample
amount[BigDecimal](./bigdecimal-sfo.md)total amount of item (unit cost * quantity)
autoOrderSchedulestringif the item is an auto order and the customer has chosen a schedule, this field will contain it. this field is modified later in the checkout stream.
descriptionstringitem description
descriptionWithBreaksstringitem description with newlines changed to
tags for easier display
discount[BigDecimal](./bigdecimal-sfo.md)discount, if any
formattedAmount[BigDecimal](./bigdecimal-sfo.md)formatted amount with currency symbols, commas, and periods
formattedDiscountstringformatted discount with currency symbols, commas, and periods
hasDiscountbooleanif true, the item has a discount. useful to show/hide table colums or divs
highlightbooleanif true, this item should be highlighted for some reason
itemIndexintegerthe item position in the current cart.
merchantItemOidintegerinternal unique id of the item
merchantItemIdstringitem id
options[CartItemOption](./cartitemoption-sfo.md)[ ]an array of item options, if any
quantity[BigDecimal](./bigdecimal-sfo.md)quantity of item in the cart
removebooleanflag to instruct cart engine to remove this item. if remove is true, the item is removed. see view_cart.vm for usage example.
showArbitraryUnitCostbooleanif true, the arbitrary unit cost should be displayed.
thumbnailHeightintegerdefault is 80 (pixels)
thumbnailUrlstring
thumbnailWidthintegerdefault is 80 (pixels)
viewUrlstringthe url of viewing this item. this points to the catalog page for the item, if there is one. check this value for null before automatically creating a link to it.

Methods

MethodReturnsParametersParameter TypesComments/Sample

See Also

CartItem

Properties

FieldTypeComment/Sample
amountstringnotice this is a formatted string with currency symbols
arbitraryUnitCoststringif an arb. cost is in place, this is the value.
descriptionstring
discountstringnotice this is a formatted string with currency symbols
itemIndexintegerthe item position in the current cart.
MethodReturnsParametersParameter TypesComments/Sample
getItem()[Item](./item-sfo.md)returns the underlying Item. While CartItem contains information specific to the current shopping cart (quantity in cart, etc), this Item object contains the general item information.

See Also

Was this page helpful?