Last active
December 17, 2019 11:14
-
-
Save aurire/cbf2512d577e8ece344c847f7c898fb6 to your computer and use it in GitHub Desktop.
Magento. Get Catalog Product Entity Type ID, instead of using 4 (MAGIC NUMBER). Works the same, for getting other entity type id by name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$entityTypeId = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId(); | |
//Alternative | |
$entityTypeId = Mage::getSingleton('ceav/config')->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getId(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be eav/config instead of ceav/config