Item SFO

Properties

Field

Type

Comment/Sample

Methods

 

Method

Signature

Comments/Sample

attrDefinitionList

DefinitionList attrDefinitionList(string key)

returns the definition list for the given key value

attrSimpleList

SimpleList attrSimpleList(string key)

returns the simple list for the given key value

getAssignedGroups

ProductGroup[ ] getAssignedGroups()

returns not only the parent group, but all the Product Groups (Group Pages) to which this item is assigned to

getAttribute

string getAttribute(string attributeName)

 

getAttributeI18Nstring getAttributeI18N(string attributeName)returns the attribute, translated into the customer's desired language.
getAttributeI18NHtmlLangstring getAttributeI18NHtmlLang(string attributeName)returns the HTML lang attribute to be usd on the surround DOM element to tell search engines about how the content was translated.

getAttributes

ItemAttribute[ ] getAttributes(string type)

type is optional. Calling this with no parameters returns all attributes

getAttributeValue

string getAttributeValue(string attributeName)

same as getAttribute except it returns an emtpy string instead of null if the attribute does not exist

getAttributeValueI18Nstring getAttributeValueI18N(string attributeName)same as getAttributeValue, but translates the content into the customer's desired language.
getAttributeValueI18NHtmlLangstring getAttributeValueI18NHtmlLang(string attributeName)returns the HTML lang attribute to be usd on the surround DOM element to tell search engines about how the content was translated.

getAvailableQuantity

integer getAvailableQuantity()

 

getAvailableQuantityString

string getAvailableQuantityString()

 

getBarcode

string getBarcode()

 

getCanonicalPath

string getCanonicalPath()

the canonical url of this item display page. see also getPath()

getCanonicalURIstring getCanonicalURI()this canonical URL of this item's display page. Recommend using this vs getCanonicalPath(). See also getURI().

getCaseItems

ItemCase[ ] getCaseItems()

returns all the cases (large packs of this item) that are available for purchase. for example, a single can of coke might have two cases: a six pack, and a 20 pack.

getCOGS

string getCOGS()

returns the Cost of Goods Sold

getCost

string getCost(integer quantity)

quantity is optional. If omitted, 1 is assumed

getCostAsBigDecimal

BigDecimal getCostAsBigDecimal(integer quantity)

quantity is optional. If omitted, 1 is assumed

getCostLocalized

string getCostLocalized(integer quantity)

String getCostLocalized(int quantity, boolean totalCost)

returns cost in local currency. quantity is optional. If omitted, 1 is assumed

returns cost multiplied by the quantity. Optional. If omitted, 1 is assumed

getCostLocalizedAsBigDecimal

BigDecimal getCostLocalizedAsBigDecimal()

local currency code

getCostLocalizedCurrencyCode

string getCostLocalizedCurrencyCode

returns the currency code of the item

getCurrencyCode

string getCurrencyCode()

 

getDefaultMultimedia

ItemMultimedia getDefaultMultimedia(string code)

 

getDescription

string getDescription()

 

getDescriptionHtmlLangstring getDescriptionHtmlLang()returns the HTML lang attribute that should be used on the DOM element surrounding the description to tell search engines how the content was translated.

getDescriptionNoEscape

string getDescriptionNoEscape()

 

getEbayAuctionId

string getEbayAuctionId()

returns null if no auction for this item

getEbayAuctionURL

string getEbayAuctionURL()

 

getEbayListingPrice

string getEbayListingPrice()

 

getEta

string getEta()

if the item has an ETA, return it, else return null

getExtendedDescription

string getExtendedDescription()

 

getExtendedDescriptionNoEscape

string getExtendedDescriptionNoEscape()

 

getFacebookLikeButton

string getFacebookLikeButton(string layoutStyle, integer width, boolean sendButton, boolean showFaces, string verb, string colorScheme)

parameters are optional. If you include any parameters, include them all. If you omit all parameters, the following defaults are used: layoutStyle="standard", width=450, sendButton=true, showFaces=true, verb="like", colorScheme="light"

getFacebookShareButton

string getFacebookShareButton()

 

getFreightClass

string getFreightClass()

 

getGooglePlusButton

string getGooglePlusButton(string annotationType, integer width, integer height, string alignment)

parameters are optional. If you include any parameters, include them all. If you omit all parameters, the following defaults are used: annotationType="bubble", width=0, height=20, alignment="left"

getHeight

string getHeight()

returns the height and unit of measure

getImageURL

string getImageUrl()

 

getInternalInventoryByDistributionCenter

string getInternalInventoryByDistributionCenter

returns back a bracketed string of dc code: inventory for this item

getKitComponents

ItemKitComponent[ ] getKitComponents()

 

getLength

string getLength()

returns the length and unit of measure

getMadeToOrderLeadTimeinteger getMadeToOrderLeadTime()If the item is made to order, then this is the number of days that it takes to produce the product before it can ship.

getManufacturerName

