• DXC Service
  • Products
    • Episerver CMS
    • Episerver Commerce
    • Episerver Campaign
    • Episerver Find
    • Episerver Personalization
      • Advance
      • Perform
      • Insight
      • Reach
      • Personalized Find
    • Episerver Social API
    • Episerver apps & integrations
    • Ektron CMS
  • Documentation
    • Get started
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Personalization
      • Insight
      • Social API
      • Service API
    • Developer guides
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Advance
      • Perform
      • Reach
      • Personalized Find
      • Insight
      • Tracking
      • Profile Store
      • Content Delivery API
      • Social API
      • Service API
      • Forms
      • MA connectors
    • UI feature list
    • Technical overview
    • System requirements
    • Installation
    • User guide
    • APIs and libraries
      • CMS
      • Commerce
      • Campaign
      • Find
      • Social
      • REST APIs
    • Video tutorials
    • Releases
    • Upgrading
      • CMS
      • Commerce
      • Find
      • Forms
      • Service API
      • Personalization
  • Blogs
  • Forum
  • Support
  • EMVPs
  • Register
  • Log in
All Content Documentation Forum User Guide Support Help Center Blogs Articles Releases Bug List SDK Documents
People
Home / Documentation /
  • Framework reference
  • Mediachase.Commerce.Website.Helpers
  • CartHelper
    • CartHelper Methods
    • CartHelper Properties

CartHelper Class

Assembly: Mediachase.Commerce.Website (in Mediachase.Commerce.Website.dll) Version: 8.0.0

Syntax:

C#
public class CartHelper

Cart helper class used to simplify cart operations. The cart is automatically cached in the current Http Context.

Methods

Name Summary Status
AddEntry(Entry) Adds the entry. Line item's qty will be increased by 1. public
AddEntry(Entry, Boolean) Adds the entry. public
AddEntry(Entry, Boolean, CartHelper[]) Adds the entry. public
AddEntry(Entry, CartHelper[]) Adds the entry. Line item's qty will be increased by 1. public
AddEntry(Entry, Decimal, Boolean, CartHelper[]) Adds the entry with default warehouse code public
AddEntry(Entry, Decimal, Boolean, String, CartHelper[]) Adds the entry. public
CartHelper Constructor (Cart) Initializes a new instance of the CartHelper class. public
CartHelper Constructor (String) Initializes a new instance of the CartHelper class. public
CartHelper Constructor (String, Guid) Initializes a new instance of the CartHelper class. public
CartHelper Constructor (String, Guid, IMarket) Initializes a new instance of the CartHelper class. public
Delete Deletes the current basket instance from the database. public
FindAddressById Finds the address by id. public
FindAddressByName Finds the name of the address by. public
GetCacheKey Gets the cache key which is used to store current cart in the http context, by a specific market. protected
GetCartPromotions Gets all of the cart promotions regardless of promotion type. public
GetCartPromotions(Nullable(PromotionGroup.PromotionGroupKey)) Gets the cart promotions based on promotion type or All. public
GetOrderForm Gets the default OrderForm. public
GetOrderForm(String) Gets the named OrderForm. public
GetTotalItemCount Gets the total number of items in the basket. public
LoadCart(String, Guid) Loads the cart. The cart is loaded from current http context if one is present. protected
LoadCart(String, Guid, MarketId) Loads the cart. The cart is loaded from current http context if one is present. protected
Reset Resets this instance. Will clean up line items, remove payments and delete addresses. The cart needs to be saved in order for changes to be persisted. public
RunWorkflow Runs the workflow and generates the error message for all the warnings. public
Validate public, static
Validate(CartHelper) Validates the specified cart. public, static
Validate(CartHelper, ICatalogSystem, LocalizationService) Validates the specified cart. public, static

Properties

Name Summary Status
Cart Gets the cart. public
EntryDescriptionMetaFieldName public
IsAddressRequired Gets a value indicating whether this instance is address required. public
IsEmpty Gets a value indicating whether this instance is empty. public
LineItems Gets the line items. public
OrderForm Gets the order form. public
PrimaryAddress Gets the primary address. public

Inheritance

  • System.Object
  • Mediachase.Commerce.Website.Helpers.CartHelper

About Episerver

  • episerver.com
  • Episerver certification
  • Job openings
  • License center
  • Privacy statement

Community

  • Blogs
  • Forums
  • Articles
  • Terms of use
  • EMVP program

Learning resources

  • Technical overview
  • Learning path Episerver CMS
  • Developer guides
  • User guide
  • Video tutorials
  • Episerver GitHub
  • Episerver Education

Contact

Episerver Support

See the Support page for contact information.

Feedback on Episerver World

If you’d like to give feedback about this site, please click here. Thank you very much!
© Episerver 2019 │ About Episerver World