1

How to move a product/item who was added to cart/quote on websiteA to cart/quote which is on websiteB.

I would like to solve this problem with controller, but I am not very successfull.

Do you suggest something different?

code in my controller:

$oldQuote = $session->getQuote();
$oldQuoteItems = $oldQuote->getAllItems();
$newQuote = Mage::getModel("sales/quote")->setStoreId(1);
foreach ($oldQuoteItems as $_item) {

    if ($helper->checkProduct($_item->getProduct())) {
        $newQuote->addItem($_item);
        //$oldQuote->removeItem($_item);
    }
}


try {
    $newQuote->collectTotals()->save();
    $oldQuote->collectTotals()->save();
}

Thanks for the help

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.