/** * @param \Magento\Catalog\Model\Product $item * @return array */ protected function getEntryData(\Magento\Catalog\Model\Product $item) { $description = ' <table><tr> <td><a href="%s"><img src="%s" alt="" border="0" align="left" height="75" width="75" /></a></td> <td style="text-decoration:none;">%s %s</td> </tr></table> '; $specialPrice = ''; if ($item->getAllowedPriceInRss()) { if ($this->msrpHelper->canApplyMsrp($item)) { $specialPrice = '<br/><a href="' . $item->getProductUrl() . '">' . __('Click for price') . '</a>'; } else { $special = ''; if ($item->getUseSpecial()) { $special = '<br />' . __('Special Expires On: %1', $this->formatDate($item->getSpecialToDate(), \IntlDateFormatter::MEDIUM)); } $specialPrice = sprintf('<p>%s %s%s</p>', __('Price: %1', $this->priceCurrency->convertAndFormat($item->getPrice())), __('Special Price: %1', $this->priceCurrency->convertAndFormat($item->getFinalPrice())), $special); } } $description = sprintf($description, $item->getProductUrl(), $this->imageHelper->init($item, 'rss_thumbnail')->getUrl(), $this->outputHelper->productAttribute($item, $item->getDescription(), 'description'), $specialPrice); return ['title' => $item->getName(), 'link' => $item->getProductUrl(), 'description' => $description]; }