Jump to content

remove all sidebars from order theme &  full width


cluster

Recommended Posts

with v 8.1 I need to create a new order theme from standard-cart, I was able to remove sidebars with a hook but I can not get the six based order theme to full width ...

I guess I need some help here, also setting  col-md-12 in tpl did not change anything

can someone help with a sample for domain register & transfer tpl?

Edited by cluster
Link to comment
Share on other sites

19 minutes ago, cluster said:

with v 8.1 I need to create a new order theme from six, I was able to remove sidebars with a hook but I can not get the six based order theme to full width ...

in v7.10, I wrote the hook in the thread below..

it looks like for v8.1, it should be...

<?php

# Cart Sidebar Removal / Resizing v8.1 Hook
# Written by brian!

function cart_remove_sidebars_hook($vars)
{	
	$validtemplates = array("domainregister");
	if ($vars['inShoppingCart'] && !in_array($vars['templatefile'],$validtemplates)) {
		$head_return = "<style>#order-standard_cart .cart-body { width:100% !important; }
		.cart-sidebar {display: none;}</style>";
		return $head_return;
	}
}
add_hook("ClientAreaHeaderOutput",1,"cart_remove_sidebars_hook");

with this, there should be no need for a hook to remove the sidebar as they're being hidden via CSS - the only line you should need to change is the $validtemplates array which defines which cart templates (if any) should show the sidebars.

Link to comment
Share on other sites

  • 2 years later...
On 25/01/2021 at 4:07 PM, brian! said:

in v7.10, I wrote the hook in the thread below..

it looks like for v8.1, it should be...

<?php

# Cart Sidebar Removal / Resizing v8.1 Hook
# Written by brian!

function cart_remove_sidebars_hook($vars)
{	
	$validtemplates = array("domainregister");
	if ($vars['inShoppingCart'] && !in_array($vars['templatefile'],$validtemplates)) {
		$head_return = "<style>#order-standard_cart .cart-body { width:100% !important; }
		.cart-sidebar {display: none;}</style>";
		return $head_return;
	}
}
add_hook("ClientAreaHeaderOutput",1,"cart_remove_sidebars_hook");

with this, there should be no need for a hook to remove the sidebar as they're being hidden via CSS - the only line you should need to change is the $validtemplates array which defines which cart templates (if any) should show the sidebars.

Please could you advise how to remove the sidebars from the all client rea pages as well as using full width please?

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.

Guest
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.

×
×
  • 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