Additional video field

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229398

-- HikaShop version -- : 2,60
-- 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!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #229418

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.

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229590

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

Hi Nicholas,Thanks! But, I just don't understand this :)Help me ! ?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #229618

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.

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229655

nicolas 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 ?

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 similar

Last edit: 8 years 9 months ago by Святина.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 9 months ago #229672

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,

Last edit: 8 years 9 months ago by Philip.
The following user(s) said Thank You: Святина

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229865

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,

what do I need to edit/ add in this file?
Regards!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 9 months ago #229885

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)

The following user(s) said Thank You: Святина

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229902

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.

  • Posts: 30
  • Thank you received: 0
8 years 9 months ago #229908

and I have duplicated the entry Associated products listing for category listing menu 173
Yesterday it was 76 pages, restored the Database, it was OK, today is another such story.
What could it be?

Attachments:
Last edit: 8 years 9 months ago by Святина.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 9 months ago #229912

Hi,

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum