第一次来这里。
我正在尝试将此代码从 Magento 1.6 迁移到 M 2.0。我必须注意,我只有编程的基本知识,所以这对我来说很难。我做了一些研究,发现 Mage 在 M 2.0 中更改为 Bootstrap。和 getModel 也发生了变化。我不是在要求完整的解决方案,因为我想练习。你能告诉我哪里出了问题或指导我一点,以便我自己找到吗?
$mageFilename = '../app/Mage.php';
require_once $mageFilename;
umask(0);
Mage::app('default');
$intRootCategoryId = Mage::app()->getStore()->getRootCategoryId();
$objCategories = Mage::getModel('catalog/category')->getCollection();
$arrCategories = array();