string getManufacturerName()

 

getManufacturerSKU

string getManufacturerSKU()

 

getManufacturerSuggestedRetailPriceLocalized

string getManufacturerSuggestedRetailPriceLocalized()

 

getManufacturerSuggestedRetailPriceLocalizedAsBigDecimal

BigDecimal getManufacturerSuggestedRetailPriceLocalizedAsBigDecimal()

 

getManufacturerSuggestedRetailPriceLocalizedAsCurrency

Currency getManufacturerSuggestedRetailPriceLocalizedAsCurrency()

 

getMAP

string getMAP(boolean costIfNotSpecified)

returns the Minimum Advertised Price. If costIfNotSpecified is true, and this item has no MAP, then the cost is returned instead. costIfNotSpecified is optional and may be omitted altogether

getMAPLocalized

string getMAPLocalized()

same as getMAP, but returns back a formatted string in the localized currency

getMAPLocalizedCurrency

Currency getMAPLocalizedCurrency()

same as getMAP, but returns back a Currency object in the localized currency

getMaximumQuantity

integer getMaximumQuantity()

 

getMerchantItemID

string getMerchantItemID()

 

getMinimumQuantity

integer getMinimumQuantity()

 

getMSRP

string getMSRP(boolean costIfNotSpecified)

returns the Manufacturer Suggested Retail Price. If costIfNotSpecified is true, and this item has no MSRP, then the cost is returned instead. costIfNotSpecified is optional and may be omitted altogether

getMSRPPriceBreak

string getMSRPPriceBreak()

returns the difference between MSRP and the item best price

getMultimedia

ItemMultimedia getMultimedia(string type)

type is the multimedia type: Image, Video. type is optional

getMultimediaByCode

ItemMultimedia getMultimediaByCode(string code)

 

getMultimediaByFilename

ItemMultimedia getMultimediaByFilename(string filename)

 

getMultimediaDefaultFirst

ItemMultimedia[ ] getMultimediaDefaultFirst(string type)

 

getOptionByName

ItemOption getOptionsByName(string name)

 

getOptionMatrixJsonstring getOptionMatrixJson()returns back a complex json object for use with the catalog.js script. see Modifying Item Variations in a StoreFront

getOptions

ItemOption[ ] getOptions()

 

getParent

ProductGroup getParent()

 

getPath

string getPath()

the relative url of this item display page

getPinterestPin

string getPinterestPin(boolean advanced)

 

getPricingTiers

PricingTier[ ] getPricingTiers()

gets a list of all pricing tiers for this item

getRegularCost

string getRegularCost(integer quantity)

quantity is optional. If omitted, 1 is assumed

getRegularCostAsBigDecimal

BigDecimal getRegularCostAsBigDecimal(integer quantity)

quantity is optional. If omitted, 1 is assumed

getRegularCostLocalized

string getRegularCostLocalized(integer quantity)

returns Regular cost in local currency. quantity is optional. If omitted, 1 is assumed

getRelatedItems

Item[ ] getVolumeDiscounts()

 

getReviewFilter

string getReviewFilter()

returns the ItemReviewFilter

getReviewFilterAsJson

string getReviewFilterAsJson()

returns the ItemReviewFilter in json format

getReviewCountint getReviewCount()returns the number of approved reviews for this item.

getReviewOverall

BigDecimal getReviewOverall()

 

getReviewOverallAsHtml

string getReviewOverallAsHtml(string[ ] snippets)

the snippets array should contain 5 snippets for the review: zero, quarter, half, three/fourths, and full. The overall review is compared and the appropriate snippet is returned

getReviewOverallAsImages

string getReviewOverallAsImages(string[ ] images)

the images array should contain 5 imges. The appropriate one is returned. If the array is missing any or all values, defaults are used.

getReviewOverallAsRectangles

string getReviewOverallAsRectangles()

 

getReviewOverallAsStars

string getReviewOverallAsStars()

 

getReviews

ItemReview[ ] getReviews()

returns all product reviews

getReviewsAsJson

string getReviewsAsJson()

returns an array of ItemReview in json format

getReviewSummary

ItemReviewSummary getReviewSummary()

returns a summary of customer reviews

getReviewSummaryAsJson

ItemReviewSummary getReviewSummaryAsJson()

returns a summary of customer reviews in json format

getReviewUrl

string getReviewUrl()

relative url of the product review page

getSaleCost

string getSaleCost(integer quantity)

quantity is optional. If omitted, 1 is assumed

getSaleCostAsBigDecimal

BigDecimal getSaleCostAsBigDecimal(integer quantity)

quantity is optional. If omitted, 1 is assumed

getSaleCostLocalized

string getSaleCostLocalized(integer quantity)

returns sale cost in local currency. quantity is optional. If omitted, 1 is assumed

getSaleEnd

Date getSaleEnd()

 

