nicolas wrote: Hi,
Following the tutorial should be quite easy:
You want to add a tab after the description tab.
As you can see in the tutorial, the description tab is created with this line:
<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_DESCRIPTION');?></li>
And adding a new tab can be made like that:
<li id="my_tab_li">My tab !</li>
So just add the line:
<li id="my_tab_li">Video</li>
after the line:
<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_DESCRIPTION');?></li>
And that will add the tab.
Then you want to add the content of the tab.
As explained in the tutorial, you need to add a div with an id corresponding to the id of the tab and the class hikashop_tabs_content. So it should be:
<div class="hikashop_tabs_content" id="my_tab">
content of the tab
</div>
And instead of "content of the tab", you can add the code to display your custom product field.
That's also explained in the threads we gave you. It can be done like that:
<?php echo $this->element->CUSTOM_FIELD1; ?>
where CUSTOM_FIELD1 is the column name of the custom product field.
So you can write:
<div class="hikashop_tabs_content" id="my_tab">
<?php echo $this->element->CUSTOM_FIELD1; ?>
</div>
and you can add it just before:
<?php if($hide_specs == 0){ ?>
(which is after the content div of the description)
And so the Lord,) that I the rules, but, nothing happened!
<div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part show_tabular">
<div id="hikashop_tabs_div">
<ul class="hikashop_tabs_ul">
<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_DESCRIPTION');?></li>
<?php if($hide_specs == 0){ ?>
<li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('SPECIFICATIONS');?></li>
<?php }
if($status_vote == "comment" || $status_vote == "two" || $status_vote == "both" ){
?>
<li id="hikashop_show_tabular_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_COMMENT');?></li>
<li id="hikashop_show_tabular_new_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_NEW_COMMENT');?></li>
<?php } ?>
<li id="my_tab_li">Video</li>
</ul>
<?php
if(!empty($this->element->extraData->bottomBegin))
echo implode("\r\n",$this->element->extraData->bottomBegin);
?>
<div class="hikashop_tabs_content" id="hikashop_show_tabular_description">
<div id="hikashop_product_description_main" class="hikashop_product_description_main">
<?php
<div class="hikashop_tabs_content" id="my_tab">
content of the tab
</div>
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description));
?>
</div>