magento product attribute return NULL after a getChildHtml call -


i using magento 1.9.2.2, have created childhtml takes care of reviews, looks like:

    <catalog_product_view translate="label">      <reference name="product.info">         <block type="review/product_view_list" name="productinfo.reviewinfo" as="hs_review" template="catalog\product\hs_review.phtml"></block>        </reference>      </catalog_product_view> 

hs_reviw.ptml:

    <?php  $ratingsummary =mage::getmodel('rating/rating')->getentitysummary($_p->getid()); ?>        <div class="review-container">          <?php if ($ratingsummary) { ?>               <div class="w ratting">                   <div class="rating-value" style="width: <?php                     echo $ratingsummary->getsum() / $ratingsummary->getcount(); ?>%"></div>               </div>              <div class="reviw-count w">              <span><?php echo $ratingsummary->getcount() ?> reviews</span>             </div>          <?php } ?>           <div class="review-add w">              <a href="<?php  echo  mage::geturl('review/product/list',                array('id'=> $this->getproduct()->getid(),                       'category'  => $this->getproduct()->getcategoryid()                )); ?>">write review</a>          </div>       </div> 

now strange thing happens in view.ptml when use

<?php var_dump( $_product->getshortdescription()); ?> <?php echo $this->getchildhtml('hs_review')?> 

it dumps product short description , reviews when use

<?php echo $this->getchildhtml('hs_review')?> <?php var_dump( $_product->getshortdescription()); ?>  

review works product short description return null


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -