You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class CartAfterShippingCalculation : NotificationSubscriberBase
{
public override void OnNotify(string notification, NotificationArgs args)
{
if (args is null || Context.Current?.Items is null)
return;
var calculationArgs = (Ecommerce.Notifications.Ecommerce.Cart.AfterShippingCalculationArgs)args;
if (string.IsNullOrEmpty(calculationArgs.Shipping?.Id) || calculationArgs.Order is null || Context.Current.Session?[ErpShippingFeeProvider.OrderMarkerKey(calculationArgs.Order.Id)] is null)
{
return;
}
var cached = Context.Current.Session[ErpShippingFeeProvider.MethodCacheKey(calculationArgs.Order.Id, calculationArgs.Shipping?.Id)] as PriceInfo;