public CartCountResult GetCounters(string cart = null)
 {
     try
     {
         if (string.IsNullOrEmpty(cart))
         {
             cart = Mediachase.Commerce.Orders.Cart.DefaultName;
         }
         var output = new CartCountResult()
         {
             wishlist = Cart.Service.GetTotal("WishList"),
             cart     = Cart.Service.GetTotal(cart)
         };
         return(output);
     }
     catch (OperationCanceledException)
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 public CartCountResult GetCounters(string cart = null)
 {
     try
     {
         if (string.IsNullOrEmpty(cart))
         {
             cart = Mediachase.Commerce.Orders.Cart.DefaultName;
         }
         var output = new CartCountResult()
         {
             wishlist = Cart.Service.GetTotal("WishList"),
             cart = Cart.Service.GetTotal(cart)
         };
         return output;
     }
     catch (OperationCanceledException)
     {
         return null;
     }
 }