Skip to main content
Reference

ProductGroup SFO

Properties

Methods

MethodSignatureComments/Sample
attrDefinitionList[DefinitionList](./definitionlist-sfo.md) attrDefinitionList(string key)returns the group attribute assigned by this key
attrItemSet[Item](./item-sfo.md)[ ] attrItemSet(string name)returns the attribute item array assigned to the attribute
attrPageCollectionProductGroup[] attrPageCollection(string name)returns the attribute page collection ProductGroup array based upon the pages that were assigned in the attribute.
attrSimpleList[SimpleList](./simplelist-sfo.md) attrSimpleList(string key)returns the group attribute assigned by this key
attrSlider[Slider](./slider-sfo.md) attrSlider(string key)returns the Slider object associated with this attribute key.
getAllCatalogItemsPage[Item](./item-sfo.md) getAllCatalogItemsPage(integer page)returns the items for a given page of the entire catalog
getAllCatalogItemsPageCountinteger getAllCatalogItemsPageCount()returns the total count of items in the entire catalog
getAttributestring getAttribute(name)returns the simple string attribute for a given name
getAttributeI18Nstring getAttributeI18N(name)returns the simple string attribute for a given name, translated into the desired language of the customer.
getAttributeI18NHtmlLangstring getAttributeI18NHtmlLang(name)returns the lang attribute that should be used on the surrounding DOM element for hte given attribute if it's been translated.
getAttributes[ProductGroupAttribute](./productgroupattribute-sfo.md) getAttributes(string type)type is optional, and usually omitted.
getAvailableItemsPerPageinteger[ ] getAvailableItemsPerPage()returns an integer array of the possible "items per page" that can be selected by the customer.
getAvailableSortOrdersstring[ ] getAvailableSortOrders()returns a string array of all the possible item sort orders for sorting the items displayed on this group page.
getBlogPostSummaries[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummaries()
getBlogPostSummariesCount[i](./blogpostsummary-sfo.md)nteger getBlogPostSummariesCount()
getBlogPostSummariesForPage[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummariesForPage(string pageNumber, integer blogPostSummariesPerPage)
getBlogPostSummariesForPage[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummariesForPage(integer pageNumber)
getBlogPostSummariesForPage[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummariesForPage(integer pageNumber, integer blogPostSummariesPerPage)
getBlogPostSummariesPageCount[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummariesPageCount(integer blogPostSummariesPerPage)
getBlogPostSummariesPageCount[BlogPostSummary[ ]](./blogpostsummary-sfo.md) getBlogPostSummariesPageCount()
getChildCountinteger getChildCount()returns a count of the number of child pages this page has.
getChildrenProductGroup getChildren()returns all product groups directly beneath this product group page.
getCodestring getCode()returns the code assigned to this product group page. The code is an arbitrary key or name given to a product group page to find it quickly
getCurrentBlogPostSummariesPerPageinteger getCurrentBlogPostSummariesPerPage()returns the current pagination setting (per page) for blog posts summaries
getCurrentItemsPerPageinteger getCurrentItemsPerPage()returns the current items per page that the customer has chosen to have displayed.
getCurrentItemSortOrderstring getCurrentItemSortOrder()
getDefaultMultimedia[ProductGroupMultimedia](./productgroupmultimedia-sfo.md) getDefaultMultimedia(String type)
getDescendantItems[Item](./item-sfo.md)[ ] getDescendantItems()gets all the items on this page and all the pages below this page.
getDescriptionstring getDescription()
getDescriptionHtmlLangstring getDescriptionHtmlLang()returns the lang attribute that should be used on the surround HTML element for this description. Required by search engines when a page is translated into multiple languages.
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()
getFacetSelectedCountinteger getFacetSelectedCountthe number of search facets that the customer has selected.
getFacets()[SearchFacet](./searchfacet-sfo.md)[] getFacets()returns the search facets associated with this page.
getFirstItem[Item](./item-sfo.md) getFirstItem()get the first assigned item to this page
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"
getGoogleTrustedStoreSealstring getGoogleTrustedStoreSeal(string googleTrustedStoreId)googleTrustedStoreId is optional
getGoogleTrustedStoreSealForItemstring getGoogleTrustedStoreSealForItem(string googleTrustedStoreId, string googleProductSearchAccountId, string itemId)the first two parameters are optional and may be omitted
getGroupProductGroup getGroup(string path)get a product group for a given page, i.e. /products/chairs/wicker/
getImageURLstring getImageURL()Deprecated: use getDefaultMultimedia() instead
getItem[Item](./item-sfo.md) getItem(string itemId)returns an item
getItemCountinteger getItemCount()total number of product items assigned to this group page
getItems[Item](./item-sfo.md)[ ] getItems(string itemIdCsv)itemIdCsv is optional and usually omitted. If provided, it filters the assigned items down to just those provided in the comma delimited string
getItemsForPage[Item](./item-sfo.md)[ ] getItemsForPage(string pageNumber, integer itemsPerPage)items, but with pagination. There are two ways to call this: 1) pageNumber and itemsPerPage, and 2) just pageNumber.
Note, that if just using pageNumber, it should be an integer, not a string. Strange. If using method 1, pageNumber can be a string or an integer
getLevelinteger getLevel()returns how many group levels deep this page is. For example: /some/deep/dir/page.html would be be at level 3.
getMerchantIdstring getMerchantId()
getMultimedia[ProductGroupMultimedia](./productgroupmultimedia-sfo.md)[ ] getMultimedia(string type)type is an optional filter for by type, and is usually omitted
getMultimediaByCode[ProductGroupMultimedia](./productgroupmultimedia-sfo.md) getMultimediaByCode(string code)code is a unique string assigned to an image so it can be retrieved on demand
getNextItem[Item](./item-sfo.md) getNextItem([Item](./item-sfo.md) item)
getPageCountinteger getPageCount(integer itemsPerPage)if items per page is missing, the current itemsPerPage is used
getParentProductGroup getParent()
getPathstring getPath()Deprecated: use getURI()
getPinterestPinstring getPinterestPin(boolean advanced)
getPreviousItem[Item](./item-sfo.md) getPreviousItem([Item](./item-sfo.md) item)
getRootProductGroup getRoot(integer depth)returns the root product group. Depth is optional, and usually omitted altogether. if it is present, it limits how deep the search goes to find the root.
getSiblings()ProductGroup[] getSiblings()Returns all the other pages that are siblings of this page. Useful for building certain navigation menus.
getThumbnailstring getThumbnail(integer width, integer height, boolean squareThumbnail, boolean pngFormat)width and height are required. Everything else is optional
getTitlestring getTitle()
getTitleHtmlLangstring getTitleHtmlLang()Returns the lang attribute to be used on the surround HTML element. Required by search engines when a page has translated content.
getTopSellingItems[Item](./item-sfo.md)[ ] getTopSellingItems(integer top, boolean allDescendants, integer days)top is the number of top items. Top 5, etc. days is the number of days which sales are considered for ranking
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
getURIstring getURI()Returns the proper URI to be used to access this group. Recommend over getPath() as this will generate the URI that matches what is visible in the StoreFront pages editor based upon whether the group has children or items assigned.
hasBlogPostSummariesboolean hasBlogPostSummaries()true if this page is configured as a blog page and there are posts assigned to it.
hasChildrenboolean hasChildren()true if the page has any child pages assigned.
hasItemsboolean hasItem()
isElderOfItemboolean isElderOfItem()returns true if this product group has items assigned to it
isFileExistsboolean isFileExists(string uri)returns true if the given file exists on the server
isVisibleboolean isVisible()true if the product group page can be seen by customers
setCurrentItemSortOrdervoid setCurrentItemSortOrder(string sortOrder)
setCurrentItemsPerPagevoid setCurrentItemsPerPage(integer itemsPerPage)

See Also

Was this page helpful?