Template Pages

Change the design of your Category Page

Purpose: This HTML template defines the layout of the category pages. The Shift4Shop store has three separate category templates created by default, but more can be created as needed. Category templates can be selected in the "Advanced" section of each category you create. Each style corresponds to an individual category_x.html template.

  • Style 1 - category_0.html
  • Style 2 - category_1.html
  • Style 3 - category_2.html

To add additional category styles to your store, simply name your additional templates with the appropriate "_x.html" naming convention. (i.e. category_3.html>Style 4 | category_4.html>Style 5 | etc)

Notes: This is one of the more complicated templates as it contains many different code blocks. Not only does it utilize one or more global variables, but it also contains variables for the Category display as well as product display variables.

 

Note: It is important to preserve the commented tags to ensure the software performs correctly.

For example:

    <!--START: SUB_CATEGORIES--> - Displays existing sub-categories.
        [category_Header-subcategories]  
        <!--START: SUB_CATEGORIES_FORMAT--> 
            [CATID]  
            [SUB_CATEGORY_NAME]  
            [SUB_CATEGORY_DESCRIPTION]  
            <!--START: SUB_CATEGORY_IMAGE--> - Places an image if a category icon is defined.
                [CATID]  
                [SUB_CATEGORY_IMAGE]  
                [SUB_CATEGORY_NAME]  
            <!--END: SUB_CATEGORY_IMAGE--> 
        <!--END: SUB_CATEGORIES_FORMAT--> 
    <!--END: SUB_CATEGORIES--> 

    <!--START: FEATURE_MENU--> - Displays existing category specials.
        [category_Header-specials]  
        <!--START: FEATURE_ITEMS--> 
            <!--START: FEATURE_ITEM_TEMPLATE_#--> 
                [catalogid]  
                [name]  
                [catalogid]  
                [thumbnail]  
                [description]  
                <!--START: product_review--> 
                    <!--START: product_review_average--> 
                        [review_average]  
                        [review_count]  
                    <!--END: product_review_average--> 
                <!--END: product_review--> 
                <!--START: ITEMPRICE--> 
                    [ITEMPRICE]  
                <!--END: ITEMPRICE--> 
                <!--START: SALEPRICE--> 
                    [ITEMPRICE]  
                    [ITEMSALEPRICE]  
                    <!--START: SAVINGS--> 
                        [product_savings]  
                        [savings]  
                    <!--END: SAVINGS--> 
                <!--END: SALEPRICE--> 
                <!--START: AVAILABILITY--> 
                    [availability]  
                <!--END: AVAILABILITY--> 
                <!--START: freeshippingblock--> 
                    [freeshipping]  
                <!--END: freeshippingblock--> 
            <!--END: FEATURE_ITEM_TEMPLATE_#--> 
        <!--END: FEATURE_ITEMS--> 
    <!--END: FEATURE_MENU--> 

    <!--START: catFilterMainBlock--> 
        <!--START: catFilter--> 
            [category_Header-Filters]  
            <!--START: catFilterCrumb--> 
                <!--START: catFilterCrumbItem--> 
                    [strFilter]  
                    [strfiltername]  
                <!--END: catFilterCrumbItem--> 
            <!--END: catFilterCrumb--> 
            <!--START: catFilterRemoveLink--> 
                [category_Header-RemoveFilters]  
            <!--END: catFilterRemoveLink--> 
        <!--END: catFilter--> 
        <!--START: catFilter_Filter--> 
            [catFilterName]  
            <!--START: catFilter_Filter_Item--> 
                [catFilterId]  
                [catFilterName]  
                [catFilterChildId]  
                [catFilterChildName]  
                [catid]  
                [numItems]  
            <!--END: catFilter_Filter_Item--> 
        <!--END: catFilter_Filter--> 
        [catFilter]  
    <!--END: catFilterMainBlock--> 
    <!--START: ITEMS--> 
        [catid]  
        [category_Header-products]  
        [productnumber]  
        [sortbylist]  
        <!--START: CATEGORY_ITEMS--> 
            <!--START: ITEM_TEMPLATE_#--> 
                [catalogid]  
                [name]  
                [thumbnail]  
                [description]  
                <!--START: product_review--> 
                    <!--START: product_review_average--> 
                        [review_average]  
                        [review_count]  
                    <!--END: product_review_average--> 
                <!--END: product_review--> 
                <!--START: ITEMPRICE--> 
                    [ITEMPRICE]  
                <!--END: ITEMPRICE--> 
                <!--START: SALEPRICE--> 
                    [ITEMPRICE]  
                    [ITEMSALEPRICE]  
                    <!--START: SAVINGS--> 
                        [product_savings]  
                        [savings]  
                    <!--END: SAVINGS--> 
                <!--END: SALEPRICE--> 
                <!--START: AVAILABILITY--> 
                    [availability]  
                <!--END: AVAILABILITY--> 
                <!--START: freeshippingblock--> 
                    [freeshipping]  
                <!--END: freeshippingblock-->
            <!--END: ITEM_TEMPLATE_#--> 
        <!--END: CATEGORY_ITEMS--> 
    <!--END: ITEMS--> 

