cluster Posted January 25, 2021 Share Posted January 25, 2021 (edited) 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 January 25, 2021 by cluster 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 25, 2021 Share Posted January 25, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
cluster Posted January 25, 2021 Author Share Posted January 25, 2021 brilliant! it's working ... that helped me a lot, thank you very much! 0 Quote Link to comment Share on other sites More sharing options...
WebNest Posted September 24, 2023 Share Posted September 24, 2023 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? 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.