我正在使用 PHP 在 Magento 1.4.2 中设置我的类别
$categories[] = array('id' => '23', 'path' => '16');
$categories[] = array('id' => '24', 'path' => '16/23');
$categories[] = array('id' => '25', 'path' => '16/23/24');
foreach ($categories as $category) {
$current_category = Mage::getModel('catalog/category')
->load($category['id'])
->setPath('1/2/'.$category['path'])
->save();
}
然而出了点问题
类别已像这样导入:
root
-23
-16
--24
并且25
无处可见
我的逻辑或如何使用Mage::getModel('catalog/category')
和->setPath