- Posts: 47
- Thank you received: 0
Add tab on product page
-- Joomla version -- : 3.3.3
Hi all,
I would like to add 2 or 3 tabs right next the description tab.
Can you help me ? What files should I change ?
Kind regards !
Please Log in or Create an account to join the conversation.
Then you have to edit the view "product / show_tabular" and add a <li> entry for the tab as the already existings, and add a <div> for the content.
For example add:
To add another one, just replace "custom1" by your desired value.
Please Log in or Create an account to join the conversation.
Thank you for your reply ... il will try it probably today.
Another question :
For example a Tab "Technical Specification" with content "AAAAA" for product A and with content "BBBBB" for product B.
Is it possible ?
Kind regards !
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Sure, but you'll have to use some custom fields to do that, like ""AAAAAA" or "BBBBB" custom fields that you'll restrict to only some products by using the "category" restriction.
Please Log in or Create an account to join the conversation.
I'm not sure to understand your answer.
For example I have 2 tabs : "Description" and "Additionnal information".
The "Description" tab I can fill the content from the backend (Admin Joomla). Is it possible to fill the "Additionnal information" tab content in the backend (Admin Joomla) ? If not the second tab has no sense for the customer.
Kind regards !
Please Log in or Create an account to join the conversation.
Yes, it's possible.
First, you need to create custom fields of the table "product" via the menu Display>Custom fields.
Then, when you edit your products, you'll see these fields at the bottom of the product edition page, and you'll also see them in the additional information tab of the product details page of the frontend.
Please Log in or Create an account to join the conversation.
Super. I created a custom field (zone text) called test.
In the show_tabular view I found the following code
<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_description');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_DESCRIPTION');?></a></li>
I suppose I need to replace id=hikashop_show_tabular_description_li by id=test ? I tried it but the tab isn't displayed.
Do I something wrong ?
Thanks !
Please Log in or Create an account to join the conversation.
As explained in the Xavier's reply, the tab is composed of two elements ; one "li" for the tab text and one "div" for the tab content.
www.hikashop.com/forum/product-category-...uct-page.html#171132
You can use the given content without specific modification or you can replace the text "hikashop_show_tabular_custom1" everywhere.
Regards,
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.
It is ok now (I understand).
But I stay with a strange problem. I changed the show_tabular view for my template and it has no effect ?! How is it possible ?
To be sure I changed it in the 3 templates where the show_tabular view is defined.
Is it possible I need to customize other parameter or view ?
Thanks !
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Are you sure that the "Layout on product page" option is set the "Tabular" through "Hikashop->System->Configuration->Display"
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you also add a small text at the top of the "Show_tabular" file of the "Product" view of your front-end template via "Hikashop->Display->Views"
Please Log in or Create an account to join the conversation.
I add the following line in the show_tabular view but nothing is displayed :
defined('_JEXEC') or die('Restricted access');
?><?php
echo 'Test Johan';
....
Thanks !
Please Log in or Create an account to join the conversation.
It means that you're not editing the view for the right template.
www.hikashop.com/support/support/documen...ize-the-display.html
If you can provide a link to the product page, it would be helpful.
Regards,
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.
Please Log in or Create an account to join the conversation.
Additionnal information. In fact the template I'm using work with the show_default.php file.
Her is the content :
I tried to change this code and I see the changes in my product page BUT I can't add tabs
Can you help ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It's that option yes. And onglet means tabular in english, so you have it configured like you want.
Now, as I said, you will find that option in each category and product and you want to check that option there too.
Please Log in or Create an account to join the conversation.
Super ! It works now but I have another problem.
I have the "Description" tab and the "Specifications" tab (I can create other tab) It works.
But the content is not displayed ?! If I used the show_default, the description content is displayed. If I use the show_tabular, I have my differents tabs but without content.
Any idea ?
Many thanks !
Please Log in or Create an account to join the conversation.