getItem()->getOptionByCode('simple_product')) { return $option->getProduct(); } return $this->getProduct(); } /** * Get item product name * * @return string */ public function getProductName() { if ($option = $this->getItem()->getOptionByCode('simple_product')) { return $option->getProduct()->getName(); } return $this->getProduct()->getName(); } /** * Get list of all options for product * * @return array */ public function getOptionList() { return $this->_productConfig->getOptions($this->getItem()); } /** * Return identifiers for produced content * * @return array */ public function getIdentities() { $identities = parent::getIdentities(); if ($this->getItem()) { $identities = array_merge($identities, $this->getChildProduct()->getIdentities()); } return $identities; } /** * Get price for exact simple product added to cart * * @inheritdoc * @since 100.3.1 */ public function getProductPriceHtml(\Magento\Catalog\Model\Product $product) { return parent::getProductPriceHtml($this->getChildProduct()); } } { }