cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide tab in product detailed page when there is no data?

How to hide tab in product detailed page when there is no data?

How to hide tab in product detailed page when there is no data

For Example i had ProductA and ProductB

ProductA has warranty so warranty tab has to display

ProductB has No warranty so warranty tab should not be displayed.

3 REPLIES 3

Re: How to hide tab in product detailed page when there is no data?

Hi @sekhar_n ,

Try the below solution. 

 

https://magento.stackexchange.com/a/206615

 

I hope it will help you.

Re: How to hide tab in product detailed page when there is no data?

Vimal I went to below link and finally they mention like
Add your html code in "if" condition, if html data found in tab content then tab will be display on the product page.
What is this meaning ?

Re: How to hide tab in product detailed page when there is no data?

@sekhar_n ,

 

It means you need to add if condition in the phtml file where it is rendering. 

You can check phtml file after enable template hints for theh frontend. 

https://docs.magento.com/m2/ce/user_guide/system/template-path-hints.html