Table of Contents

Class CartViewModelExtensions

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.Ecommerce.dll

Extension methods for CartViewModel.

public static class CartViewModelExtensions
Inheritance
CartViewModelExtensions
Inherited Members

Methods

GetCartCommandResult(CartViewModel)

Gets and clears the current cart command result from session.

public static CartCommandResult? GetCartCommandResult(this CartViewModel cartViewModel)

Parameters

cartViewModel CartViewModel

The cart view model instance.

Returns

CartCommandResult

The cart command result, or null if no result is set.

Remarks

This method retrieves cart command results (such as add to cart success/failure messages) from the session and clears them after retrieval to prevent them from persisting across multiple page requests.

To top