我尝试使用以下代码获取attribute_set_id:
$SetId = Mage::getModel('eav/entity_setup')
->getAttributeSetId('catalog_product','Default');
但是,我总是收到此错误:
Call to a member function select() on a non-object in
magento\app\code\core\Mage\Core\Model\Resource\Setup.php on line 734
这是 Setup.php 第 734 行:
$select = $adapter->select()
->from($table)
->where($adapter->quoteIdentifier($idField) . '= :id_field');
我所知道的 Mage_Eav_Model_Entity_Setup类已经扩展了Mage_Core_Model_Resource_Setup类。为什么它仍然说非对象?
谢谢你。