ProductGroup SFO
Properties
Methods
| Method | Signature | Comments/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 |
attrPageCollection | ProductGroup[] 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 |
getAllCatalogItemsPageCount | integer getAllCatalogItemsPageCount() | returns the total count of items in the entire catalog |
getAttribute | string getAttribute(name) | returns the simple string attribute for a given name |
getAttributeI18N | string getAttributeI18N(name) | returns the simple string attribute for a given name, translated into the desired language of the customer. |
getAttributeI18NHtmlLang | string 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. |
getAvailableItemsPerPage | integer[ ] getAvailableItemsPerPage() | returns an integer array of the possible "items per page" that can be selected by the customer. |
getAvailableSortOrders | string[ ] 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() | |
getChildCount | integer getChildCount() | returns a count of the number of child pages this page has. |
getChildren | ProductGroup getChildren() | returns all product groups directly beneath this product group page. |
getCode | string 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 |
getCurrentBlogPostSummariesPerPage | integer getCurrentBlogPostSummariesPerPage() | returns the current pagination setting (per page) for blog posts summaries |
getCurrentItemsPerPage | integer getCurrentItemsPerPage() | returns the current items per page that the customer has chosen to have displayed. |
getCurrentItemSortOrder | string 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. |
getDescription | string getDescription() | |
getDescriptionHtmlLang | string 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. |
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() | |
getFacetSelectedCount | integer getFacetSelectedCount | the 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 |
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" |
getGoogleTrustedStoreSeal | string getGoogleTrustedStoreSeal(string googleTrustedStoreId) | googleTrustedStoreId is optional |
getGoogleTrustedStoreSealForItem | string getGoogleTrustedStoreSealForItem(string googleTrustedStoreId, string googleProductSearchAccountId, string itemId) | the first two parameters are optional and may be omitted |
getGroup | ProductGroup getGroup(string path) | get a product group for a given page, i.e. /products/chairs/wicker/ |
getImageURL | string getImageURL() | Deprecated: use getDefaultMultimedia() instead |
getItem | [Item](./item-sfo.md) getItem(string itemId) | returns an item |
getItemCount | integer 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 |
getLevel | integer getLevel() | returns how many group levels deep this page is. For example: /some/deep/dir/page.html would be be at level 3. |
getMerchantId | string 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) | |
getPageCount | integer getPageCount(integer itemsPerPage) | if items per page is missing, the current itemsPerPage is used |
getParent | ProductGroup getParent() | |
getPath | string getPath() | Deprecated: use getURI() |
getPinterestPin | string getPinterestPin(boolean advanced) | |
getPreviousItem | [Item](./item-sfo.md) getPreviousItem([Item](./item-sfo.md) item) | |
getRoot | ProductGroup 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. |
getThumbnail | string getThumbnail(integer width, integer height, boolean squareThumbnail, boolean pngFormat) | width and height are required. Everything else is optional |
getTitle | string getTitle() | |
getTitleHtmlLang | string 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 |
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 |
getURI | string 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. |
hasBlogPostSummaries | boolean hasBlogPostSummaries() | true if this page is configured as a blog page and there are posts assigned to it. |
hasChildren | boolean hasChildren() | true if the page has any child pages assigned. |
hasItems | boolean hasItem() | |
isElderOfItem | boolean isElderOfItem() | returns true if this product group has items assigned to it |
isFileExists | boolean isFileExists(string uri) | returns true if the given file exists on the server |
isVisible | boolean isVisible() | true if the product group page can be seen by customers |
setCurrentItemSortOrder | void setCurrentItemSortOrder(string sortOrder) | |
setCurrentItemsPerPage | void setCurrentItemsPerPage(integer itemsPerPage) |
See Also
Was this page helpful?