Category

Overview

The Category class is used as a view model to render the category and its attributes in various views. This article will help you understand what's available to you in the view model.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of template engines
  • Understanding HTML, CSS, JavaScript
  • Familiarity with template languages
  • Familiarity with ASP.NET MVC Razor

Getting Started

There are no tasks needed to get started with understanding this object. 

Category

The Category class will contain all of the details for a specific product type associated with one or more products in your Hotcakes Commerce store.

Members

The following table gives you details on the various members of the Category object.  The descriptions are based on default functionality and the default Viewset included with Hotcakes.

Member Type Description
BannerImageUrl String If populated with a URL, the specified banner will be displayed in the category header.
Bvin String This is the unique identifier for the category.
CreationDateUtc DateTime The creation date is used for auditing purposes to know when the category was created.
CustomPageOpenInNewWindow Boolean If true and if using a category as a custom link, this will cause the link to be opened in a new window when the customer clicks on it. This is only used in the CategoryRotator content block.
CustomPageUrl String If populated with a URL, this value will be used as the URL for the category when clicked.
Description String If the description exists, it will be placed below the category banner.
DisplaySortOrder CategorySortOrder

Except when overridden by a sort querystring parameter, this value determines how the products in the category will be sorted.

  • 0 - None
  • 1 - ManualOrder (usually the default)
  • 2 - Product Name
  • 3 - ProductPriceAscending
  • 4 - ProductPriceDescending
  • 5 - ManufacturerName
  • 6 - ProductNameDescending
  • 7 - ProductSKUAscending
  • 8 - ProductSKUDescending
Hidden Boolean This property determines whether the category is enabled or disabled from views.
ImageUrl String This is the image of the category that you want to be associated with it in the various views. It also is used to generate the category thumbnail.
Keywords String These keywords are additional keywords that can be used to further enhance your on-site search to find products in this category.
LastUpdatedUtc DateTime The last updated date is used for auditing purposes to know when the category was last updated.
MetaDescription String This description is used to adjust the description in the HTML source of the category landing page for SEO.
MetaKeywords String These keywords are used to adjust the keywords in the HTML source of the category landing page for SEO.
MetaTitle String This title is used to adjust the title in the HTML source of the category landing page for SEO.
Name String This is the name of the category that the customers will see in their views.
ParentId String Having an ID here will make this category a child or nested category of the category that matches this ID. This helps to create nested navigation and other features.
PostContentColumnId String Contains the ID of the content block that you want to use in the footer area of the category.
PreContentColumnId String Contains the ID of the content block that you want to use in the header area of the category.
RewriteUrl String This is the slug of the URL, or the last part of the URL to be used to get to this category's landing page. It must be unique. If empty, the application will create one based upon the name of the category.
ShowInTopMenu Boolean If true, this category will be shown in the initial list of categories in category lists.
ShowTitle Boolean If true, the category name is shown in the customer-facing views above the products found in the category.
SortOrder Integer (CategorySortOrder)

Allows you to define how the products in this category will be ordered.

  • 0 - None
  • 1 - ManualOrder (usually the default)
  • 2 - Product Name
  • 3 - ProductPriceAscending
  • 4 - ProductPriceDescending
  • 5 - ManufacturerName
  • 6 - ProductNameDescending
  • 7 - ProductSKUAscending
  • 8 - ProductSKUDescending
SourceType CategorySourceType

Allows you to define whether your category is a typical category or a placeholder link to another resource.

  • 0 - Manual
  • 2 - CustomLink
  • 4 - DrillDown
StoreId Long This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
TemplateName String Allows you to specify a specific view in your viewset to be associated with this category when customers see it.

 

Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.