1

I am having problem with 'Review' tab that I added to our product view page. The tab itself works fine but for some reason my 'Short Description' does not show up anymore. I added the following code under

    <catalog_product_view translate="label"> 
<reference name="content"> 
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">

in catalog.xml

<block type="review/product_view_list"
 name="product.info.product_additional_data" as="product_review"
template="review/product/view/list.phtml"> <block type="review/form"
 name="product.review.form" as="review_form"/> </block>

and then called it in my product view.phtml

<?php echo $this->getChildHtml('product_review') ?>

'Short Descr' is called in product view.phtml as below:

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

Could someone please point me to the directions as to why 'Short Description' would stop displaying ? As soon as I comment out the code I added in catalog.xml 'Short Descr' comes back.
Thanks a lot!

2 Answers 2

1

Maybe some js or css is hidding it for you ? product.info is parent block for your reviews block. Any html comming from catalog/product/view.phtml sholud be there if you are seeing your review tab. View source of product view page and Ctrl+f for class="short-description", see if its beein generated.

2
  • Thank you but this is not the case, I checked the source, css & js and nothing there is hiding it. Disabling js & css still did not bring bring the block back. I removed '<?php if ($_product->getShortDescription()):?>' conditional from product view and all it did was place '<div class="short-description"> <div class="std"> </div> </div> ' in product view without the 'Short Description' block inside @maquowicz
    – Darek K
    Jan 30, 2016 at 7:20
  • I've tested your code on a clean template. It works just fine. Check your php error-log or Magento system.log aren't producing eny output. Create an override for review/product/view/list.phtml within your template and put some really simple content inside like 'Hello this is a reviews block template'.
    – maquowicz
    Jan 31, 2016 at 14:18
0

Try this, I have used this. It's working

<?php echo $_helper->productAttribute($_product, nl2br($_product->getDescription()), 'short_description') ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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