From 4fdfcceeea3657aa9e0b12e2ed7138344e245417 Mon Sep 17 00:00:00 2001 From: MarcinNowakMacopedia <61323809+MarcinNowakMacopedia@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:24:22 +0200 Subject: [PATCH] Update app/code/core/Mage/Catalog/Model/Resource/Url.php Change the way of getting the product entityTypeId. Co-authored-by: Colin Mollenhour --- app/code/core/Mage/Catalog/Model/Resource/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Url.php b/app/code/core/Mage/Catalog/Model/Resource/Url.php index 81b5a464959..b3408762fbe 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Url.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Url.php @@ -80,7 +80,7 @@ class Mage_Catalog_Model_Resource_Url extends Mage_Core_Model_Resource_Db_Abstra protected function _construct() { $this->_init('core/url_rewrite', 'url_rewrite_id'); - $this->_productEntityTypeId = Mage::getModel('eav/entity')->setType(Mage_Catalog_Model_Product::ENTITY)->getTypeId(); + $this->_productEntityTypeId = Mage::getSingleton('eav/config')->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getId(); $this->_statusAttributeId = Mage::getModel('catalog/resource_eav_attribute') ->loadByCode($this->_productEntityTypeId, 'status')->getId(); }