lizzus Posted May 18, 2021 Share Posted May 18, 2021 Hi, I removed with help of @brian! the sidebar menu. Ate the moment sidebar not appear!. Remain only Toggle Option button on cart.php page. I checked on orderforms/mycustomorderform/products.tpl if is present button, but i not find it. now i think that to remove it i have to make, as i did with brian's code, an exception on hook. Can you help me? I'm at the very end of my panel customization. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 18, 2021 Share Posted May 18, 2021 you should be able to remove it via general settings... https://docs.whmcs.com/Ordering_Tab#Sidebar_Toggle_Option 0 Quote Link to comment Share on other sites More sharing options...
lizzus Posted May 18, 2021 Author Share Posted May 18, 2021 iHi Brian. Tha nks for fast answer. I know. But i need to remove only from one template. If i remove from admin area will be effect to all templates 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 18, 2021 Share Posted May 18, 2021 (edited) 18 minutes ago, lizzus said: iHi Brian. Thanks for fast answer. I know. But i need to remove only from one template. If i remove from admin area will be effect to all templates oh I forgot about your "this only needs to apply to one template" rule! 😲 <?php function cart_remove_sidebar_toggle_hook($vars) { if ($vars['template'] == 'six' && $vars['templatefile'] == 'products'){ return array("showSidebarToggle" => false); } } add_hook("ClientAreaPageCart", 1, "cart_remove_sidebar_toggle_hook"); so if the template is Six (rename to your custom), and the user is on the products page, then it toggles the sidebar off - in standard_cart, this will do nothing (though your other hook should take care of SC), for the orderform templates that use the sidebar toggle, e.g the five comparison and slider templates, then it should behave the same as having the feature disabled via the settings. and to pre-empt what could be your next question, if you need this to only work on one orderform template, e.g it has to be your custom theme AND only premium comparison, then it would be... if ($vars['template'] == 'six' && $vars['carttpl'] == 'premium_comparison' && $vars['templatefile'] == 'products'){ Edited May 18, 2021 by brian! 0 Quote Link to comment Share on other sites More sharing options...
lizzus Posted May 19, 2021 Author Share Posted May 19, 2021 GREAT! thank you very much Brian! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.