Magento: Filter products by Status

后端 未结 5 1918
余生分开走
余生分开走 2020-12-30 00:09

I\'m having some serious Magento issues here. As expected the following:

$products = Mage::getModel(\'catalog/category\')->load($category_id)
->getProd         


        
5条回答
  •  没有蜡笔的小新
    2020-12-30 00:18

    I think you can do this by setting store to default like

    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    

    make sure you save the current store value and set it back after doing the above.

    Or by using a script from outside magento and invoke mage by

    require_once '../app/Mage.php';
    $app = Mage::app();
    Mage::register('isSecureArea', true);
    

提交回复
热议问题