I just started to learn Magento2 and never dealt with Magento before. I have custom theme where in wishlist I need to show product description. So here


in name.phtml I tried to get product description but without success.

I have tried this

$this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getDescription(), 'description')

but it didn't work.

Currently the code of name.phtml looks like

 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.

// @codingStandardsIgnoreFile

/* @var \Magento\Wishlist\Model\Item $item */

$item = $block->getItem();
$product = $item->getProduct();

<div class="col-lg-5">
  <strong class="product-item-name">
    <a href="<?php /* @escapeNotVerified */ echo $block->getProductUrl($item) ?>" title="<?php echo $block->escapeHtml($product->getName()) ?>" class="product-item-link">
        <?php echo $block->escapeHtml($product->getName()) ?>           
<?php //echo $helper_desc->getProductDescription($item) ?>

I need to get description on this line

<?php //echo $helper_desc->getProductDescription($item) ?>

Could you please help to get product description in name.phtml? If this matters site is on production mode.

1 Answer 1


Try with this

<?php echo $item->getAttributeText('attribute_name'); ?>

Works if the attribute is a dropdown

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.