plusplushosting Posted February 20, 2019 Share Posted February 20, 2019 Sorry to post this way as im unable to reply to the post Quote if you are offering renewals at different prices, then the simplest solution might be to just disable renewals in the client area and let them renew the domains upon invoice at due time... other than that, and assuming you can't use pricing slabs, then you're going to have to develop a custom solution. I did this and now im a bit lost as i see clients that are able to renew in advance.....perhaps the Renew button is showing anyway before X days from the expiry date? They are being able to simply order the renewal and the system is using the base price. Please help!!! hahahaha Thanx! 0 Quote Link to comment Share on other sites More sharing options...
Evolve Web Hosting Posted February 20, 2019 Share Posted February 20, 2019 Setup different customer groups, assign the customers to the new group and create a new price slab for each group needed. The price slab has to be set by TLD as far as I know. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted February 21, 2019 Author Share Posted February 21, 2019 Thanx! Will not work as the same client have domains on both registrar. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 21, 2019 Share Posted February 21, 2019 19 hours ago, plusplushosting said: I did this and now im a bit lost as i see clients that are able to renew in advance then it sounds like you still haven't disabled "Enable Renewal Orders" in general settings -> domains... if you do that, they will not be able to renew their domains from the cart and will have to wait for the invoice - with their renewal price correctly taken from their own recurring price amount. Quote When enabled clients will see domain renewal options in the client area and a renewal category in the shopping cart allowing for them to renew domains at any time. When unticked clients will only be able to renew domains when the renewal invoice is automatically generated. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted February 21, 2019 Author Share Posted February 21, 2019 13 minutes ago, brian! said: then it sounds like you still haven't disabled "Enable Renewal Orders" in general settings -> domains... if you do that, they will not be able to renew their domains from the cart and will have to wait for the invoice - with their renewal price correctly taken from their own recurring price amount.  Thats the problem, i did this initially and they continue being able to order renewals. 😞 Also logging in as a client i do not see the renewal button....so im a bit lost if im missing anything else. Thanx! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 21, 2019 Share Posted February 21, 2019 3 hours ago, plusplushosting said: Thats the problem, i did this initially and they continue being able to order renewals. that's weird... 3 hours ago, plusplushosting said: Also logging in as a client i do not see the renewal button....so im a bit lost if im missing anything else. that "Renew Domains" link in the menu should be conditional on whether "Enable Renewal Orders" is enabled or not... so if it's disabled, then it gets removed from the menu and it sounds as though that is what you're seeing on your custom theme too - so far, so good.🙂 however, i've just found a bug whilst checking this - in that, even if the feature is disabled, a client could still go to /cart/domain/renew (or whatever your Friendly URL equivalent is) and access the renewals page - that's insanely poor coding/testing from WHMCS to allow that... 🙄 perhaps your clients are still able to access the page via links in your emails or elsewhere on your site ?? you could null the array used on that page with a hook if the "Enable Domain Renewal" feature is disabled... <?php use WHMCS\Config\Setting; function domain_renewals_disabled_hook($vars) { $templatefile = $vars['templatefile']; if ($templatefile == "domain-renewals" && Setting::getValue('EnableDomainRenewalOrders') != 'on') { return array ("renewalsData" => null); } } add_hook("ClientAreaPage", 1, "domain_renewals_disabled_hook"); or you could delete or edit the domains-renewals.tpl template itself, but hooking would probably be better. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted February 21, 2019 Author Share Posted February 21, 2019 I knew i wasnt that crazy 🙂 Thanx Brian! Ill test and see how it go. Hellloooo WHMCS techs!! anyway...who knows where they are 🙂 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 2, 2019 Author Share Posted March 2, 2019 just got another order for renewal 😞 Looks like the hook is not doing the job somehow....i tested accessing " domain.com/cart/domain/renew" and is load that page with all the domains and the renew buttons 😞 I had to simply remove the domain-renewals.tpl file (hopefully this will not affect another thing other than the early renewal option) Thanx! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 3, 2019 Share Posted March 3, 2019 11 hours ago, plusplushosting said: Looks like the hook is not doing the job somehow....i tested accessing " domain.com/cart/domain/renew" and is load that page with all the domains and the renew buttons the problem here might be that it's a custom template, and the domain renewals template might be called something else internally... using a {debug} in that template might tell you what it's called, or asking @Impressive Themes as it's their control template that you're using... as this renewals page is a loggedin-only page, it's difficult for me to test externally. 11 hours ago, plusplushosting said: I had to simply remove the domain-renewals.tpl file (hopefully this will not affect another thing other than the early renewal option) if you're going down that road, you'd probably have to remove it from other templates too - e.g., to prevent them bypassing your default template and using one of the others. 🙄 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 3, 2019 Author Share Posted March 3, 2019 Thanx! This is getting more interesting....the template file is called the same way...i have also removed the IF logic to simply return null anyway and is not working, keeps loading the renewal page. Any idea?  <?php use WHMCS\Config\Setting; function domain_renewals_disabled_hook($vars) { return array ("renewalsData" => null); } add_hook("ClientAreaPage", 1, "domain_renewals_disabled_hook");   0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 3, 2019 Share Posted March 3, 2019 On 03/03/2019 at 18:16, plusplushosting said: i have also removed the IF logic to simply return null anyway and is not working, keeps loading the renewal page. Any idea?  that still continues to work as expected on Six - though it's not a good idea to remove the IF in general. edit your renewals template, add {debug} to the end and tell me the value of templatefile in the popup window. also, which version of WHMCS are you using ??? 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 3, 2019 Author Share Posted March 3, 2019 Thanx! Quote edit your renewals template, add {debug} to the end and tell me the value of templatefile in the popup window. yup, is what i did before.... $templatefile Origin: "Smarty object" Value "domain-renewals"   Quote also, which version of WHMCS are you using ???  7.6.1 Thanx Brian! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 4, 2019 Share Posted March 4, 2019 5 hours ago, plusplushosting said: 7.6.1 we've entered the Twilight Zone - this for me is working on my v7.6.1 dev... ... assuming that "Enable Renewal Orders" is unticked in general settings -> domains and that your uploading the hooks to /includes/hooks also, double check the value in the tblconfiguration table just to ensure that it's not "on" (it will likely be empty). you could try not using the Class method and going old-skool using $CONFIG... either method should work... if they don't, then something weird is going on... <?php function domain_renewals_disabled_hook($vars) { global $CONFIG; $templatefile = $vars['templatefile']; if ($templatefile === "domain-renewals" && $CONFIG['EnableDomainRenewalOrders'] !== 'on') { return array ("renewalsData" => null); } } add_hook("ClientAreaPage", 1, "domain_renewals_disabled_hook"); 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 4, 2019 Author Share Posted March 4, 2019 Thanx very much for your time! It continue as is.....i removed the tpl file to have a solution....im not sure why is not working in my installation. Thanx again! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 4, 2019 Share Posted March 4, 2019 1 hour ago, plusplushosting said: im not sure why is not working in my installation. the weird thing about your site is that if I try to get it to use Six & Standard_cart (by specifying them in the URL), it tries to, but it fails to load the css/js (as they're 404), so the output isn't correct... though that may be intentional if you don't want users using Six. anyway, if the template is gone, and they can't use another cart or theme, that should resolve the issue. 🙂 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 4, 2019 Author Share Posted March 4, 2019 Yeah, i just left that theme only so i guess will be ok. Thanx again! and sorry for the wasted time. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted March 21, 2019 Author Share Posted March 21, 2019 ok, im back...hahaha...is there any way to have the following variable from the classes available as a variable in the domain-renewal.tpl? $registrarModuleName Thanx! Â 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 21, 2019 Share Posted March 21, 2019 57 minutes ago, plusplushosting said: is there any way to have $registrarModuleName from the classes available as a variable in the domain-renewal.tpl?  if it isn't there by default, then it would be a ClientAreaPage hook (IIRC Cart hook isn't triggered by the renewals page); you would get the $renewalsData array from the template; loop through the array; add the registrar name to each domain in the array and then return the array to the template. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 14, 2019 Author Share Posted May 14, 2019 On 3/21/2019 at 1:36 PM, brian! said: if it isn't there by default, then it would be a ClientAreaPage hook (IIRC Cart hook isn't triggered by the renewals page); you would get the $renewalsData array from the template; loop through the array; add the registrar name to each domain in the array and then return the array to the template. Yea...a piece of cake :-).....for a developer ...is Chinese for me, hahahaha.....any chance to give me at least a base code to work with it? Thanx again Brian! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted May 14, 2019 WHMCS Support Manager Share Posted May 14, 2019 Hi there, I've been able to reproduce this on my fresh 7.7.1 installation too, and as such have opened case #CORE-13372 with our developers in order to have this reviewed for future releases. Once we resolve cases and push features they are available at our change log, here: https://changelog.whmcs.com/ Thanks again for taking the time to report your findings. We welcome bug reports at https://bugs.whmcs.com/ 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 15, 2019 Author Share Posted May 15, 2019 Thanx! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 20, 2019 Share Posted May 20, 2019 On 14/05/2019 at 15:27, plusplushosting said: Yea...a piece of cake :-).....for a developer ...is Chinese for me, hahahaha.....any chance to give me at least a base code to work with it? Thanx again Brian! you don't want a base code - you want me to write the whole thing! 😎 if a domain is assigned to a registrar, using the attached hook, you should be able to access it in the template foreach loop using... {$renewalData.registrarmodule} if a domain is not currently assigned to a registrar, then the above variable won't exist for that particular domain.  0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 20, 2019 Author Share Posted May 20, 2019 Quote you don't want a base code - you want me to write the whole thing! 😎 What will be the difference to write 1000 hooks or 1001 🙂 ? Thanx again man!...as you can see you cant take vacations....nor taste such things like a "sun" or odd stuff like that 🙂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 20, 2019 Share Posted May 20, 2019 22 minutes ago, plusplushosting said: What will be the difference to write 1000 hooks or 1001 🙂 ?  i'd need another week off! 😎 21 minutes ago, plusplushosting said: Thanx again man!...as you can see you cant take vacations....nor taste such things like a "sun" or odd stuff like that 🙂 Brian returns to the dark basement with no windows, not allowed to see the sun ever again, to continue banging out hooks... 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 23, 2019 Author Share Posted May 23, 2019 Hi Brian, Why do you need a window!? You can see the life through a screen 🙂 Unfortunately something is not working as it not passing the registrar variable in the array. I did add {debug} in the template and there isn't any variable in the array for the registrar name (registrarmodule). Thanx!  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.