Skip to main content

Description tab hide

More
10 years 8 months ago #228477 by m.fontana
-- HikaShop version -- : 2.4
-- Joomla version -- : 3.4.8

Hi,
on my product page I've create a specific field for category product and I have add the code on my show_file.php
Code:
<ul> <li class="active"><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_DESCRIZIONE'); ?></a></li> <li class=""><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_VENDITA'); ?></a></li> <li class=""><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_SCHEDA'); ?></a></li> <li class=""><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_INFORMAZIONI'); ?></a></li> </ul>
Code:
<div class="tab-panel vendita"> <div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part hikashop_product_description_main list-item last-list"> <?php echo $this->element->vendita ?> </div> </div> <div class="tab-panel scheda"> <div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part hikashop_product_description_main list-item last-list"> <?php echo $this->element->schedatecnica ?> </div> </div>

I'd like that the content on <li> tag are empty also the <li> doesn't see. example:
the second li isn't empty for the category one, so for the product of this category this tag is visible; but for category two this is empty so the content and the <li> tag are doing hidden.

How can I do this?

I hope that I explained me
Thanks
Matteo

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

More
10 years 8 months ago #228502 by nicolas
Replied by nicolas on topic Description tab hide
Hi,

I'm sorry but I don't understand what you want to hide and when you want to hide it ? Could you maybe provide some screenshots to better explain the issue ?

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

More
10 years 8 months ago #228624 by m.fontana
Replied by m.fontana on topic Description tab hide
Sorry,
If you see the tab "scheda tecnica" is empty, so I'd like that tab is hide, how can I do this?

Thanks
Matteo

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

More
10 years 8 months ago #228649 by nicolas
Replied by nicolas on topic Description tab hide
Hi,

It's simple PHP.
Instead of :
<li class=""><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_SCHEDA'); ?></a></li>

you can use such code:
<?php if(!empty($this->element->schedatecnica)){ ?>
<li class=""><a href="#" class=""><?php echo JText::_('TPL_ITEM_PRODUCT_SCHEDA'); ?></a></li>
<?php } ?>
The following user(s) said Thank You: m.fontana

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

More
10 years 8 months ago #228676 by m.fontana
Replied by m.fontana on topic Description tab hide
Thanks so much,
now I have another problem, the tab "descrizione" have class="active", so when I see the product without this tab the content of the other is hidden; how can I do for add automatically the class="active" for the first tab?

Thanks
Matteo

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

More
10 years 8 months ago #228697 by nicolas
Replied by nicolas on topic Description tab hide
Hi,

I don't know how your tab system works. So I don't know how to add such class automatically.

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

Time to create page: 0.190 seconds
Powered by Kunena Forum