I am trying to update all the quote item qty as soon as we navigated to the cart page.
by using below code.
$quote = $this->checkoutSession->getQuote();
$quoteItems = $quote->getAllVisibleItems();
foreach($quoteItems as $item) {
$productSku = $item->getSku();
$item->setQty(1);
$item->save();
}
The above code working fine if we run from the script for or from any of the controller file.
I am looking for code to implement in event and observers,
Is there any event for this, once navigated to cart page i need update qty for each item as 1.
Can anyone suggest which event is worth for it.
Thanks