Monday, 25 March 2019

How to copy one quote (only cart items) to other quote (only items ) in magento

$quoteA = Mage::getModel('sales/quote')->load($quoteId);
$quoteB = Mage::getModel('sales/quote')->load($userQuoteId);
$quoteB->merge($quoteA);
$quoteA->delete();
$quoteA->collectTotals()->save();
$quoteB->collectTotals()->save();

No comments:

Post a Comment