Rigsby Posted May 7, 2017 Share Posted May 7, 2017 Hello The Domains Configuration page is an absolute disgrace. I am sure that I am not the only one complaining about how it looks compared to the rest of their website theme. Is there a way to bypass this page entirely? No, we need to collect some data here, I understand that, but is there a way to make it look prettier? Any suggestions would be greatly appreciated. Whoever was putting this one together was having an off-day! Thanks : ) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 7, 2017 Share Posted May 7, 2017 The Domains Configuration page is an absolute disgrace. I am sure that I am not the only one complaining about how it looks compared to the rest of their website theme.Is there a way to bypass this page entirely? No, we need to collect some data here, I understand that, but is there a way to make it look prettier? Any suggestions would be greatly appreciated. it will be bypassed if you don't need to collect specific configuration information... if you do, then no. Whoever was putting this one together was having an off-day! if you think it's bad now, you should see the difference between v5 and v7.2! other than styling, the cart process hasn't really changed for the last four years (maybe longer) - domain functionality is probably heading in the wrong direction though. anyway, to answer your question - all you can do with the configuration page is play with the styling and decide how you want to show the information. 0 Quote Link to comment Share on other sites More sharing options...
Rigsby Posted May 7, 2017 Author Share Posted May 7, 2017 ...to answer your question - all you can do with the configuration page is play with the styling and decide how you want to show the information. Thanks Brian : ) 1. I think that's what I was aiming towards because I recognised the need for collecting such data on the page. So, how do I go about styling it? My current layout is the below image; no doubt you've seen it a thousand times before (I really don't like how things are; the page looks disjointed compared with other parts of the client area): And... why would the developers add a sidebar about ordering domain names when... they've.. just.. ordered one? Haha, it seems so unthought out to me. So yes, even the boxes in your image would be a start. I would like to know how to set out the basics of something similar which will enable me to go from there. 2. I have tried various ways to remove the Actions sidebar but to no avail, unfortunately. Here's what I've used: add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Actions'))) { $secondarySidebar->removeChild(‘Actions’); } }); ... I have also had the same issue with Shortcuts. It's strange because I have used other ho 3a. Where do I either delete the 'Continue Shopping" link or change the url? 3b. Actually, there is a reason for wanting to action 3a. The WHMCS hosting package templates don't suit my brand and there isn't any continuity (plus, I don't like the designs). What I would really like is to bring in my own layout being used on the main website (they are packages linked between WordPress and cPanel, and WHMCS obviously already knows about the cPanel link). So, is there a way to bring that in? (perhaps a page within a page or an added functionality that allows me to create my own template within WHMCS). If I am able to do that, there will be no reason to use a url to leave the shopping process to revisit the main webiste from whence they came! I hope I'm not boring you yet. The same can be said for the link in the below image (Explore packages now): ... and here: In fact, ANY link that points to the WHMCS hosting package templates need to be either updated to the link on my main website, deleted entirely, or I am hoping there's a way to bring in my own layout. Am I asking too much? I shall await your recommendations 4. How do I add View Cart to the Shortcuts sidebar? That's been killing me all day : ) 5. How do I delete 'Contact Support to Purchase' on the domain results page? I don't want people to be distracted whilst on a purchasing mission. 6. How do I add a link on the Review & Checkout page for other products? I like how it's there for domains so the customer can change the number of years they register for. It could be a great sales trick for hosting: 'pay annually and receive one month free' etc. etc. I think that's it for now. I have posted other questions, so won't repeat myself in this one. Thanks in advance for your invaluable expertise - - - Updated - - - Not sure why this sentence was cut off: ... I have also had the same issue with Shortcuts. It's strange because I have used other hooks and they all work fine 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 8, 2017 Share Posted May 8, 2017 1. I think that's what I was aiming towards because I recognised the need for collecting such data on the page. So, how do I go about styling it? if you're using Standard Cart (or a duplicate of it), you'll need to play with the configuredomains.tpl template as that's where the layout is determined... additionally, you might need to play with custom.css, Language Overrides and, depending on how severely you want to customise it, you might need action hooks to query the database if you need additional information that isn't naturally available to the template. My current layout is the below image; no doubt you've seen it a thousand times before (I really don't like how things are; the page looks disjointed compared with other parts of the client area): yeah, if I had a pound for each time... And... why would the developers add a sidebar about ordering domain names when... they've.. just.. ordered one? Haha, it seems so unthought out to me. I daresay because with v7, WHMCS removed the bulk domain ordering options from the cart, so now if the client wants to order multiple domains, they need to loop through the ordering process one domain at a time... but not to worry, this new streamlined process is considered progress by WHMCS! you could remove it and enable it at various stages of the ordering process, but I can see why WHMCS didn't bother to do it by default - as it's a lot of hassle and they'd have needed to give users a simpler method than hooks to modify them conditionally... otherwise, someone will have complained in here about it being removed half way through the process and wanting it put back in! also, what happens if you start to order a hosting product, realised you made a mistake and really want to register a domain instead, what does the customer do? you've removed the link to register a domain, so I guess they'll either have to go back in the browser or go to home and start all over again... though in v7.2, you get an additional navbar child for non logged-in users that shows all product group links and links to domain registration and transfer too. but if you really want to do it, i'll show you the code in the thread you started... https://forum.whmcs.com/showthread.php?128642-Hide-Remove-the-Actions-sidebar-on-the-Choose-a-Domain-page So yes, even the boxes in your image would be a start. I would like to know how to set out the basics of something similar which will enable me to go from there. those 3 boxes are already built into the configuredomains.tpl template and are used when either DNS Management, ID Protection or Email Forwarding are enabled in the domain pricing page for the TLD in question... there's nothing to stop you from using that layout for other purposes (within reason!) or just as a starting point to work from... 2. I have tried various ways to remove the Actions sidebar but to no avail, unfortunately. Here's what I've used: there's an issue with the single quotes you used on the removeChild line - so the hook below would remove it under all stages... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Actions'))) { $secondarySidebar->removeChild('Actions'); } }); ... I have also had the same issue with Shortcuts. It's strange because I have used other hooks and they all work fine possibly for the same single quote error reason...? 3a. Where do I either delete the 'Continue Shopping" link or change the url? try the viewcart.tpl template - it'll be hard coded to go back to cart.php <div class="text-right"> <a href="cart.php?a=checkout" class="btn btn-success btn-lg btn-checkout{if $cartitems == 0} disabled{/if}" id="checkout"> {$LANG.orderForm.checkout} <i class="fa fa-arrow-right"></i> </a><br /> <a href="cart.php" class="btn btn-link btn-continue-shopping" id="continueShopping"> {$LANG.orderForm.continueShopping} </a> </div> 3b. Actually, there is a reason for wanting to action 3a. The WHMCS hosting package templates don't suit my brand and there isn't any continuity (plus, I don't like the designs). What I would really like is to bring in my own layout being used on the main website (they are packages linked between WordPress and cPanel, and WHMCS obviously already knows about the cPanel link). So, is there a way to bring that in? (perhaps a page within a page or an added functionality that allows me to create my own template within WHMCS). If I am able to do that, there will be no reason to use a url to leave the shopping process to revisit the main webiste from whence they came! I hope I'm not boring you yet. it'll take more than this to bore me! i'll give my usual warning about orderform customisation - the cart process is hard-coded to work via a specific order of steps... under some circumstances, you can bypass steps (if they aren't needed), but you can't easily add custom steps into the process or change their order (or what each step does).... if you're wanting to do that, either lower your expectations or open your wallet as you'd likely need a developer's help. now with that said, there's nothing to stop you from creating a customised orderform template of your own - most of the new product templates brought in with v6 are basically just a customised products.tpl template and then after that, they fall back on using standard_cart for the other steps.. you can, if you wish, customise (e.g style) each page of the orderform to suit your site... as I said, products.tpl is the front page of the cart when ordering services/products and that template will have access to the list of products within that product group - basically, all it does is loop through the products array to output the products in the style of your choosing... so if you could modify products.tpl to match your WP site layout, then that would be a start - though that might be easier said than done. The same can be said for the link in the below image (Explore packages now): that's editable in domainregister.tpl and again is hard-coded to go to cart.php ... and here: that's back in configureproduct.tpl... {if $domain.hosting}<span style="color:#009900;">[{$LANG.cartdomainshashosting}]</span>{else}<a href="cart.php" style="color:#cc0000;">[{$LANG.cartdomainsnohosting}]</a>{/if} In fact, ANY link that points to the WHMCS hosting package templates need to be either updated to the link on my main website, deleted entirely, or I am hoping there's a way to bring in my own layout. Am I asking too much? I shall await your recommendations in my opinion, you're better off keeping the client in the cart process, so of the three options of modifying/removing links and creating a custom layout, i'd keep them in the cart and modify it to suit your needs... once you start linking them away from the cart process, especially when they're in the middle of it, madness can ensue! 4. How do I add View Cart to the Shortcuts sidebar? That's been killing me all day : ) use the following... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Client Shortcuts'))) { $secondarySidebar->getChild('Client Shortcuts') ->addChild('viewcart', array( 'label' => Lang::trans('viewcart'), 'uri' => 'cart.php?a=view', 'icon' => 'fa-shopping-cart fa-fw', 'order' => 100, )); } }); btw - the above screenshot is from v7.2 - and as you can see there will be cosmetic changes to how the sidebars are styled. 5. How do I delete 'Contact Support to Purchase' on the domain results page? I don't want people to be distracted whilst on a purchasing mission. under most circumstances, the correct answer to that question should be to use Language Overrides to alter the language string, however in v7.1 (and currently still in v7.2RC1), the string is hard-coded within domainregister.tpl and so that's where you'll need to remove it (it's there twice). 6. How do I add a link on the Review & Checkout page for other products? I like how it's there for domains so the customer can change the number of years they register for. It could be a great sales trick for hosting: 'pay annually and receive one month free' etc. etc. the short answer is to modify viewcart.tpl to output your promotional messages... 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.