How to hide description tab if description empty ?

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeHow to hide description tab if description empty ?

This topic has been marked as not resolved.

Hello, bunch of my products with attributes but without decription.
How to hide description tab if its empty ?

I found a solution but for default theme, it doesnt work on shoppica anyway =(

  • This reply was modified 3339 days ago by  stanlee1986.
  • This reply was modified 3339 days ago by  stanlee1986.
  • This reply was modified 3339 days ago by  stanlee1986.
March 3, 2015 at 12:38 pm #38860

found the solution myself =)


<?php if ($description): ?>
<li class="s_1_<?php echo $tabs_num ?>"><a href="#product_description"><?php echo
$tab_description; ?></a></li>
<?php endif; ?>

is this correct ?

  • This reply was modified 3339 days ago by  stanlee1986.
  • This reply was modified 3339 days ago by  stanlee1986.
March 4, 2015 at 4:32 am #38946

Hi,

Yes it is correct :)

You will also need to replace this line:

$tabs_num = 1;

with this one:

$tabs_num = 0
if ($tab_description) $tabs_num++;;

BR,
ThemeBurn team

March 6, 2015 at 5:49 pm #39045
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.