The CartLineItemViewModel is used in the cart view, but not as the primary view model.  It's used by the CartViewModel, to display the line items for the specific cart being loaded into the view. This article will help you understand what's available to you in the view model.


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. 


The CartLineItemViewModel object will contain all of the details of a single line item in a specific cart.


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

Member Type Description
HasDiscounts Bool

Flag which indicates if any discounts are applied to the line item or not.  During order calculation, this flag has been set based on the different criteria and configuration set by the merchant.

ImageUrl String Image URL of the product if needs to be shown on cart.
Item LineItem Different properties and information related to each line item (aka. product) has different methods to show data appropriately to end user based on those properties.
LinkUrl String Link URL for the product in the cart, which can be used to direct the customer back to product detail page.
Product Product Each line item is nearly a copy of the original product in your catalog at the time it was added to the cart. This property represents the original product.
ShowImage Bool Controls whether the image should be shown on the cart for the product or not.


Have more questions? Submit a request

Need More Help?

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