I have spent hours trying to find how to get a simple thing like all products - including the disabled ones.

My apologies , this is such an old version! I have looked up most of the posts on stack exchange etc to do this. the closest I have got is This post

In my code below , $products and $allProducts give me exactly the same amount , leaving out 200+ disabled products.

  • This is Magento 1.3

  • I do have flat catalog product & category switched on , and I want to run this script fairly regularly and don't want to have to switch it off.

  • I have read several other stack overflow etc. posts that don't work either.

Any Ideas how I can get all products in Magento 1.3 including the disabled ones?


header('Content-Type: application/json');
ini_set("display_errors", 1);


$storeId = Mage::app()->getStore()->getId();

$products = Mage::getModel('catalog/product')
    ->addAttributeToSort('created_at', 'DESC')

$allProducts = Mage::getResourceModel('catalog/product_collection');

echo $products->getSize();
echo $allProducts->getSize();


2 Answers 2


Try following way:

$newStoreId = Mage_Core_Model_App::ADMIN_STORE_ID;

$productCollection = $category->getProductCollection()->addAttributeToSelect('*');

Now you will able to get all products. But one problem here, that is product url. So use following code if you need url as well:

foreach ($productCollection as $product) {

  • I can't thank you enough! I did need to change the code because I am not using a category ( so you may want to change your answer ) , but it does the job in Magento 1.3. thanks. Apr 14, 2018 at 7:46

Try to use this code. You'll get disabled product collection using this code.

$collection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_DISABLED));
  • Thanks , good answer for the filtering , but you do need to set the current store first ( as above ) . thank you for your time. Apr 14, 2018 at 7:47

Your Answer

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

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