הדריסה של הקובץ , האתגר זה למצוא את הפונקציה הרלוונטים אחרי זה רק מתייחסים לנתיב הרלוונטי : Product.php
<?php
namespace Anagal\NewPrice\Model\Catalog;
class Product extends \Magento\Catalog\Model\Product
{
/**
* Get product name
*
* @return string
* @codeCoverageIgnoreStart
*/
public function getName()
{
// logging to test override
$logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
$logger->debug('getName on');
return $this->_getData(self::NAME);
}
public function getPrice()
{
// logging to test override
$logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
$logger->debug('getPrice on');
return $this->_getData(self::NAME);
// if ($this->_calculatePrice || !$this->getData(self::PRICE)) {
// return $this->getPriceModel()->getPrice($this);
// } else {
// return $this->getData(self::PRICE);
// }
}
}
?>