Cart SFO

Properties

Field

Type

Comment/Sample

Methods

Method

Returns

Parameters

Parameter Types

Comments/Sample

addCoupon(code)

boolean

code

string

adds a coupon. True if successful.

addExpiringCoupon(code, expirationMillis)

boolean

code
expirationMillis

string
long

adds an expiring coupon. True if successful

addPricingTier(pricingTierName)

void

pricingTierName

string

adds a pricing tier to the cart

deleteCoupon(couponCode)

void

couponCode

string

deletes a specific coupon from the cart

deleteCoupons()

void

none

none

deletes all coupons from the cart

getCouponCodes(uniqueCodes)

Array of string

uniqueCodes

boolean

returns all coupons associated with this cart. If uniqueCoupons is true, only a unique set is returned.

getCurrencies()

Array of CartCurrency

none

none

returns an array of all available cart currencies

getCurrency()

CartCurrency

none

none

returns the cart currency

getCustomerProfile()

CustomerProfile

none

none

returns the cart customer profile or null if there is not one.

getCustomField1()

string

none

none

returns the custom field value

getCustomField2()

string

none

none

returns the custom field value

getCustomField3()

string

none

none

returns the custom field value

getCustomField4()

string

none

none

returns the custom field value

getCustomField5()

string

none

none

returns the custom field value

getCustomField6()

string

none

none

returns the custom field value

getCustomField7()

string

none

none

returns the custom field value

getItemCount()

string

none

none

returns the count of items in the cart, as a string

getItemCount()

string

none

none

returns the count of items in the cart, as a string, rounded up to the nearest int

getItems()

Array of CartItem

none

none

gets an array of all items in the cart

getLanguageIsoCode()stringnonenonegets the ISO 3-letter language code

getPricingTierNames()

Array of string

none

none

returns all the pricing tiers allowed to assign

getShippingHandlingAsBigDecimal()

BigDecimal

none

none

cart S&H as a BigDecimal

getShippingHandlingTotal()

string

none

none

cart S&H as a formatted string

getShippingHandlingTotalLocalized()

string

none

none

cart S&H as a formatted string, in the cart currency

getShipToCountryCode()

string

none

none

get the country code of the cart. If none specified, attempt to use geo location to find it.

getShipToCountryCode(useGeoLocationIfNotSpecified)

string

useGeoLocationIfNotSpecified

boolean

get the country code of the cart. If none specified, attempt to use geo location to find it, if desired.

getShipToPostalCode()

string

none

none

returns the ship to zip code, or an empty string if there is not one

getShipToState()

string

none

none

returns the ship to state, or an empty string if there is not one

getSubTotal()

string

none

none

cart subtotal as a formatted string

getSubTotalAsBigDecimal()

BigDecimal

none

none

cart subtotal as a BigDecimal

getSubTotalLocalized()

string

none

none

cart subtotal as a formatted string, in the cart currency

getTax()

string

none

none

cart tax as a formatted string

getTaxAsBigDecimal()

BigDecimal

none

none

cart tax as a BigDecimal

getTaxLocalized()

string

none

none

cart tax as a formatted string, in the cart currency

getTotal()

string

none

none

cart total as a formatted string

getTotalAsBigDecimal()

BigDecimal

none

none

cart total as a BigDecimal

getTotalLocalized()

string

none

none

cart total as a formatted string, in the cart currency

hasPricingTier(pricingTierName)

boolean

pricingTierName

string

true if the cart is associated with the given pricing tier

isLanguageIsoCode(string[] codes]booleancodesstring[]true if the cart's language ISO code is one of the ones passed in via the array

isLockedForQuote()

boolean

none

none

returns true if the shopping cart has been locked to allow a merchant to provide a quote for it.

isLoggedIn()

boolean

none

none

true if the cart has an active customer profile logged in

isPurchasing(String itemId)booleanitemIdStringtrue if the cart contains the specified item id

isShipToCountryCodeEuropean()

boolean

none

none

true if the country code is european

setCustomField(index, value)

void

index
value

integer
string

sets the custom field indicated by the index position

setCustomField1(value)

void

value

string

sets the custom field 1 value

setCustomField2(value)

void

value

string

sets the custom field 2 value

setCustomField3(value)

void

value

string

sets the custom field 3 value

setCustomField4(value)

void

value

string

sets the custom field 4 value

setCustomField5(value)

void

value

string

sets the custom field 5 value

setCustomField6(value)

void

value

string

sets the custom field 6 value

setCustomField7(value)

void

value

string

sets the custom field 7 value

 

See Also