0

We are displaying tabs in product view page as below

enter image description here

Under Add Review tab we need to provide an option to write review for customer.

we are following this link , what i did is i added below code in catalog.xml file

<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
    <action method="addTab" translate="title" module="catalog"><alias>tab_review_list</alias><title>Product Reviews</title><block>review/product_view_list</block><template>catalog/product/view/tabs/reviews.phtml</template></action>
</block>

<reference name="tab_review_list">
  <block type="review/form" name="tab_review_form" as="review_form" template="catalog/product/view/tabs/review_form.phtml" />
</reference>

and using <?php echo $this->getChildHtml('review_form'); ? > in view.phtml file

2

In catalog.xml ,

In <catalog_product_view translate="label"> handler

add below

<reference name="review_tabbed">
   <block type="review/form" name="tab_review_form" as="review_form" template="review/form.phtml" />
</reference>

In

 <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
        ......
        ......
     </block>

Add below

<action method="addTab" translate="title" module="review" ><alias>review_tabbed</alias><title>Reviews</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action>
  • i can not able to find this line : <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" > – Baby in Magento Jul 5 '16 at 13:05
  • can you please tell me where i need to second block of code in catalog.xml file – Baby in Magento Jul 5 '16 at 13:12
  • <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" > will be in layout/catalog.xml of theme – Ajay Jul 5 '16 at 14:32
1

It will be something like below. Or you can create local.xml and put below code into this.

<?xml version="1.0" encoding="UTF-8"?>
<layout> 
<catalog_product_view translate="label">
         <reference name="product.info.additional">       
          <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs">
            <action method="setTemplate" ><template>catalog/product/view/tabs.phtml</template></action>
            <action method="addTab" translate="title" module="catalog" ><alias>description_tabbed</alias><title>Product Features</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>
            <action method="addTab" translate="title" module="catalog" ><alias>additional_tabbed</alias><title>Additional Info</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>               

            <action method="addTab" translate="title" module="review" ><alias>review_tabbed</alias><title>Reviews</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action>
          </block>
         </reference>        
        <reference name="review_tabbed">
            <block type="review/form" name="tab_review_form" as="review_form" template="review/form.phtml" />
        </reference>             
</catalog_product_view>
</layout>
  • i added code in local.xml but it didt added any review tab here is i need to add any code in view.phtml file? is review tab in view page is 1.9 default feature ? – Baby in Magento Jul 5 '16 at 18:07
1

I had issues getting the review option to show up on our site also.
It turns out that the value for this query was 1;
select * from magento.core_config_data where path ='advanced/modules_disable_output/Magento_Review'.

Once I flipped the value to 0 and flushed the cache, the review tab showed up for our products.

  • in backend we have Mage_Review module enabled under system>configuration>Advanced>Advanced. is i need to disable it ? – Baby in Magento Jul 6 '16 at 5:10

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.