on the ja_adamite demo page the products have an additional tab called Additional Information . how can I add this (is it purely related to attributes?) and can i add extra tabs in as i want.
I see there is a ja_tabs extention but it is only for joomla at present i think?
Thanks
3 answers
Hi Philrice!
This is the code to call tabs in product detail of JM Adamite in app\design\frontend\default\jm_adamitetemplate\ca talog\product\view.phtml:
Code:
<div id="ja-tab-products" class="product-collateral"> <ul class="ja-tab-navigator clearfix"> <?php if ($_description = $this->getChildHtml('description')):?> <li><a href="#ja-tab-decription"><?php echo $this->__('Product Description') ?></a></li> <?php endif; ?> <?php if ($_additional = $this->getChildHtml('additional')):?> <li><a href="#ja-tab-additional"><?php echo $this->__('Additional Information') ?></a></li> <?php endif; ?> <?php if($upsell_products = $this->getChildHtml('upsell_products')): ?> <li><a href="#ja-tabitem-upsell"><?php echo $this->__('Upsell Products') ?></a></li> <?php endif; ?> <?php if($product_additional_data = $this->getChildHtml('product_additional_data')): ?> <li><a href="#ja-tabitem-tags"><?php echo $this->__('Product Tags') ?></a></li> <?php endif; ?> <?php if($product_reviews = $this->getChildHtml('product_reviews')): ?> <li><a href="#ja-tabitem-reviews"><?php echo $this->__('Product Reviews') ?></a></li> <?php endif; ?> <?php if($review_form = $this->getChildHtml('review_form')): ?> <li><a href="#ja-tabitem-reviewform"><?php echo $this->__('Write Your Own Review') ?></a></li> <?php endif; ?> </ul> <div class="ja-tab-content"> <?php if ( $_description ):?> <div id="ja-tab-decription"> <div class="collateral-box"> <?php echo $_description ?> </div> </div> <?php endif;?> <?php if ( $_additional ) : ?> <div id="ja-tab-additional"> <div class="collateral-box"> <?php echo $_additional ?> </div> </div> <?php endif;?> <?php if( $upsell_products ): ?> <div id="ja-tabitem-upsell"> <?php echo $upsell_products; ?> </div> <?php endif;?> <?php if( $product_additional_data ): ?> <div id="ja-tabitem-tags"> <?php echo $product_additional_data; ?> </div> <?php endif;?> <?php if($product_reviews): ?> <div id="ja-tabitem-reviews"> <?php echo $product_reviews ?> </div> <?php endif;?> <?php if($review_form): ?> <div id="ja-tabitem-reviewform"> <?php echo $review_form; ?> </div> <?php endif;?> </div> </div>
Please change it by adding the structure :
Code:
<li><a href="#test"><?php echo $this->__('Test') ?></a></li>
and
Code:
<div id="test"> <!-- your content here --> </div>
hope this helps.
hi -- that creates the tab thanks and i understand it more now but i have a further question. How can i now have an attribute (lets say FAQ) for a product then display in a FAQ tab. I can create the tab FAQ , but i want it to pulls its info from the products FAQ attribute.
thanks
ive worked it out thanks i added
<?php echo $_product->getTest() ?>
where test is the name of my attribute (ensuring the Test had a capital ) -- hopefully useful to someone else.
thanks -- so happy ive got this working!!!!! quite key to my site.
This question is now closed