- Posts: 30
- Thank you received: 0
Additional video field
-- Joomla version -- : 3.48
Hi! The question how to make an additional tab (optional field)such as description, only the "video" tab when you click on the video tab, there was a video! the example in the attachment. Thank you!
Please Log in or Create an account to join the conversation.
I invite you to read this thread and the links added in there which explain all that:
www.hikashop.com/forum/product-category-...-create-new-tab.html
Please Log in or Create an account to join the conversation.
Hi Nicholas,Thanks! But, I just don't understand this :)Help me ! ?nicolas wrote: Hi,
I invite you to read this thread and the links added in there which explain all that:
www.hikashop.com/forum/product-category-...-create-new-tab.html
Please Log in or Create an account to join the conversation.
What do you not understand ?
Did you create a custom field of the table "product" via the menu Display>Custom fields ?
Did you modify the "show_tabular" view file in order to add a new tab with the display of the custom field ?
Please Log in or Create an account to join the conversation.
I do not know where and what code to edit or add ! I'm not a programmer ! Just the wife asked the shop , so I 'm trying to do something similarnicolas wrote: Hi,
What do you not understand ?
Did you create a custom field of the table "product" via the menu Display>Custom fields ?
Did you modify the "show_tabular" view file in order to add a new tab with the display of the custom field ?
Please Log in or Create an account to join the conversation.
Why don't you say that you aren't a developer in english on an english forum ? Or simply explain which part you can't manage in Nicolas link?
If you look this link you will see that really little coding skill is required to add a tab.
In this link, you have a tutorial, here AND the 2 topics, to understand use and interest of this custom.
Keep in mind that we spent lots of time to develop HikaShop and help about some specific issue, we can guide you too to custom it but not to custom it for you, and so both sides have to walk a little.
Regards,
Please Log in or Create an account to join the conversation.
what do I need to edit/ add in this file?Philip wrote: Hello,
Why don't you say that you aren't a developer in english on an english forum ? Or simply explain which part you can't manage in Nicolas link?
If you look this link you will see that really little coding skill is required to add a tab.
In this link, you have a tutorial, here AND the 2 topics, to understand use and interest of this custom.
Keep in mind that we spent lots of time to develop HikaShop and help about some specific issue, we can guide you too to custom it but not to custom it for you, and so both sides have to walk a little.
Regards,
Regards!
Please Log in or Create an account to join the conversation.
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)
Please Log in or Create an account to join the conversation.
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>
Please Log in or Create an account to join the conversation.
Yesterday it was 76 pages, restored the Database, it was OK, today is another such story.
What could it be?
Please Log in or Create an account to join the conversation.
You're using HikaShop 2.6.0 ?
So the best would be to update to the latest version.
www.hikashop.com/support/documentation/5...ashop-changelog.html
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.