getSaleExpiration
ItemSaleExpiration getSaleExpiration()
returns remaining time of sale
getSaleExpiresIn
string getSaleExpiresIn(string dateFormat)

DEPRECATED - use getSaleExpiration() instead.

Format a string to show time remaining in sale. Returns null if there is no sale going on, or the sale hasn't started, or has expired. Use these tokens to specify which data to include in your string

{Y}Years remaining
{M}Months remaining
{D}Days remaining
{H}Hours remaining
{m}Minutes remaining
{S}Seconds remaining
{HH}Hours remaining always formatted as two digits
{mm}Minutes remaining always formatted as two digits
{SS}Seconds remaining always formatted as two digits

 

Examples:

  • getSaleExpiresIn("Expires in {Y} years, {M} months, {D} days, {H} hours, {m} minutes, and {S} seconds")
  • getSaleExpiresIn("{HH}:{mm}:{SS}")

getSaleStart

Date getSaleStart()

 

getSavings

string getSavings()

difference between MSRP and cost

getSavingsPercent

string getSavingsPercent()

difference between MSRP and cost as a percentage

getSavingsPercentRoundedUp

string getSavingsPercentRoundedUp()

difference between MSRP and cost as a percentage rounded up to nearest whole number

getSchedules

string[ ] getSchedules

returns an array of schedules if the item isAutoOrderable() == true

getThumbnail

string getThumbnail(integer width, integer height, boolean squareThumbnail, boolean pngFormat)

all parameters are optional, default width and height is 80 pixels

getTitle

string getTitle()

 

getTitleHtmlLangstring getTitleHtmlLang()returns the HTML lang attribute that should be used on the DOM element surrounding the title to tell search engines how the content was translated.

getTitleNoEscape

string getTitleNoEscape()

 

getTotalAsBigDecimal

BigDecimal getTotalAsBigDecimal(integer quantity)

 

getTotalLocalized

string getTotalLocalized(integer quantity)

 

getTweetButton

string getTweetButton(string tweetText, string countBoxStyle, string buttonSize, string viaUser)

parameters are optional. If you include any parameters, include them all. If you omit all parameters, the following defaults are used: tweetText=null, countBoxStyle="horizontal",buttonSize="medium",viaUser=null

getUnapprovedReviews

ItemReview[ ] getUnapprovedReviews()

returns all unapproved product reviews

getURIstring getURI()returns the URI of this item page. Recommend using this method instead of getPath(). See also getCanonicalURI().

getVariationDefaultMultimedia

ItemMultimedia getVariationDefaultMultimedia(string code)

 

getVariationMatrix

ItemVariationMatrix getVariationMatrix()

returns back a matrix of this item's variations. Used to display the select box of choices to the customer

getVariationMultimedia

ItemMultimedia[ ] getVariationMultimedia(string type)

type is the multimedia type: Image, Video. type is optional

getVariationMultimediaByCode

ItemMultimedia getVariationMultimediaByCode(string code)

 

getVariations

ItemVariation[ ] getVariations()

 

getViewURL

string getViewURL()

returns the url for the catalog page of this item

getVolumeDiscounts

VolumeDiscount[ ] getVolumeDiscounts()

returns all the applicable volume discounts

getVolumeDiscountsForCart

VolumeDiscount[ ] getVolumeDiscountsForCart(boolean includeSingleUnit)

returns all the applicable volume discounts for items in the cart. If includeSingleUnit is true, then the cost for a single unit is returned as well

getWeight

string getWeight()

returns the weight as a string with unit of measure appended

getWidth

string getWidth()

returns the width and unit of measure

hasApprovedReview

boolean hasApprovedReview()

 

hasOptionsboolean hasOptions()returns true if this item has options, false otherwise

hasReview

boolean hasReview()

 

hasVariations

boolean hasVariations()

 

isAllowBackorder

boolean isAllowBackorder()

 

isAutoOrderable

boolean isAutoOrderable

true if the item is a recurring item and can be auto ordered

isFreeShippingboolean isFreeShipping()true if the item is marked as qualify for free shipping
isFreeShippingAutoOrderboolean isFreeShippingAutoOrder()true if the item is marked as qualify for free shipping if the customer choose the auto order option at checkout

isHazmat

boolean isHazmat()

 

isInactive

boolean isInactive()

 

isInventoryTracked

boolean isInventoryTracked()

 

isMadeToOrderboolean isMadeToOrder()returns true if this item is marked made to order, false otherwise.
isOnSaleboolean isOnSale()returns true if the item is on sale, false otherwise.
isOrderableboolean isOrderable()

returns true if any one of these conditions is true:

  1. Inventory is not being tracked.
  2. Allow back order is enabled.
  3. Pre-order is enabled.
  4. Available quantity is greater than zero

isPreorder

boolean isPreorder()

 

isReviewabled

boolean isReviewable()

 

isUnlimitedBackorder()boolean isUnlimitedBackorder()returns true if the item can be backordered an unlimited amount.

See Also