VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tony198 on May 02, 2015, 20:41:08 PM

Title: Tabbed product view
Post by: tony198 on May 02, 2015, 20:41:08 PM
Can anyone help with this, I have a tabbed viewer in the product section and need to add tabs for the custom fields, my code is below but I can't seem to get the right info to include the custom fields as extra tabs.

<?php // event onContentBeforeDisplay
echo $this->product->event->beforeDisplayContent?>


<?php if(!empty($this->product->product_desc) || $this->allowRating || $this->showReview) : ?>
<ul id="productdetails-tabs">
<?php if(!empty($this->product->product_desc)) : ?>
<li data-toggle="product-description"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'?></li>
<?php endif; ?>

        <?php if(!empty($this->product->customfieldsSorted['onbot'])) : ?> 
<li data-toggle="customfield_TITLE"><?php echo JText::_('Datasheets'?></li>
<?php endif; ?>
       
       
   
       
       
       
<?php if($this->allowRating || $this->showReview) : ?>
<li data-toggle="customer-reviews"><?php echo JText::_('COM_VIRTUEMART_REVIEWS'?></li>
<?php endif; ?>
</ul>

       <div id="productdetails-tabs-content">
<?php endif; ?>
<?php if (!empty($this->product->product_desc)) : ?>
           <div class="product-description">
<?php echo $this->product->product_desc?>
           </div>
<?php endif; ?>


<?php // onContentAfterDisplay event
echo $this->product->event->afterDisplayContent?>


<?php
echo 
$this->loadTemplate('reviews'); ?>


<?php if(!empty($this->product->product_desc) || $this->allowRating || $this->showReview) : ?>
</div>


In VM3.0.2

Thanks
Title: Re: Tabbed product view
Post by: jenkinhill on May 02, 2015, 23:31:27 PM
http://forum.virtuemart.net/index.php?topic=128401