PrintNowPrintNowDocs
Themes

Product Browser

Reference for the AngularJS product browser component templates used in Print Store themes.

The product browser is an AngularJS-powered component that provides interactive product listing with filtering, sorting, pagination, and grid/list view switching. It is used on SubCategoryOverview pages and anywhere products need to be browsed with attribute-based filtering.

The component loads its HTML templates from the product-browser/ folder in your theme. There are four template files that together define the complete product browsing experience.

Template Files

FilePurpose
product-view.htmlMain container — header, sort controls, product grid/list, and pagination.
filter-panel.htmlSidebar — category navigation, active selections, and attribute filters.
gridlist.htmlProduct card — used in both grid and list views.
inline.htmlProduct card — used in the inline carousel view.

product-view.html

The main container template that wraps the product listing. It handles:

  • Results count and header
  • Category, size, and quantity dropdowns
  • Sort order (Default, A-Z, Z-A, Price Low-High, Price High-Low, Newest)
  • Grid/list view toggle
  • Product grid with pagination
  • Inline carousel mode

Key AngularJS Bindings

BindingDescription
productView.products.lengthTotal number of products found.
productView.itemsCurrent page of products to display.
productView.viewCurrent view mode: 'grid' or 'list'.
productView.sortCurrent sort order.
productView.pagesArray of page numbers for pagination.
productView.pageCurrent page index (zero-based).
productView.loadingTrue while products are being loaded.
productView.showInlineTrue when using inline carousel mode instead of grid/list.
productView.labelsTranslatable label strings (header, results, sortBy, etc.).

Include Tokens

The product-view template uses special tokens to include the gridlist and inline templates:

<%-- Inside the ng-repeat for grid/list view --%>
<%gridlist%>

<%-- Inside the carousel component for inline view --%>
<%inline%>

These tokens are replaced at runtime with the contents of gridlist.html and inline.html respectively.

Sort Options

ValueSort Order
dfDefault (display order)
azName A to Z
zaName Z to A
lhPrice Low to High
hlPrice High to Low
poPopularity (hidden by default)
nwNewest first

UI Visibility Controls

Show/hide sections with these scope variables:

VariableControls
showHeaderResults count, sort controls, and view toggle.
ui.showCategoryCategory/Style dropdown.
ui.showSizeSize dropdown.
ui.showQtyQuantity dropdown.
ui.showSortSort order dropdown.
ui.showViewGrid/list view toggle buttons.

filter-panel.html

The sidebar filter panel that provides category navigation and attribute-based filtering. It includes:

  • Category list with product counts
  • Active filter selections with remove buttons
  • Collapsible attribute filter groups with color swatches

Key AngularJS Bindings

BindingDescription
filterPanel.categoriesArray of categories with cat (category object), count (product count), and ignoreCount flag.
filterPanel.selectionsArray of active filter selections, each with name and values array.
filterPanel.groupsArray of attribute filter groups, each with name, items array, open state, and hidden flag.
filterPanel.hasAttributesTrue if attribute filters are available.
filterPanel.loadingTrue while filters are loading.
filterPanel.labelsTranslatable labels (header, chosen, clear, remove, narrow).

UI Visibility Controls

VariableControls
filterPanel.ui.hide_categoriesHides the category navigation list.
filterPanel.ui.hide_selectionsHides the active selections panel.
filterPanel.ui.hide_filtersHides the "Narrow your results" filter section.

Filter Item Properties

Each item in a filter group has:

PropertyDescription
item.valueDisplay value for the filter option.
item.itemCountNumber of products matching this filter.
item.colorColor hex code (for color attribute swatches).
item.filteredTrue if this filter is currently active.
item.callbackFunction to apply this filter.

gridlist.html

The product card template used for both grid and list views. Renders inside an ng-repeat loop over productView.items.

Item Properties

PropertyDescription
item.IdProduct ID.
item.NameProduct display name.
item.UrlProduct detail URL.
item.DescriptionProduct description (HTML, use with ng-bind-html).
item.ItemNumberItem/SKU number.
item.ModelNumberModel number.
item.InventoryInventory status display.
item.IsStaticTrue for static (non-customizable) products.
item.LinkTextAction button text (e.g., "Order Now", "Customize").
item.SizeIdSize ID for offline template download.
item.DownloadTrue if an offline template is available for download.
item.GetPrice()Returns the formatted starting price.
item.GetQuantity()Returns the quantity for the displayed price.
item.GetUnitPrice()Returns the formatted unit price.

Thumbnail URL Pattern

Product thumbnails are loaded via the thumbnail handler:

<img src="/thumbnails/p/{{item.Id}}?width=300&height=300&fit=fill" alt="">

Example

<div class="product-card">
    <a href="{{item.Url}}">
        <img src="/thumbnails/p/{{item.Id}}?width=300&height=300&fit=fill" class="img-fluid" alt="">
        <h4>{{item.Name}}</h4>
    </a>
    <span>{{item.GetQuantity()}} {{item.GetPrice() | money}}</span>
    <a href="{{item.Url}}" class="btn btn-primary">{{item.LinkText}}</a>
</div>

inline.html

The product card template used in the inline carousel view (ui-carousel component). Same item properties as gridlist, but typically shows more detail since cards are displayed one at a time in a slider.

The inline template renders inside a <carousel-item> component and has access to the same item properties documented above.

Thumbnail URL Patterns

The product browser uses URL-based thumbnail generation:

PatternDescription
/thumbnails/p/{id}?width=W&height=H&fit=MODEProduct thumbnail by product ID.
/thumbnails/c/{id}?width=W&height=H&fit=MODECategory thumbnail by category ID.
/productthumb.ashx?p={id}&w=W&h=H&bw=0&fwnb=falseLegacy product thumbnail handler.

The fit parameter accepts: fill, center, trim, stretch. See Object Models — ThumbnailEntry for details.

  • Theme Structure — Where product-browser/ templates sit in the theme folder
  • Object Models — ThumbnailEntry and other objects used for thumbnail URL generation
  • Data Properties — Server-side properties available on SubCategoryOverview pages hosting the product browser

On this page