1

I want to display the upsell products on the checkout page. can anyone suggest the solution? I am using Magento 1.9.

1

It is advisable to know that : the Up-sells are nativelly displayed in product view page, it's the items that you would like your customer to buy instead of the product that he is viewing ! If you want to display them in checkout, It would not matter much because the customer has already chosen his product.

What you should display is rather the Cross-sells, they are usually displayed in the shopping cart page, this functionality is intended to make customers buy items they didn’t had in mind when they came to your site and you can set all this in your product via admin panel product->manage products

More information in Inchoo article.

0

You need to create one block class and template that will be added on cart page. Load all the Cart Items products there like below:

$cart = Mage::getModel('checkout/cart')->getQuote();
foreach ($cart->getAllItems() as $item) {
  $productObject = $item->getProduct()
} 

Now as you got the Product Object check Mage_Catalog_Block_Product_List_Upsell block class _prepareData function. Use the same logic to fetch Upsell products are cart Items.

0
$cart = Mage::getModel('checkout/cart')->getQuote();

foreach ($cart->getAllItems() as $item) {
    $productObject = $item->getProduct();
    $id = $productObject->getId();
    $upsell_product = $productObject->getUpSellProductCollection();  
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.