cancel
Showing results for 
Search instead for 
Did you mean: 

how to capture the checkout cart item qty update events.

how to capture the checkout cart item qty update events.

`
checkout_cart_update_item_complete
`

i want to store the all item Qty has been change on checkout cart page.  qty increase/decrease capture
3 REPLIES 3

Re: how to capture the checkout cart item qty update events.


@MIBridges wrote:
`
checkout_cart_update_item_complete
`

i want to store the all item Qty has been change on checkout cart page.  qty increase/decrease capture

<event name="checkout_cart_save_before">
    <observer name="my_save_cart" instance="Namespace\Module\Observer\CartSaveObserver"/>
</event>

 

Re: how to capture the checkout cart item qty update events.

@bayerruffgd439 

 

still i am not getting the Item or Qty 

public function execute(\Magento\Framework\Event\Observer $observer)
 {
         echo "this is magento cart item update after  event work";   
        $ob_productId = $observer->getEvent()->getObservers();
        echo " ==  productId  ==";
        print_r($ob_productId);

        $peraproductId= $this->_request->getParam('product');
        echo " ==  peraproductId  ==" . $peraproductId;         
                 
        $item          = $observer->getEvent()->getQuoteItem();       
        $qty           = $item->getQty();
        print_r ($item);
        print_r ($qty);
exit();

}

 

 

Re: how to capture the checkout cart item qty update events.

The commerce/cart/update-cart endpoint is for both adding and updating cart items. You can directly modify any line item's qty , note , and options using that ...TellCulvers