ShoppingCartItemValidator Class |
Namespace: CMS.Ecommerce
public class ShoppingCartItemValidator : IValidator
The ShoppingCartItemValidator type exposes the following members.
Name | Description | |
---|---|---|
ShoppingCartItemValidator |
Initializes a new instance of the ShoppingCartItemValidator class for given item.
|
Name | Description | |
---|---|---|
Errors |
Gets an enumeration of validation errors associated with this validator. An empty enumeration is returned
if validation succeeded.
| |
IsValid |
Gets a value indicating whether validation succeeded.
| |
Item |
Gets shopping cart this validator was initialized for.
| |
SKUInfoProvider |
Gets the provider for SKUInfo management.
|
Name | Description | |
---|---|---|
Validate |
Validates individual shopping cart item.
The following conditions must hold true for each item in cart for validation to pass:
1) All shopping cart items are enabled
2) Max units in one order are not exceeded
3) There is enough units in the inventory
4) Customer is registered, if there is a membership type product in the cart
5) Product validity is valid, if there is a membership or e-product type product in the cart.
| |
ValidateCustomerMembership |
Validates that customer is either a member or membership is not required.
| |
ValidateMaxCartUnits |
Validates that cart does not contain more items than allowed.
| |
ValidateMinCartUnits |
Validates that cart contains at least required amount of units.
| |
ValidateSKUIsEnabled |
Validates that SKU is enabled and not expired.
| |
ValidateUnitsInStock |
Validates that cart does not contain more items than are currently in stock.
|
Name | Description | |
---|---|---|
ContainsTValidatorError |
Returns a value indicating whether a validation error of type TValidatorError is in Errors.
(Defined by IValidatorExtensions.) | |
FirstErrorType |
Returns Type of the first validation error in Errors.
(Defined by IValidatorExtensions.) | |
GetErrorMessages |
Returns collection of localized error messages that occurred during validation.
(Defined by IValidatorExtensions.) |