I want to add dynamically new products in the cart during the checkout process, but I've no clear the differences between the Quote and the Cart.
In my catalog pages I'm adding contents directly to the cart with:
$cart = Mage::getSingleton('checkout/cart'); $cart->init(); $cart->addProduct($product, $params); $cart->save();
whereas in the checkout process I am using:
$quote = $this->getOnepage()->getQuote(); $product = Mage::getModel('catalog/product')->load( $params = array( 'product' => 113, 'qty' => 1 ); $quoteItem = Mage::getModel('sales/quote_item')->setProduct($product)->setQty(1); $quoteItem->setStoreId(Mage::app()->getStore()->getId()); $quote->addItem($quoteItem); $quote->save();
Not sure why I am doing like that :) Does it make sense to also add the products in the cart in that last step?
Can someone throw some light on this?