public function removeItem($itemId, $user = null, $locale = null)
    {
        $cart = $this->getUserCart($user, $locale);

        $item = $this->orderManager->getOrderItemById($itemId, $cart->getEntity(), $hasMultiple);

        $this->orderManager->removeItem($item, $cart->getEntity(), !$hasMultiple);

        $this->orderManager->updateApiEntity($cart, $locale);

        return $cart;
    }
public function removeItem($itemId, $user = null, $locale = null)
    {
        $cart = $this->getUserCart($user, $locale);

        $item = $this->orderManager->getOrderItemById($itemId, $cart->getEntity(), $hasMultiple);

        $this->orderManager->removeItem($item, $cart->getEntity(), !$hasMultiple);

        $this->orderManager->updateApiEntity($cart, $locale);

        return $cart;
    }
public function removeItem ( $ itemId , $ user = null , $ locale = null ) { $ cart = $ this -> getUserCart ( $ user , $ locale ) ; $ item = $ this -> orderManager -> getOrderItemById ( $ itemId , $ cart -> getEntity ( ) , $ hasMultiple ) ; $ this -> orderManager -> removeItem ( $ item , $ cart -> getEntity ( ) , ! $ hasMultiple ) ; $ this -> orderManager -> updateApiEntity ( $ cart , $ locale ) ; return $ cart ; }
Removes an item from cart

@param int $itemId
@param null|UserInterface $user
@param null|string $locale

@return null|Order
Removes an item from cart