Class CartResponseModel
- Namespace
- Dynamicweb.Ecommerce.Frontend
- Assembly
- Dynamicweb.Ecommerce.dll
Unified response model for cart operations that contains both the current cart state and any validation information from cart operations.
public class CartResponseModel : ViewModelBase
- Inheritance
-
CartResponseModel
- Inherited Members
Remarks
This model provides a consistent API response structure for all cart operations, whether successful or containing validation errors. It allows clients to always receive HTTP 200 responses with complete cart information and any relevant validation feedback in a single, well-structured response.
Properties
Cart
Gets or sets the current order view model containing the complete cart state.
public OrderViewModel Cart { get; set; }
Property Value
Remarks
This property always contains the current cart state, including any successfully added products and calculated totals. Even when validation errors occur, this represents the cart's actual state after the operation.
IsSuccess
Gets a value indicating whether the cart operation completed without validation errors.
public bool IsSuccess { get; }
Property Value
- bool
trueif no validation errors occurred; otherwisefalse.
Review
Gets or sets the cart review model containing validation results from cart operations.
public CartReviewViewModel Review { get; set; }
Property Value
Remarks
This property contains detailed information about any validation errors that occurred during cart operations, along with comprehensive product information to help users resolve issues. When null, the operation completed without validation errors.