ProductGroup SFO

Properties

 

Methods

Method

Signature

Comments/Sample

attrDefinitionList

DefinitionList attrDefinitionList(string key)

returns the group attribute assigned by this key

attrItemSet

Item[ ] 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 attrSimpleList(string key)

returns the group attribute assigned by this key

attrSliderSlider attrSlider(string key)returns the Slider object associated with this attribute key.

getAllCatalogItemsPage

Item 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

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 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.

getBlogPostSummariesBlogPostSummary[ ] getBlogPostSummaries() 
getBlogPostSummariesCountinteger getBlogPostSummariesCount() 
getBlogPostSummariesForPageBlogPostSummary[ ] getBlogPostSummariesForPage(string pageNumber, integer blogPostSummariesPerPage) 
getBlogPostSummariesForPageBlogPostSummary[ ] getBlogPostSummariesForPage(integer pageNumber) 
getBlogPostSummariesForPageBlogPostSummary[ ] getBlogPostSummariesForPage(integer pageNumber, integer blogPostSummariesPerPage) 
getBlogPostSummariesPageCountBlogPostSummary[ ] getBlogPostSummariesPageCount(integer blogPostSummariesPerPage) 
getBlogPostSummariesPageCountBlogPostSummary[ ] getBlogPostSummariesPageCount() 
getChildCountinteger 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

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.

getCurrentItemSortOrder

string getCurrentItemSortOrder()

 

getDefaultMultimedia

ProductGroupMultimedia getDefaultMultimedia(String type)

 

getDescendantItems

Item[ ] getDescendantItems()

gets all the items on this page and all the pages below this page.

getDescription

string 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.

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()

 

getFacetSelectedCountinteger getFacetSelectedCountthe number of search facets that the customer has selected.
getFacets()SearchFacet[] getFacets()returns the search facets associated with this page.

getFirstItem

Item 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 getItem(string itemId)

returns an item

getItemCount

integer getItemCount()

total number of product items assigned to this group page

getItems

Item[ ] 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[ ] 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[ ] getMultimedia(string type)

type is an optional filter for by type, and is usually omitted

getMultimediaByCode

ProductGroupMultimedia getMultimediaByCode(string code)

code is a unique string assigned to an image so it can be retrieved on demand

getNextItem

Item getNextItem(Item 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 getPreviousItem(Item 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()

 

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[ ] 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

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.

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