Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

GetShoppingCartItemUnitPriceEvent.cs

using Nop.Core.Domain.Discounts;
using Nop.Core.Events;

namespace Nop.Core.Domain.Orders;

/// 
/// Shopping cart item get unit price event
/// 
public partial class GetShoppingCartItemUnitPriceEvent : IStopProcessingEvent
{
    /// 
    /// Ctor
    /// 
    /// Shopping cart item
    /// A value indicating whether include discounts or not for price computation
    public GetShoppingCartItemUnitPriceEvent(ShoppingCartItem shoppingCartItem, bool includeDiscounts)
    {
        ShoppingCartItem = shoppingCartItem;
        IncludeDiscounts = includeDiscounts;
    }

    /// 
    /// Gets a value indicating whether include discounts or not for price computation
    /// 
    public bool IncludeDiscounts { get; }

    /// 
    /// Gets the shopping cart item
    /// 
    public ShoppingCartItem ShoppingCartItem { get; }

    /// 
    /// Gets or sets a value whether processing of event publishing should be stopped
    /// 
    public bool StopProcessing { get; set; }

    /// 
    /// Gets or sets the unit price in primary store currency
    /// 
    public decimal UnitPrice { get; set; }

    /// 
    /// Gets or sets the discount amount
    /// 
    public decimal DiscountAmount { get; set; }

    /// 
    /// Gets or sets the applied discounts
    /// 
    public List AppliedDiscounts { get; set; } = new();
}