ITWolfy Posted July 10, 2016 Share Posted July 10, 2016 Hi, all I wonder if one of you can reproduce this error on your WHMCS systems. As I have had a few customers clicking on RE-NEW domains, but they have no domains active yet, the output screen shows the customer that they have no domains, but with an Order Button, that goes nowhere. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 10, 2016 Share Posted July 10, 2016 I can reproduce it ! this is effectively 3 bugs - certainly 2, and WHMCS can argue the 3rd between themselves! 1. why, if the client has no domains, is the renewal link even in the navbar? it could be removed by a hook, but that's not the point.... this is the one they can argue amongst themselves. 2. if the client has no domains, why show the order button? btw - this can be quickly fixed by wrapping the code in an {if} statement... below is from Standard_cart {if $clientsstats.numdomains gt 0} <p class="text-center"> <button type="submit" class="btn btn-success"> <i class="fa fa-shopping-cart"></i> {$LANG.ordernowbutton} </button> </p> {/if} 3. someone in WHMCS needs to invest in a dictionary or a spellcheck! [ There are no domains elligible for renewal in your account there are only 2 'L's in 'eligible' - even in US American! you might want to open a ticket or report it as a bug(s) - I would expect the next release to be imminent, so the sooner you can get it in, the quicker they can fix it. 0 Quote Link to comment Share on other sites More sharing options...
ITWolfy Posted July 10, 2016 Author Share Posted July 10, 2016 Thank you brian! I corrected the spelling with my trusty override and I also reported the unwanted function/s as bug/s. Great Thanks to you not just for this post but all your posts on the forums has helped me a great deal... more than you know 0 Quote Link to comment Share on other sites More sharing options...
ITWolfy Posted July 12, 2016 Author Share Posted July 12, 2016 (edited) Brian! and Others I have decided to go with this code here below to replace the button with my custom button if a customer has no domains. I will paste here if others might need it too: In your Standard Order Cart if you are using it replace this code below in the file domainrenewals.tpl Original: <p class="text-center"> <button type="submit" class="btn btn-success"> <i class="fa fa-shopping-cart"></i> {$LANG.ordernowbutton} </button> </p> Replace above code with this: {if !empty($renewals)}<p class="text-center"> <button type="submit" class="btn btn-success"> <i class="fa fa-shopping-cart"></i> {$LANG.ordernowbutton} </button> </p> {else} <p class="text-center"> <img src="https://PATH TO.JPG-OFF-Pic" style="width:0px;height:0px;"></a> <a href="https://WHMCS-DOMAIN/cart.php?a=add&domain=register"><img onmouseover="this.src='https://PATH TO.JPG-ON-Pic';" onmouseout="this.src='https://PATH TO.JPG-OFF-Pic';" src="https://PATH TO.JPG-OFF-Pic" alt="" height="73" width="266"></a> {/if} You will need to replace: https://PATH TO.JPG-OFF-Pic (With pic for OFF) https://PATH TO.JPG-ON-Pic (With pic for ON) https://WHMCS-DOMAIN/cart.php?a=add&domain=register (With Your Domain Path to where the button must go when clicked) That's it , it works great for me maybe it can help you too dear forum member/reader. If you can improve the code at all feel free to do so and post it here please. You might need to adjust the sizes to suit your buttons. If you just want to hide the button from the user with no domains use this code below to replace said code at the top: Or use Brian!'s code he posted works just as well. {if !empty($renewals)}<p class="text-center"> <button type="submit" class="btn btn-success"> <i class="fa fa-shopping-cart"></i> {$LANG.ordernowbutton} </button> </p> {/if} Edited July 12, 2016 by ITWolfy 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 12, 2016 Share Posted July 12, 2016 there are many ways to skin a cat! a couple of things I spotted with your code... it's not wrong, these are just perhaps some improvements/simplifications. if you were to upload your images to '/assets/img', you could then use {$BASE_PATH_IMG} in your path instead... <img src="{$BASE_PATH_IMG}/JPG-OFF-Pic" style="width:0px;height:0px;"></a> and because you know that you're already in the cart, you shouldn't necessarily need the WHMCS domain link in you href... <a href="cart.php?a=add&domain=register"><img onmouseover="this.src='{$BASE_PATH_IMG}/JPG-ON-Pic';" onmouseout="this.src='{$BASE_PATH_IMG}/JJPG-OFF-Pic';" src="{$BASE_PATH_IMG}/JPG-OFF-Pic" alt="" height="73" width="266"></a> 0 Quote Link to comment Share on other sites More sharing options...
ITWolfy Posted July 12, 2016 Author Share Posted July 12, 2016 Thank you so much Brian!, I really appreciate your time and advice given to this 6-month-old baby user of WHMCS. I am taking many leafs from your book and learning 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.