jeffuk Posted December 11, 2017 Share Posted December 11, 2017 Anyone have a hook that removes the sidebar if a product has configurable options? cart.php?a=confproduc Just want a full page as this is a hidden product and don't want to display categories on this page. Thank you. Link to comment Share on other sites More sharing options...
brian! Posted December 11, 2017 Share Posted December 11, 2017 16 minutes ago, jeffuk said: Anyone have a hook that removes the sidebar if a product has configurable options? I don't think there is one... removing the sidebars via a hook is simple enough... but the template isn't designed to adjust full width if the sidebars aren't there... I suspect you're looking at customising configureproduct.tpl and changing the <div> widths 3/9 based on whether {$configurableoptions} exists. 1 Link to comment Share on other sites More sharing options...
jeffuk Posted December 11, 2017 Author Share Posted December 11, 2017 Thanks Brian. I am thinking to maybe use another order template to load this product. Link to comment Share on other sites More sharing options...
brian! Posted December 11, 2017 Share Posted December 11, 2017 4 hours ago, jeffuk said: Thanks Brian. I am thinking to maybe use another order template to load this product. if you're using any recent version (within the last year or two), then your options will be limited... ALL of the default orderform templates (Cloud & Universal Sliders, Pure/Premium/Supreme Comparisons) that are still being updated, will use Standard_cart by the time they get to the product configuration stage... Modern and Boxes wouldn't, but while they're still being shipped with WHMCS, they haven't been updated for a long while... so they might work for now, but are probably not a good long-term option. Link to comment Share on other sites More sharing options...
jeffuk Posted December 12, 2017 Author Share Posted December 12, 2017 Universal sliders is probably the best option for this product at this stage. Using carttpl is a quick workaround. thanks again Brian. Link to comment Share on other sites More sharing options...
jeffuk Posted December 12, 2017 Author Share Posted December 12, 2017 I have given up. Literally. I am now just going to look at how the sidebar categories can be minimised rather than removed. I hate them. Link to comment Share on other sites More sharing options...
brian! Posted December 12, 2017 Share Posted December 12, 2017 42 minutes ago, jeffuk said: I have given up. Literally. don't let it beat you, Jeff... there will be more bumpy issues down the road using WHMCS than this!! 42 minutes ago, jeffuk said: I am now just going to look at how the sidebar categories can be minimised rather than removed. I don't think Andrew's code worked in the thread below... though I can't recall trying it personally. 42 minutes ago, jeffuk said: I hate them. modifying the template would be the way to go with this... On 12/11/2017 at 18:31, brian! said: I suspect you're looking at customising configureproduct.tpl and changing the <div> widths 3/9 based on whether {$configurableoptions} exists. so in standard_cart/configureproduct.tpl, this... <div class="pull-md-right col-md-9"> <div class="header-lined"> <h1>{$LANG.orderconfigure}</h1> </div> </div> <div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm"> {include file="orderforms/standard_cart/sidebar-categories.tpl"} </div> <div class="col-md-9 pull-md-right"> becomes... <div class="pull-md-right col-md-{if $configurableoptions}12{else}9{/if}"> <div class="header-lined"> <h1>{$LANG.orderconfigure}</h1> </div> </div> {if !$configurableoptions} <div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm"> {include file="orderforms/standard_cart/sidebar-categories.tpl"} </div> {/if} <div class="col-md-{if $configurableoptions}12{else}9{/if} pull-md-right"> and if a product has configurable options, it doesn't load the sidebar (so no need for a hook), and auto adjusts the width of the page... sidebars gone. Jeff less stressed. problem solved. 1 Link to comment Share on other sites More sharing options...
jeffuk Posted December 13, 2017 Author Share Posted December 13, 2017 Thank you, Brian, Andrew's code worked for me. I have shared it with Dani in the same post. Thanks again for your help. Link to comment Share on other sites More sharing options...
Recommended Posts