Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

There are 2 cart items! There is the CartItem and the LegacyCartItem.

Template Object
view_cart.vmLegacyCartItem
single.vmCartItem

Why two? The view_cart.vm was the original checkout page and has been around for nearly 20 years. The single page checkout arrived a decade ago, and to avoid breaking thousands of carts, a new object was created to cater to that checkout page. Just be sure you refer to the right object below.

 

LegacyCartItem

Properties

 

 

 

Field

Type

Comment/Sample

amount

BigDecimal

total amount of item (unit cost * quantity)

autoOrderSchedule

string

if 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.

description

string

item description

descriptionWithBreaks

string

item description with newlines changed to <br> tags for easier display

discount

BigDecimal

discount, if any

formattedAmount

BigDecimal

formatted amount with currency symbols, commas, and periods

formattedDiscount

string

formatted discount with currency symbols, commas, and periods

hasDiscount

boolean

if true, the item has a discount. useful to show/hide table colums or divs

itemIndex

integer

the item position in the current cart.

merchantItemOid

integer

internal unique id of the item

options

Array of CartItemOption

 

an array of item options, if any

quantity

BigDecimal

quantity of item in the cart

remove

boolean

flag to instruct cart engine to remove this item. if remove is true, the item is removed. see view_cart.vm for usage example.

showArbitraryUnitCost

boolean

if true, the arbitrary unit cost should be displayed.

thumbnailHeight

integer

default is 80 (pixels)

thumbnailUrl

string

 

thumbnailWidth

integer

default is 80 (pixels)

viewUrl

string

the 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

Method

Returns

Parameters

Parameter Types

Comments/Sample

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

See Also

 

 

CartItem

 

Properties

Field

Type

Comment/Sample

Methods

Method

Returns

Parameters

Parameter Types

Comments/Sample

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

See Also

  • No labels