Update the cart item with the given rowId.

@param string $rowId
@param mixed  $qty
@return \Gloudemans\Shoppingcart\CartItem
355169
public function update($rowId, $qty)
    {
        $cartItem = $this->get($rowId);

        if ($qty instanceof Buyable) {
            $cartItem->updateFromBuyable($qty);
        } elseif (is_array($qty)) {
            $cartItem->updateFromArray($qty);
        } else {
            $cartItem->qty = $qty;
        }

        $content = $this->getContent();

        if ($rowId !== $cartItem->rowId) {
            $content->pull($rowId);

            if ($content->has($cartItem->rowId)) {
                $existingCartItem = $this->get($cartItem->rowId);
                $cartItem->setQuantity($existingCartItem->qty + $cartItem->qty);
            }
        }

        if ($cartItem->qty <= 0) {
            $this->remove($cartItem->rowId);
            return;
        } else {
            $content->put($cartItem->rowId, $cartItem);
        }

        $this->events->fire('cart.updated', $cartItem);

        $this->session->put($this->instance, $content);

        return $cartItem;
    }
68265
public function get($rowId)
        {
            $cart = $this->getContent();
            $rows = $cart->_fields;
            return (Arrays::inArray($rowId, $rows)) ? $cart->$rowId : null;
        }
1265871
public function addProduct($id, $qty = 1, $spec = [])
    {
        $body = [
            'data' => [
                'type' => 'cart_item',
                'id' => $id,
                'quantity' => $qty
            ]
        ];
        return $this->call('POST', $body, $this->getReference() . '/items');
    }
1160094
public function add(CartItem $cartItem)
    {
        $itemId = $cartItem->getId();

        // if item already exists in the cart, just update the quantity,
        // otherwise add it as a new item
        if ($this->has($itemId)) {
            $existingItem = $this->find($itemId);
            $existingItem->quantity += $cartItem->quantity;
        } else {
            $this->items[] = $cartItem;
        }
    }
72417
public function addItem($id, $name = null, $type = null, $qty = 1, Money $price = null, $uri = null, array $options = [])
    {
        $cartItem = CartItem::fromAttributes($id, $name, $type, $price, $uri, $options);

        return $this->addItemToCart($cartItem, $qty);
    }
362934
public function updateItemsData($items)
    {
        $items->each(function ($item) {
            CartItem::where('id', $item->id)->update([
                'name' => $item->name,
                'price' => $item->price,
                'image' => $item->image,
            ]);
        });
    }
339384
public function add($entity, $quantity)
    {
        if ($this->itemExists($entity)) {
            $cartItemIndex = $this->items->search($this->cartItemsCheck($entity));

            return $this->incrementQuantityAt($cartItemIndex, $quantity);
        }

        $this->items->push(CartItem::createFrom($entity, $quantity));

        event(new CartItemAdded($entity));

        return $this->cartUpdates($isNewItem = true);
    }
1205536
public function getCellData($rowId, $columnId)
    {

        /* @var $columnData ColumnData */
        $columnData = $this->getColumnData($columnId);

        return $columnData->getCellData($rowId);
    }
1340272
public static function update($itemid, $newvalue) {
        require_capability('moodle/tag:manage', context_system::instance());
        $tag = core_tag_tag::get($itemid, '*', MUST_EXIST);
        $newvalue = (int)clean_param($newvalue, PARAM_BOOL);
        $tag->update(array('isstandard' => $newvalue));
        return new self($tag);
    }
573595
protected function updateQuantity(EventDispatcherInterface $dispatcher, CartItem $cartItem, $quantity)
    {
        $cartItem->setDisptacher($dispatcher);
        $cartItem->updateQuantity($quantity)
            ->save();

        return $cartItem;
    }
206601
public function setQuantity($qty)
    {
        if(empty($qty) || ! is_numeric($qty))
            throw new \InvalidArgumentException('Please supply a valid quantity.');

        $this->qty = $qty;
    }
1185784
protected function makeRow($rawId, $id, $name, $qty, $price, array $attributes = [])
    {
        return new Item(array_merge([
                                     '__raw_id' => $rawId,
                                     'id' => $id,
                                     'name' => $name,
                                     'qty' => $qty,
                                     'price' => $price,
                                     'total' => $qty * $price,
                                     '__model' => $this->model,
                                    ], $attributes));
    }
1228226
public function updateNodeSet(RowInterface $row, $propertyData)
    {
        $node = $row->getNode($propertyData['selector']);
        $value = $propertyData['value'];

        if ($value instanceof FunctionOperand) {
            $value = $propertyData['value'];
            $value = $value->execute($this->functionMapSet, $row);
        }

        $node->setProperty($propertyData['name'], $value);
    }
615844
public function update($cart_id, array $data)
    {
        $result = null;
        $this->hook->attach('cart.update.before', $cart_id, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $data['modified'] = GC_TIME;
        $result = (bool) $this->db->update('cart', $data, array('cart_id' => $cart_id));

        gplcart_static_clear();

        $this->hook->attach('cart.update.after', $cart_id, $data, $result, $this);
        return (bool) $result;
    }
864707
protected function updateCart(CartInterface $cart, ClientInterface $client = null, $currency)
    {
        $needsUpdate = false;

        if ($client !== $cart->getClient()) {
            $cart->setClient($client);
            $needsUpdate = true;
        }

        if ($currency !== $cart->getCurrency()) {
            $cart->setCurrency($currency);
            $needsUpdate = true;
        }

        if ($needsUpdate) {
            $this->updateResource($cart);
        }
    }
438129
public function SetField($RowID, $Property, $Value = FALSE) {
      if (!is_array($Property))
         $Property = array($Property => $Value);
      
      $this->DefineSchema();      
      $Set = array_intersect_key($Property, $this->Schema->Fields());
      self::SerializeRow($Set);
      $this->SQL->Put($this->Name, $Set, array($this->PrimaryKey => $RowID));
   }
1201370
public function updateItemInCart($productid, $quantity)
	{
		$olderProduct = ShoppingCartItem::where('product_id', '=', $productid)->where('user_id', '=', Auth::user()->id)->first();
		if($olderProduct != null) {
			$olderProduct->qty = $quantity;
			$olderProduct->save(); 
		}
	}