I want to increase product price when to increase qty in Minicart, but here order total increased but price not updated.
Screenshot : https://i.stack.imgur.com/uMJ53.png
Hi,
You have to make an Ajax call and execute the following functionality:-
// Product ID and Quantity $pid = $_REQUEST['productId']; $qnt = $_REQUEST['qty']; $cart = Mage::getSingleton('checkout/cart'); $items = $cart->getItems(); foreach ($items as $item) : if($pid == $item->getId()) : echo $item->getQty(); $item->setQty($qnt); $cart->save(); endif; endforeach;
This is just an example, you need to manage the variables according to your need. Whenever button is press just make a ajax call and update cart and then you need to update it via Ajax in other place where you want. Above code provide you the way to save product quantity to cart.