How do I detect if a category has Include in Navigation Menu set to NO?
include_in_menu
is an attribute so you can use,
if (!$category->getIncludeInMenu()) ...
This worked for me
$category->load();
//$category->getIncludeInMenu() returns 1 if set to yes, returns 0 if set to no
if(!$category->getIncludeInMenu())
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With