Skip to main content
Reference

Item SFO

Properties

FieldTypeComment/Sample

Methods

MethodSignatureComments/Sample
attrDefinitionList[DefinitionList](./definitionlist-sfo.md) attrDefinitionList(string key)returns the definition list for the given key value
attrSimpleList[SimpleList](./simplelist-sfo.md) attrSimpleList(string key)returns the simple list for the given key value
getAssignedGroups[ProductGroup](./productgroup-sfo.md)[ ] getAssignedGroups()returns not only the parent group, but all the Product Groups (Group Pages) to which this item is assigned to
getAttributestring 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](./itemattribute-sfo.md)[ ] getAttributes(string type)type is optional. Calling this with no parameters returns all attributes
getAttributeValuestring 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.
getAvailableQuantityinteger getAvailableQuantity()
getAvailableQuantityStringstring getAvailableQuantityString()
getBarcodestring getBarcode()
getCanonicalPathstring 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](./itemcase-sfo.md)[ ] 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.
getCOGSstring getCOGS()returns the Cost of Goods Sold
getCoststring getCost(integer quantity)quantity is optional. If omitted, 1 is assumed
getCostAsBigDecimal[BigDecimal](./bigdecimal-sfo.md) getCostAsBigDecimal(integer quantity)quantity is optional. If omitted, 1 is assumed
getCostLocalizedstring 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](./bigdecimal-sfo.md) getCostLocalizedAsBigDecimal()local currency code
getCostLocalizedCurrencyCodestring getCostLocalizedCurrencyCodereturns the currency code of the item
getCurrencyCodestring getCurrencyCode()
getDefaultMultimedia[ItemMultimedia](./itemmultimedia-sfo.md) getDefaultMultimedia(string code)
getDescriptionstring 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.
getDescriptionNoEscapestring getDescriptionNoEscape()
getEbayAuctionIdstring getEbayAuctionId()returns null if no auction for this item
getEbayAuctionURLstring getEbayAuctionURL()
getEbayListingPricestring getEbayListingPrice()
getEtastring getEta()if the item has an ETA, return it, else return null
getExtendedDescriptionstring getExtendedDescription()
getExtendedDescriptionNoEscapestring getExtendedDescriptionNoEscape()
getFacebookLikeButtonstring 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"
getFacebookShareButtonstring getFacebookShareButton()
getFreightClassstring getFreightClass()
getGooglePlusButtonstring 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"
getHeightstring getHeight()returns the height and unit of measure
getImageURLstring getImageUrl()
getInternalInventoryByDistributionCenterstring getInternalInventoryByDistributionCenterreturns back a bracketed string of dc code: inventory for this item
getKitComponents[ItemKitComponent](./itemkitcomponent-sfo.md)[ ] getKitComponents()
getLengthstring 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.
getManufacturerNamestring getManufacturerName()
getManufacturerSKUstring getManufacturerSKU()
getManufacturerSuggestedRetailPriceLocalizedstring getManufacturerSuggestedRetailPriceLocalized()
getManufacturerSuggestedRetailPriceLocalizedAsBigDecimal[BigDecimal](./bigdecimal-sfo.md) getManufacturerSuggestedRetailPriceLocalizedAsBigDecimal()
getManufacturerSuggestedRetailPriceLocalizedAsCurrency[Currency](./currency-sfo.md) getManufacturerSuggestedRetailPriceLocalizedAsCurrency()
getMAPstring 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
getMAPLocalizedstring getMAPLocalized()same as getMAP, but returns back a formatted string in the localized currency
getMAPLocalizedCurrency[Currency](./currency-sfo.md) getMAPLocalizedCurrency()same as getMAP, but returns back a Currency object in the localized currency
getMaximumQuantityinteger getMaximumQuantity()
getMerchantItemIDstring getMerchantItemID()
getMinimumQuantityinteger getMinimumQuantity()
getMSRPstring 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
getMSRPPriceBreakstring getMSRPPriceBreak()returns the difference between MSRP and the item best price
getMultimedia[ItemMultimedia](./itemmultimedia-sfo.md) getMultimedia(string type)type is the multimedia type: Image, Video. type is optional
getMultimediaByCode[ItemMultimedia](./itemmultimedia-sfo.md) getMultimediaByCode(string code)
getMultimediaByFilename[ItemMultimedia](./itemmultimedia-sfo.md) getMultimediaByFilename(string filename)
getMultimediaDefaultFirst[ItemMultimedia](./itemmultimedia-sfo.md)[ ] getMultimediaDefaultFirst(string type)
getOptionByName[ItemOption](./itemoption-sfo.md) 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](./itemoption-sfo.md)[ ] getOptions()
getParent[ProductGroup](./productgroup-sfo.md) getParent()
getPathstring getPath()the relative url of this item display page
getPinterestPinstring getPinterestPin(boolean advanced)
getPricingTiers[PricingTier](./pricingtier-sfo.md)[ ] getPricingTiers()gets a list of all pricing tiers for this item
getRegularCoststring getRegularCost(integer quantity)quantity is optional. If omitted, 1 is assumed
getRegularCostAsBigDecimal[BigDecimal](./bigdecimal-sfo.md) getRegularCostAsBigDecimal(integer quantity)quantity is optional. If omitted, 1 is assumed
getRegularCostLocalizedstring getRegularCostLocalized(integer quantity)returns Regular cost in local currency. quantity is optional. If omitted, 1 is assumed
getRelatedItemsItem[ ] getVolumeDiscounts()
getReviewFilterstring getReviewFilter()returns the ItemReviewFilter
getReviewFilterAsJsonstring getReviewFilterAsJson()returns the ItemReviewFilter in json format
getReviewCountint getReviewCount()returns the number of approved reviews for this item.
getReviewOverall[BigDecimal](./bigdecimal-sfo.md) getReviewOverall()
getReviewOverallAsHtmlstring 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
getReviewOverallAsImagesstring 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.
getReviewOverallAsRectanglesstring getReviewOverallAsRectangles()
getReviewOverallAsStarsstring getReviewOverallAsStars()
getReviews[ItemReview](./itemreview-sfo.md)[ ] getReviews()returns all product reviews
getReviewsAsJsonstring getReviewsAsJson()returns an array of ItemReview in json format
getReviewSummary[ItemReviewSummary](./itemreviewsummary-sfo.md) getReviewSummary()returns a summary of customer reviews
getReviewSummaryAsJson[ItemReviewSummary](./itemreviewsummary-sfo.md) getReviewSummaryAsJson()returns a summary of customer reviews in json format
getReviewUrlstring getReviewUrl()relative url of the product review page
getSaleCoststring getSaleCost(integer quantity)quantity is optional. If omitted, 1 is assumed
getSaleCostAsBigDecimal[BigDecimal](./bigdecimal-sfo.md) getSaleCostAsBigDecimal(integer quantity)quantity is optional. If omitted, 1 is assumed
getSaleCostLocalizedstring getSaleCostLocalized(integer quantity)returns sale cost in local currency. quantity is optional. If omitted, 1 is assumed
getSaleEnd[Date](./date-sfo.md) getSaleEnd()
getSaleExpirationItemSaleExpiration getSaleExpiration()returns remaining time of sale
getSaleExpiresInstring 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](./date-sfo.md) getSaleStart()
getSavingsstring getSavings()difference between MSRP and cost
getSavingsPercentstring getSavingsPercent()difference between MSRP and cost as a percentage
getSavingsPercentRoundedUpstring getSavingsPercentRoundedUp()difference between MSRP and cost as a percentage rounded up to nearest whole number
getSchedulesstring[ ] getSchedulesreturns an array of schedules if the item isAutoOrderable() == true
getThumbnailstring getThumbnail(integer width, integer height, boolean squareThumbnail, boolean pngFormat)all parameters are optional, default width and height is 80 pixels
getTitlestring 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.
getTitleNoEscapestring getTitleNoEscape()
getTotalAsBigDecimal[BigDecimal](./bigdecimal-sfo.md) getTotalAsBigDecimal(integer quantity)
getTotalLocalizedstring getTotalLocalized(integer quantity)
getTweetButtonstring 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](./itemreview-sfo.md)[ ] 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](./itemmultimedia-sfo.md) getVariationDefaultMultimedia(string code)
getVariationMatrix[ItemVariationMatrix](./itemvariationmatrix-sfo.md) getVariationMatrix()returns back a matrix of this item's variations. Used to display the select box of choices to the customer
getVariationMultimedia[ItemMultimedia](./itemmultimedia-sfo.md)[ ] getVariationMultimedia(string type)type is the multimedia type: Image, Video. type is optional
getVariationMultimediaByCode[ItemMultimedia](./itemmultimedia-sfo.md) getVariationMultimediaByCode(string code)
getVariations[ItemVariation](./itemvariation-sfo.md)[ ] getVariations()
getViewURLstring getViewURL()returns the url for the catalog page of this item
getVolumeDiscounts[VolumeDiscount](./volumediscount-sfo.md)[ ] getVolumeDiscounts()returns all the applicable volume discounts
getVolumeDiscountsForCart[VolumeDiscount](./volumediscount-sfo.md)[ ] 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
getWeightstring getWeight()returns the weight as a string with unit of measure appended
getWidthstring getWidth()returns the width and unit of measure
hasApprovedReviewboolean hasApprovedReview()
hasOptionsboolean hasOptions()returns true if this item has options, false otherwise
hasReviewboolean hasReview()
hasVariationsboolean hasVariations()
isAllowBackorderboolean isAllowBackorder()
isAutoOrderableboolean isAutoOrderabletrue 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
isHazmatboolean isHazmat()
isInactiveboolean isInactive()
isInventoryTrackedboolean 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
isPreorderboolean isPreorder()
isReviewabledboolean isReviewable()
isUnlimitedBackorder()boolean isUnlimitedBackorder()returns true if the item can be backordered an unlimited amount.

See Also

Was this page helpful?