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?
<?php
header('Content-Type: application/json');
error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once('./app/Mage.php');
Mage::app();
$storeId = Mage::app()->getStore()->getId();
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToSort('created_at', 'DESC')
->load();
$allProducts = Mage::getResourceModel('catalog/product_collection');
echo $products->getSize();
echo $allProducts->getSize();
?>