I have some products that I use for admin purposes that I want to hide from the users dashboard, specifically under "Expired Products". Can this be done?
I have "Expired Products" via edit to site.php Am_Di::getInstance()->blocks->add( new Am_Block( 'member/main/left', 'Expired Subscriptions', 'expired-sub', null, function (Am_View $v) { $out = array(); foreach (Am_Di::getInstance()->user->getExpiredProducs() as $p) { $out[] = sprintf('<li>%s</li>', Am_Html::escape($p->title)); } return sprintf('<ul class="am-widget-list">%s</ul>', implode("\n", $out)); }));
sorted, hid it by adding CSS ID from product ID Am_Di::getInstance()->blocks->add( new Am_Block( 'member/main/left', 'Expired Subscriptions', 'expired-sub', null, function (Am_View $v) { $out = array(); foreach (Am_Di::getInstance()->user->getExpiredProducs() as $p) { $out[] = sprintf('<li id="exproduct-item-%s">%s</li>', ($p->pk()), Am_Html::escape($p->title)); } return sprintf('<ul class="am-widget-list">%s</ul>', implode("\n", $out)); }));
I believe you can just do not add it from code at first place: PHP: foreach (Am_Di::getInstance()->user->getExpiredProducs() as $p) { if (in_array($p->pk(), array(1,2,3))) continue; $out[] = sprintf('<li id="exproduct-item-%s">%s</li>', ($p->pk()), Am_Html::escape($p->title));} where 1,2,3 is ids of your admin products Best Regards.