Jump to content

Remove Sidebar Toggle Option button


Recommended Posts

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

Schermata 2021-05-18 alle 14.53.37.png

Link to comment
Share on other sites

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! 😲


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 by brian!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated