Click or drag to resize
CurrentShoppingCartStrategy Class
Default implementation of ICurrentShoppingCartStrategy.
Inheritance Hierarchy
SystemObject
  CMS.EcommerceCurrentShoppingCartStrategy

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 10.0.0
Syntax
C#
public class CurrentShoppingCartStrategy : ICurrentShoppingCartStrategy

The CurrentShoppingCartStrategy type exposes the following members.

Constructors
  NameDescription
Public methodCurrentShoppingCartStrategy
Top
Methods
  NameDescription
Public methodAnonymizeShoppingCart
Removes personal information from the shopping cart.
Public methodCartCanBeUsedOnSite
Checks if given shopping cart is assigned to the site.
Protected methodClearAddresses
Removes information about addresses from the shopping cart.
Protected methodClearCustomer
Removes information about customer from the shopping cart.
Protected methodClearDiscounts
Removes information about customer from the shopping cart.
Protected methodClearNote
Removes information about note from the shopping cart.
Protected methodClearPayment
Removes information about payment from the shopping cart.
Protected methodClearPrivateData
Clears all data considered to be 'private' (i.e. customer, shipping option including addresses, payment option, discounts and note).
Protected methodClearShipping
Removes information about shipping from the shopping cart.
Public methodPreferStoredCart
Decides whether shopping cart is 'good enough' for user or an older shopping cart stored in the system should be preferred.
Public methodRefreshCart
Ensures that ShoppingCartInfo does not contain invalid data.
Public methodTakeOverCart
Makes the ShoppingCartInfo owned by the user.
Public methodUserCanTakeOverCart
Checks if user can adopt shopping cart.
Top
Remarks
You can derive your own implementation from this class to customize the way the system finds shopping cart for visitor. The following code illustrates how to register custom implementation.
[assembly:RegisterImplementation(typeof(ICurrentShoppingCartStrategy), typeof(MyCurrentShoppingCartStrategy))]
public class MyCurrentShoppingCartStrategy : CurrentShoppingCartStrategy
{
    ...
}
See Also