I want to display description on the product listing page of Wishlist.
Facing the Fatal error:
Fatal error: Class 'Satish\Wishlist\Block\Description' not found in /home/decure/public_html/test/var/generation/SatishWishlist/Block/Description/Interceptor.php on line 7
description.php
file in block
<?php
namespace Satish\Wishlist\Block;
class Description extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Info
{
protected $_productloader;
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Catalog\Model\ProductFactory $_productloader
) {
$this->_productloader = $_productloader;
parent::__construct($context);
}
public function getDescription()
{
$id = $this->getItem()->getProduct()->getId();
$this->_productloader->create()->load($id);
return $product->getDescription();
}
}
Satish\Wishlist\Block\Description
file and have you runphp bin/magento setup:di:compile
command?