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

2 Responses to “Get cart products in Magento”

  1. Thanks mate, it helps alot.

  2. John says:

    Works fine and saved me some time, thanks

Leave a Reply

top