public JsonResult UpdateItems(JsonBasketQtyUpdateRequest jsonBasketQtyUpdateRequest)
        {
            ModifyBasketRequest request = new ModifyBasketRequest();            
            request.BasketId = base.GetBasketId();
            request.ItemsToUpdate = jsonBasketQtyUpdateRequest.ConvertToBasketItemUpdateRequests(); ;

            BasketDetailView basketDetailView = new BasketDetailView();
            ModifyBasketResponse reponse = _basketService.ModifyBasket(request);

            SaveBasketSummaryToCookie(reponse.Basket.NumberOfItems, reponse.Basket.BasketTotal);

            basketDetailView.BasketSummary = new BasketSummaryView()
            {
                BasketTotal = reponse.Basket.BasketTotal,
                NumberOfItems = reponse.Basket.NumberOfItems
            };

            basketDetailView.Basket = reponse.Basket;

            basketDetailView.DeliveryOptions = _basketService.GetAllDespatchOptions().DeliveryOptions;

            return Json(basketDetailView);
        }
 ConvertToBasketItemUpdateRequests(
     this JsonBasketQtyUpdateRequest jsonBasketQtyUpdateRequest)
 {
     return(jsonBasketQtyUpdateRequest.Items
            .ConvertToBasketItemUpdateRequests());
 }
 public static IList <ProductQtyUpdateRequest> ConvertToBasketItemUpdateRequests(this JsonBasketQtyUpdateRequest jsonBasketQtyUpdateRequest)
 {
     return(jsonBasketQtyUpdateRequest.Items.ConvertToBasketItemUpdateRequests());
 }