Item SFO
Properties
| Field | Type | Comment/Sample |
|---|
Methods
| Method | Signature | Comments/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 | ||||||||||||||||||
getAttribute | string getAttribute(string attributeName) | |||||||||||||||||||
getAttributeI18N | string getAttributeI18N(string attributeName) | returns the attribute, translated into the customer's desired language. | ||||||||||||||||||
getAttributeI18NHtmlLang | string 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 | ||||||||||||||||||
getAttributeValue | string getAttributeValue(string attributeName) | same as getAttribute except it returns an emtpy string instead of null if the attribute does not exist | ||||||||||||||||||
getAttributeValueI18N | string getAttributeValueI18N(string attributeName) | same as getAttributeValue, but translates the content into the customer's desired language. | ||||||||||||||||||
getAttributeValueI18NHtmlLang | string 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() | ||||||||||||||||||
getCanonicalURI | string 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. | ||||||||||||||||||
getCOGS | string getCOGS() | returns the Cost of Goods Sold | ||||||||||||||||||
getCost | string 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 | ||||||||||||||||||
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](./bigdecimal-sfo.md) getCostLocalizedAsBigDecimal() | local currency code | ||||||||||||||||||
getCostLocalizedCurrencyCode | string getCostLocalizedCurrencyCode | returns the currency code of the item | ||||||||||||||||||
getCurrencyCode | string getCurrencyCode() | |||||||||||||||||||
getDefaultMultimedia | [ItemMultimedia](./itemmultimedia-sfo.md) getDefaultMultimedia(string code) | |||||||||||||||||||
getDescription | string getDescription() | |||||||||||||||||||
getDescriptionHtmlLang | string 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](./itemkitcomponent-sfo.md)[ ] getKitComponents() | |||||||||||||||||||
getLength | string getLength() | returns the length and unit of measure | ||||||||||||||||||
getMadeToOrderLeadTime | integer 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](./bigdecimal-sfo.md) getManufacturerSuggestedRetailPriceLocalizedAsBigDecimal() | |||||||||||||||||||
getManufacturerSuggestedRetailPriceLocalizedAsCurrency | [Currency](./currency-sfo.md) 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](./currency-sfo.md) 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](./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) | |||||||||||||||||||
getOptionMatrixJson | string 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() | |||||||||||||||||||
getPath | string getPath() | the relative url of this item display page | ||||||||||||||||||
getPinterestPin | string getPinterestPin(boolean advanced) | |||||||||||||||||||
getPricingTiers | [PricingTier](./pricingtier-sfo.md)[ ] 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](./bigdecimal-sfo.md) 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 | ||||||||||||||||||
getReviewCount | int getReviewCount() | returns the number of approved reviews for this item. | ||||||||||||||||||
getReviewOverall | [BigDecimal](./bigdecimal-sfo.md) 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](./itemreview-sfo.md)[ ] getReviews() | returns all product reviews | ||||||||||||||||||
getReviewsAsJson | string 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 | ||||||||||||||||||
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](./bigdecimal-sfo.md) 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](./date-sfo.md) 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
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() | |||||||||||||||||||
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() | |||||||||||||||||||
getTitleHtmlLang | string 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](./bigdecimal-sfo.md) 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](./itemreview-sfo.md)[ ] getUnapprovedReviews() | returns all unapproved product reviews | ||||||||||||||||||
getURI | string 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() | |||||||||||||||||||
getViewURL | string 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 | ||||||||||||||||||
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() | |||||||||||||||||||
hasOptions | boolean 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 | ||||||||||||||||||
| isFreeShipping | boolean isFreeShipping() | true if the item is marked as qualify for free shipping | ||||||||||||||||||
| isFreeShippingAutoOrder | boolean 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() | |||||||||||||||||||
isMadeToOrder | boolean isMadeToOrder() | returns true if this item is marked made to order, false otherwise. | ||||||||||||||||||
isOnSale | boolean isOnSale() | returns true if the item is on sale, false otherwise. | ||||||||||||||||||
isOrderable | boolean 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
Was this page helpful?