adg273 Posted June 21, 2019 Share Posted June 21, 2019 Hi, First off let me explain that i'm not a developer, so i'm new to most of this, so please bear with me. I have created hooks that change where the product categories point to on both the navigation bar and the categories sidebar. However, on smaller screens, it resorts to using a drop down box and you switch product categories using this method (Image attached). As a result, these still point to where they would as default. I need these to point to the new locations too. Can anyone advise me how I do this please? Support added this when I queried how it worked; Quote In this case, you would likely want to modify the templates/orderforms/standard_cart/sidebar-categories-collapsed.tpl file. As you can see, this is simply a quick action menu offering some various navigation options. You could use the smarty logic here to dynamically change the link if desired here! I wasn't entirey sure how I go about achieving what I needed with this information, since I looked at sidebar-categories-collapsed.tpl and I can't see how this helps me. When asked to clarify how I do this, they pointed me to here. Any help would be greatly appreciated. 0 Quote Link to comment Share on other sites More sharing options...
adg273 Posted June 21, 2019 Author Share Posted June 21, 2019 (edited) Actually, my apologies, Ive worked it out. Surprisingly simple actually. Although possibly not the most ideal way to do it, but it works exactly as intended. For anyone else looking for the same thing, what I did was manually change the options within sidebar-categories-collapsed.tpl For example; <optgroup label="Product Categories"> <option value="https://target-domain.com/cloud-hosting/">Cloud Hosting</option> <option value="https://target-domain.com/web-hosting/wordpress-hosting/">WordPress Hosting</option> </optgroup> and changed the <select> tag to include - onchange="location = this.value;" <select name="gid" class="form-control" onchange="location = this.value;"> It works as intended for me, but any developers with a better way, it would be advantageous to post how. Edited June 21, 2019 by adg273 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 23, 2019 Share Posted June 23, 2019 On 21/06/2019 at 20:04, adg273 said: First off let me explain that i'm not a developer, so i'm new to most of this, so please bear with me. I still, after 4 years, find it bizarre that someone at WHMCS thought it a really good idea to launch a menu system that effectively requires PHP coding in order to change it... oh well. 🙄 On 21/06/2019 at 20:04, adg273 said: I wasn't entirely sure how I go about achieving what I needed with this information, since I looked at sidebar-categories-collapsed.tpl and I can't see how this helps me. When asked to clarify how I do this, they pointed me to here. aahh the old Support Dept line - "that's customisation - we don't deal with that... send them to the forums". 🙄 On 21/06/2019 at 20:47, adg273 said: It works as intended for me, but any developers with a better way, it would be advantageous to post how. not really better ways... I mean if the url is basically replacing spaces in the product group name with a hyphen, then you could still foreach through the array, but that won't save you much - especially if there will be exceptions to that rule... I think you've pretty much solved it yourself - just remember to keep a copy of the file in case you lose it after a WHMCS update. 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.