Jump to content

Domains Configuration - Bypass or Spruce up..!


Rigsby

Recommended Posts

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! :D

 

Thanks : )

Link to comment
Share on other sites

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! :D

if you think it's bad now, you should see the difference between v5 and v7.2! :roll:

 

GSVVrcW.png

znAMRjs.png

 

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.

Link to comment
Share on other sites

...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):

 

Screen Shot 2017-05-07 at 19.58.39.png

 

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?

 

Screen Shot 2017-05-07 at 20.13.47.png

 

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):

 

Screen Shot 2017-05-07 at 20.25.50.png

 

... and here:

 

Screen Shot 2017-05-07 at 20.32.33.png

 

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 :idea:

 

 

 

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.

 

Screen Shot 2017-05-07 at 20.38.10.png

 

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 :idea:

 

- - - 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 :idea:

Link to comment
Share on other sites

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! :roll:

 

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.

 

awdliCl.png

 

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 :idea:

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! :twisted:

 

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,
                               ));
   }
});

 

tvJy0RY.png

 

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

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