News:

Looking for documentation? Take a look on our wiki

Main Menu

Tab Pane with Virtuemart custom fields

Started by theguy, April 20, 2014, 11:29:53 AM

Previous topic - Next topic

theguy

I'm trying to show Virtuemart custom fields as a tab in my product page. I've got a ul showing the tabs:

    <div class="products-desc-tab">

                <ul id="myTab" class="nav nav-tabs">

                   <li class="active">
                            <a href="#desc" data-toggle="tab">

                                <?php
                                
// Product Description
                                
if (!empty($this->product->product_desc)) {
                                    
?>

                                    <?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE'?>
                                <?php
                                
// Product Description END:?>

                          </a>
                   </li>

                   <li>
                            <a href="#short-desc" data-toggle="tab">

                                <?php echo JText::_('PRODUCT_SHORT_DESC');?>
                          </a>
                   </li>

                   <li>
                    <a href="#prod-fields" data-toggle="tab">
                                <?php echo JText::_('PRODUCT_FIELDS');?>
                    </a>   
                   </li>

In addition, I'm declaring the tabs as follows:

<div class="tab-pane fade active in" id="desc">

                        <?php
                        
// Product Description
                        
if (!empty($this->product->product_desc)) {
                            
?>

                            <div class="product-description">
                                <?php echo $this->product->product_desc?>
                            </div>
                        <?php
                        
// Product Description END ?>


                </div>

                <div class="tab-pane fade" id="short-desc">

                    <?php
                    
// Product Short Description
                    
if (!empty($this->product->product_s_desc)) {
                    
?>

                        <div class="product-short-description">
                        <?php
                        
/** @todo Test if content plugins modify the product description */
                        
echo nl2br($this->product->product_s_desc);
                        
?>

                        </div>
                    <?php
                    
// Product Short Description END?>


                </div>


            <div class="tab-pane fade" id="prod-fields">
                    <?php echo $this->loadTemplate('customfields'); ?>
                </div>
            </div>


For some reason the custom fields tab does not work and the fields are not presented. I've been trying all sort of things but nothing seems to work. Maybe something in my syntax is wrong? Product description and short description are both working fine.