Note: Code blocks and their respective variables will only work with specific template pages.

The following Variables will apply to the category category functionality:

  • [CATEGORY_FULLLINE] - Displays the category's breadcrumb.
  • [categoryname] - Displays the category's name
  • [category_Header-subcategories] - Displays the Title of the category's sub-category section. (See Settings ->Design ->Store Language)
  • [SUB_CATEGORY_IMAGE] - If your sub-categories have category icons enabled, this variable will insert the icon image. (See advanced section of Sub-Category)
  • [SUB_CATEGORY_NAME] - Displays the name of the applicable sub-category.
  • [SUB_CATEGORY_DESCRIPTION] - Displays the Description of the applicable sub-category.
  • [category_Header-specials] - Displays the Title of "Featured Products" header of the page. (See Settings ->Design ->Store Language)
  • [category_Header-products] - Displays the Title of your Category products sections. (See Settings ->Design ->Store Language)
  • [productnumber] - Displays the number of products contained in the respective Category.
  • [sortbylist] - Inserts the "Sort By" drop down for category sorting. (Settings enabled in Settings ->General ->Store Settings)

These next Variables will apply to the way products are displayed on the category:

  • [catalogid] - This variable inserts the product's catalog ID wherever applicable for scripting when the product is referenced. (i.e. Product images, links to product, etc.)
  • [name] - Inserts the product's Name information.
  • [review_average] - Inserts the product's individual Rating Average
  • [review_count] - Displays the number of Reviews left on the product.
  • [product_yourprice] - Displays the Title of the "Your Price" section of the Product's pricing section. (See Settings ->Design ->Store Language)
  • [ITEMPRICE] - Inserts the Product's Price information.
  • [product_onsale] - Displays the Title of the "On Sale" section of the Product's pricing section. (See Settings ->Design ->Store Language)
  • [ITEMSALEPRICE] - Inserts the Product's Sale Price information.
  • [category_buyitlink] - Displays the Title of the "Add to Cart" button/link. (See Settings ->Design ->Store Language)
  • [id] - If using the "Listing" Display type for products in the Category's Advanced section, the product's respective ID/SKU will be insertedby this variable.
  • [THUMBNAIL] - Inserts the respective product's thumbnail image.
  • [description] - If using the "Details" display type in the Category's Advanced menu, this variable will insert the Product's short description.
  • [product_Header-availability] - If using the "Details" display type in the Category's Advanced menu, this variable will display the Title of the Product's Availability. (See Settings ->Design ->Store Language)
  • [availability] - If using the "Details" display type in the Category's Advanced menu, this variable will insert the product's Availability message.
  • [freeshipping] - If the product is set for Free Shipping, this variable will insert that status within the category listing.
  • [product_addtocart] - If using the "Details" display type in the Category's Advanced menu, this variable will display the Title of the Add to Cart button. (See Settings ->Design ->Store Language)

Finally, these next Variables, while present on the template, will apply only if your store has the Shift4Shop Advanced Category Filters add-on enabled for the store:

  • [category_Header-Filters]
  • [strFilter]
  • [strfiltername]
  • [category_Header-RemoveFilters]
  • [catFilterName]
  • [catFilterId]
  • [catFilterChildId]
  • [catFilterChildName]
  • [numItems]
  • [catFilter]

Download this Template     (Save as a backup or edit to customize)

Screenshot of the category_x.html Template