protected function updateRow($rawId, array $attributes)
    {
        $cart = $this->getCart();

        $row = $cart->get($rawId);

        foreach ($attributes as $key => $value) {
            $row->put($key, $value);
        }

        if (count(array_intersect(array_keys($attributes), ['qty', 'price']))) {
            $row->put('total', $row->qty * $row->price);
        }

        $cart->put($rawId, $row);

        return $row;
    }
protected function updateRow($rawId, array $attributes)
    {
        $cart = $this->getCart();

        $row = $cart->get($rawId);

        foreach ($attributes as $key => $value) {
            $row->put($key, $value);
        }

        if (count(array_intersect(array_keys($attributes), ['qty', 'price']))) {
            $row->put('total', $row->qty * $row->price);
        }

        $cart->put($rawId, $row);

        return $row;
    }
protected function updateRow ( $ rawId , array $ attributes ) { $ cart = $ this -> getCart ( ) ; $ row = $ cart -> get ( $ rawId ) ; foreach ( $ attributes as $ key => $ value ) { $ row -> put ( $ key , $ value ) ; } if ( count ( array_intersect ( array_keys ( $ attributes ) , [ 'qty' , 'price' ] ) ) ) { $ row -> put ( 'total' , $ row -> qty * $ row -> price ) ; } $ cart -> put ( $ rawId , $ row ) ; return $ row ; }
Update a row if the rawId already exists.

@param string $rawId      The ID of the row to update
@param array  $attributes The quantity to add to the row

@return Item
Update a row if the rawId already exists .