search
top

Get cart products in Magento

Hello All,

I am writing here a script for getting all the product’s id added into cart


<?php

    	$product_ids = Mage::getModel('checkout/cart')->getProductIds(); //get cart product ids

        print_r($product_ids);
?>

Hope this is useful



One Response to “Get cart products in Magento”

  1. John says:

    Works fine and saved me some time, thanks

Leave a Reply

top