public function removeFromOrderAction(Request $request)
    {
        $updater = $this->container->get('librinfo_ecommerce.order.item_updater');

        $result = $updater->updateItemCount($request->get('order'), $request->get('item'), false);

        if ($result['lastItem'] != null) {
            $result['message'] = $this->container->get('translator')->trans('There must be at least one item left in the order');
        }

        return new JsonResponse($result);
    }
public function removeFromOrderAction(Request $request)
    {
        $updater = $this->container->get('librinfo_ecommerce.order.item_updater');

        $result = $updater->updateItemCount($request->get('order'), $request->get('item'), false);

        if ($result['lastItem'] != null) {
            $result['message'] = $this->container->get('translator')->trans('There must be at least one item left in the order');
        }

        return new JsonResponse($result);
    }
public function removeFromOrderAction ( Request $ request ) { $ updater = $ this -> container -> get ( 'librinfo_ecommerce.order.item_updater' ) ; $ result = $ updater -> updateItemCount ( $ request -> get ( 'order' ) , $ request -> get ( 'item' ) , false ) ; if ( $ result [ 'lastItem' ] != null ) { $ result [ 'message' ] = $ this -> container -> get ( 'translator' ) -> trans ( 'There must be at least one item left in the order' ) ; } return new JsonResponse ( $ result ) ; }
Decrease order item quantity.

@param Request $request

@return JsonResponse
Decrease order item quantity .