Hi,
how can I move the position of the related product from the side bar to be inside a tab like the DESCRIPTION or the Product Tags?
I want to have it like this page have the accessories tab for example:
http://www.bhphotovideo.com/c/produc…i_Digital.html
thanks.
2 answers
Hi,
You can open file: \app\design\frontend\default\jm_jasmine\layout\cat alog.xml
find section: catalog_product_view and add this block view for related product:
PHP Code:
<block type="catalog/product_list_related" name="catalog.product.related" as="related" template="catalog/product/list/related.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>
in the product view block in the content section as follows…
PHP Code:
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
..........................other declarations......................
<block type="catalog/product_list_related" name="catalog.product.related" as="related" template="catalog/product/list/related.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>
</block>
</reference>
Then open file: \app\design\frontend\default\jm_jasminetemplate\c atalog\product\view.phtml
Underneath list: <ul class="ja-tab-navigator clearfix">, add this code:
PHP Code:
<? if($related =$this->getChildHtml('related')):?>
<li><a href="#ja-tabitem-related"><?php echo $this->__('Related Product'); ?></a></li>
<? endif;?>
Inside div tab for content: <div class="ja-tab-content">, add this code:
PHP Code:
<?php if($related): ?>
<div id="ja-tabitem-related">
<?php echo $related; ?>
</div>
<?php endif;?>
Once done, flush all magento cache
Hi, thanks for the answer but please explain where can I find the product view block in the content section ?
inside which file?
or is it in the admin panel ? where ?
thanks.
I just don’t know and understand where to add this code:
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
……………………..other declarations………………….
<block type="catalog/product_list_related" name="catalog.product.related" as="related" template="catalog/product/list/related.phtml">
<action method="setColumnCount"><columns>4</columns></action>
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>
</block>
</reference>
This question is now closed