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)); } }
public ShopingCartItemObject ProcessShoppingCartItem(ShopingCartItemObject cartItem) { return(_defaultsRepository.ProcessShoppingCartItem(cartItem)); }