Magento – How to update all prices in quote item table in magento2

magento2quoteitem

I have quote id I want to update price , base_row_total & other prices related field in quote should i want to set price only rest field should automatically update is this possible or i am thinking wrong .
please help thanks in advance

I am using the below Code but its shores only sku,name,store_id,i checked default magento cart Api its storing all vales in quote Table i want to do the same but its not working for me:

 $product = $this->product->get($this->sku);

        $quoteItem = $this->quoteItemFactory->create();

        $quoteItem->setProduct($product);

Best Answer

Yes. You can changes price of all items of a quote.

Use

$QuoteObjectitem->setCustomPrice($YourPrice);
$QuoteObjectitem->setOriginalCustomPrice($YourPrice);
Related Topic