CategoryMenuViewModel

Overview

Whenever a menu of the enabled categories are displayed, the CategoryMenuViewModel is used to allow for that rendering to occur. 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. 

CategoryMenuViewModel

The CategoryMenuViewModel object will contain all of the details of the category menu for use in your Hotcakes Commerce store.

Members

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

Member Type Description
CategoryMenuMode String

There are different modes to display the categories including: 

  • 1 - All Categories
  • 2 - Peers or Children and Parents
  • 3 - Root and expanded children
  • 4 - Load selected categories
  • 5 - Load children of selected
ChildrenOfCategory String This contains the value from the module settings that sets what the current parent category should be for the view, which overrides the default behavior.
CurrentId String Current Category ID which the customer is viewing.
MaximumDepth Int Defines the maximum number of child categories that should be rendered on the view.
MenuItem CategoryMenuItemViewModel Current category menu item details.
SelectedCategories HashSet<String> List of selected categories on the view.
ShowCategoryCounts Bool Flag to control whether it's required to show the category count to the customer or not.
ShowHomeLink Bool Show home link on the list of the categories or not when traversing through nested categories.
ShowProductCounts Bool Flag to control whether it's required to show product count to the customer or not.
Title String User friendly name of the currently selected category set in the administration area.

 

Have more questions? Submit a request

Need More Help?

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