Magento 1.9 – Display Short Description on Review Page

magento-1.9product-viewreview

Our Review page displaying same as product view page except short description.

when i add below code in app/design/frontend/rwd/theme/template/review/product/view.phtml

it didn't displayed short description in review page.

when i use template path hints, it gave like this

<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>

or

 <?php echo $this->htmlEscape($this->getProductInfo()->getShortDescription()); ?>

complete code of review/product/view.phtml

    <!-- Short Description -->

<?php 
//  echo $this->escapeHtml($this->getProductData()->getShortDescription());     
//  $pro=Mage::getModel('catalog/product')->load($this->getProductData()->getId()); echo $pro->getShortDescription();

echo $this->getProductData()->getShortDescription();
?>

<p>test</p>
<!-- Short Description -->

<?php if($this->getProductData()->getId()): ?>
<div class="product-review">
    <div class="page-title">
        <h1><?php echo $this->__('Review Details') ?></h1>
    </div>
    <div class="product-img-box">
        <a href="<?php echo $this->getProductData()->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductData()->getName()) ?>">
            <img src="<?php echo $this->helper('catalog/image')->init($this->getProductData(), 'small_image')->resize(450, 450)->keepFrame(false); ?>"
                 alt="<?php echo $this->escapeHtml($this->getProductData()->getName()) ?>"
                 class="product-image" />
        </a>
        <?php if( $this->getRating() && $this->getRating()->getSize()): ?>
             <p class="label"><?php echo $this->__('Average Customer Rating') ?>:</p>
             <?php echo $this->getReviewsSummaryHtml($this->getProductData()) ?>
        <?php endif; ?>
    </div>
    <div class="product-details">
        <h2 class="product-name"><?php echo $this->escapeHtml($this->getProductData()->getName()) ?></h2>
        <?php if( $this->getRating() && $this->getRating()->getSize()): ?>
            <h3><?php echo $this->__('Product Rating:') ?></h3>
            <table class="ratings-table">
            <?php foreach ($this->getRating() as $_rating): ?>
                <?php if($_rating->getPercent()): ?>
                    <tr>
                        <th><?php echo $this->__($this->escapeHtml($_rating->getRatingCode())) ?></th>
                        <td>
                            <div class="rating-box">
                                <div class="rating" style="width:<?php echo ceil($_rating->getPercent()) ?>%;"></div>
                            </div>
                        </td>
                    </tr>
                <?php endif; ?>
            <?php endforeach; ?>
            </table>
            </dl>
        <?php endif; ?>
        <dl>
            <dt>
                <?php echo $this->__('Product Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?>
            </dt>
            <dd>
                <?php echo nl2br($this->escapeHtml($this->getReviewData()->getDetail())) ?>
            </dd>
        </dl>
    </div>
    <div class="buttons-set">
        <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Product Reviews') ?></a></p>
    </div>
</div>
<?php endif; ?>

Review

enter image description here

Product view

enter image description here

Best Answer

you are editing the wrong file add your code in this file. frontend/rwd/Stylebaby/template/review/product/view/list.phtml

use this code

<?php  
            $prod=Mage::getModel('catalog/product')->load($this->getProduct()->getId()); echo $prod->getShortDescription();
  ?>