Auto-hide tab Related Products if empty

  • Burt
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago - 8 years 7 months ago #68201 by Burt
Hi Giang,

It would be nice if the tab Related Products only shows if there are related products available.
At the moment there is a Yes/No-switch to show or hide this tab.
So it will be shown even if there are no related products for a particular product.

I fixed this issue (on request of my customer) by modifying the code in:
/components/com_eshop/themes/default/views/product/default.php (line 716)

to

Code:
if (count($this->productRelations)) # check for RP first { if (EshopHelper::getConfigValue('show_related_products')) { ?> <li><a href="#related-products" data-bs-toggle="tab"><?php echo JText::_('ESHOP_RELATED_PRODUCTS'); ?></a></li> <?php } }

It would be nice to have an extra option like:
Show tab Related Products, if available: yes/no

Thanks and best regards, Burt

Bazingo!
www.bazingo.nl (Powered by Eshop!)
Last edit: 8 years 7 months ago by Burt. Reason: fixed typo
The following user(s) said Thank You: Giang Dinh Truong, Nygllhuw

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

  • Giang Dinh Truong
  • Offline
  • Administrator
  • Administrator
More
8 years 7 months ago #68265 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Auto-hide tab Related Products if empty
Hello Burt,

This is a great suggestion. I just added this small change to core package of EShop.

Sincerely, Giang
The following user(s) said Thank You: Burt

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

Moderators: Giang Dinh Truong