Exemple #1
0
        public ActionResult ProcessShoppingCartItem(ShopingCartItemObject cartItem, string subdomain)
        {
            try
            {
                if (cartItem == null || cartItem.QuantityOrdered < 1)
                {
                    return(Json(0, JsonRequestBehavior.AllowGet));
                }

                var store = new SessionHelpers().GetStoreInfo(subdomain);
                if (store == null || store.StoreId < 1)
                {
                    return(Json(new StoreItemStockObject(), JsonRequestBehavior.AllowGet));
                }

                var processStatus = new DefaultServices().ProcessShoppingCartItem(cartItem);

                return(Json(processStatus, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new StoreItemStockObject(), JsonRequestBehavior.AllowGet));
            }
        }
Exemple #2
0
 public ShopingCartItemObject ProcessShoppingCartItem(ShopingCartItemObject cartItem)
 {
     return(_defaultsRepository.ProcessShoppingCartItem(cartItem));
 }