Hello,
I use Magento v. 1.9.4.5
A customer of the site is having problems accessing his account. Trying to view the details of the respective account, I receive the following error
Spoiler (Highlight to read) Fatal error : Call to a member function getName() on a non-object in /home/r62525www/public_html/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php on line 721
Fatal error: Call to a member function getName() on a non-object in /home/r62525www/public_html/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php on line 721
On that line i have the following function:
Spoiler (Highlight to read) public function getOrderOptions($product = null) { $options = parent::getOrderOptions($product); $options['attributes_info'] = $this->getSelectedAttributesInfo($product); if ($simpleOption = $this->getProduct($product)->getCustomOption('simple_product')) { $options['simple_name'] = $simpleOption->getProduct($product)->getName(); $options['simple_sku'] = $simpleOption->getProduct($product)->getSku(); }
$options['product_calculations'] = self::CALCULATE_PARENT; $options['shipment_type'] = self: HIPMENT_TOGETHER;
return $options; }
public function getOrderOptions($product = null){$options = parent::getOrderOptions($product);$options['attributes_info'] = $this->getSelectedAttributesInfo($product);if ($simpleOption = $this->getProduct($product)->getCustomOption('simple_product')) {$options['simple_name'] = $simpleOption->getProduct($product)->getName();$options['simple_sku'] = $simpleOption->getProduct($product)->getSku();}$options['product_calculations'] = self::CALCULATE_PARENT;$options['shipment_type'] = self:
HIPMENT_TOGETHER;return $options;}
And the line 721 it is:
Spoiler (Highlight to read) $options['simple_name'] = $simpleOption->getProduct($product)->getName();
$options['simple_name'] = $simpleOption->getProduct($product)->getName();
I tried to access the details of other customers and everything is functional
Can you please help me resolv this error.
Thank you in advance
PS. first I searched the internet for a solution for the error on line 721 but I didn't find anything