Skip to content

Commit

Permalink
Update app/code/core/Mage/Catalog/Model/Resource/Url.php
Browse files Browse the repository at this point in the history
Change the way of getting the product entityTypeId.

Co-authored-by: Colin Mollenhour <[email protected]>
  • Loading branch information
MarcinNowakWebdeveloper and colinmollenhour committed Oct 11, 2022
1 parent 46887fb commit 4fdfcce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Resource/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 4fdfcce

Please sign in to comment.