The GiftCardViewModel is used within the CheckoutViewModel when rendering the checkout view to your customers. 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
- Familiarity with template languages
- Familiarity with ASP.NET MVC Razor
There are no tasks needed to get started with understanding this object.
The GiftCardViewModel object will contain all of the details of a single instance of placing an order in your Hotcakes Commerce store.
The following table gives you details on the various members of the GiftCardViewModel object. The descriptions are based on default functionality and the default Viewset included with Hotcakes.
When this list is populated, it usually will only have a single gift card that a customer used during checkout. However, it's also possible for this list to be empty or have more than one gift card.
|ShowGiftCards||Bool||If you have gift cards enabled in your store settings, this value will be true and it will end up showing gift card as another payment option in the checkout view. Otherwise, this value will be false and the checkout will not include gift cards.|
|Summary||String||The text you see here will depend on whether or not gift cards are enabled, and how much of the order the gift card can cover. For example, if the gift card can only cover a partial amount of the order, a message saying as much will be in this property.|