Jump to content

dotnetrix

Member
  • Posts

    33
  • Joined

  • Last visited

About dotnetrix

dotnetrix's Achievements

Member

Member (2/3)

0

Reputation

  1. Hi, I am pulling the following results from a hookpoint: hook file returns: return array("getDNSrecords" => $getDNSrecords); var_dump shows: array(2) { ["metadata"]=> array(4) { ["result"]=> int(1) ["version"]=> int(1) ["command"]=> string( "dumpzone" ["reason"]=> string(15) "Zone Serialized" } ["data"]=> array(1) { ["zone"]=> array(1) { [0]=> array(1) { ["record"]=> array(18) { [0]=> array(4) { ["raw"]=> string(148) "; cPanel first:11.66.0.13 (update_time):1503177319 11.66.0.13: Cpanel::ZoneFile::VERSION:1.3 hostname:central.sometest.om latest:11.66.0.13" ["ttl"]=> string(5) "86400" ["Line"]=> int(1) ["type"]=> string(4) ":RAW" } [1]=> array(4) { ["ttl"]=> string(5) "86400" ["Line"]=> int(2) ["raw"]=> string(37) "; Zone file for sometest.com" ["type"]=> string(4) ":RAW" } [2]=> array(3) { ["type"]=> string(4) "$TTL" ["ttl"]=> string(5) "14400" ["Line"]=> int(3) } [3]=> array(13) { ["minimum"]=> string(5) "86400" ["expire"]=> string(7) "1209600" ["type"]=> string(3) "SOA" ["ttl"]=> string(5) "86400" ["name"]=> string(22) "sometest.com." ["Lines"]=> int(6) ["class"]=> string(2) "IN" ["retry"]=> string(4) "7200" ["serial"]=> string(10) "2017081901" ["Line"]=> int(4) ["mname"]=> string(22) "ns.nameserver1.com" ["refresh"]=> string(4) "3600" ["rname"]=> string(33) "root.central.sometest.com" } [4]=> array(4) { ["Line"]=> int(10) ["ttl"]=> string(5) "86400" ["raw"]=> string(0) "" ["type"]=> string(4) ":RAW" } [5]=> array(6) { ["type"]=> string(2) "NS" ["nsdname"]=> string(22) "ns.nameserver1.com" ["class"]=> string(2) "IN" ["name"]=> string(22) "sometest.com." ["Line"]=> int(11) ["ttl"]=> string(5) "86400" } [6]=> array(6) { ["name"]=> string(22) "sometest.com." ["ttl"]=> string(5) "86400" ["Line"]=> int(12) ["class"]=> string(2) "IN" ["nsdname"]=> string(22) "ns.nameserver2.com" ["type"]=> string(2) "NS" } [7]=> array(6) { ["class"]=> string(2) "IN" ["nsdname"]=> string(22) "ns.nameserver3.com" ["ttl"]=> string(5) "86400" ["Line"]=> int(13) ["name"]=> string(22) "sometest.com." ["type"]=> string(2) "NS" } [8]=> array(6) { ["nsdname"]=> string(22) "ns.nameserver4.com" ["class"]=> string(2) "IN" ["name"]=> string(22) "sometest.com." ["ttl"]=> string(5) "86400" ["Line"]=> int(14) ["type"]=> string(2) "NS" } [9]=> array(4) { ["type"]=> string(4) ":RAW" ["ttl"]=> string(5) "86400" ["Line"]=> int(15) ["raw"]=> string(0) "" } [10]=> array(4) { ["type"]=> string(4) ":RAW" ["ttl"]=> string(5) "86400" ["Line"]=> int(16) ["raw"]=> string(0) "" } [11]=> array(6) { ["class"]=> string(2) "IN" ["ttl"]=> string(5) "14400" ["Line"]=> int(17) ["name"]=> string(22) "sometest.com." ["type"]=> string(1) "A" ["address"]=> string(14) "197.1.1.1" } [12]=> array(4) { ["ttl"]=> string(5) "86400" ["Line"]=> int(18) ["raw"]=> string(0) "" ["type"]=> string(4) ":RAW" } [13]=> array(7) { ["exchange"]=> string(21) "sometest.com" ["class"]=> string(2) "IN" ["ttl"]=> string(5) "14400" ["Line"]=> int(19) ["name"]=> string(22) "sometest.com." ["type"]=> string(2) "MX" ["preference"]=> string(1) "0" } [14]=> array(4) { ["ttl"]=> string(5) "86400" ["Line"]=> int(20) ["raw"]=> string(0) "" ["type"]=> string(4) ":RAW" } [15]=> array(6) { ["class"]=> string(2) "IN" ["ttl"]=> string(5) "14400" ["Line"]=> int(21) ["cname"]=> string(21) "sometest.com" ["name"]=> string(27) "mail.sometest.com." ["type"]=> string(5) "CNAME" } [16]=> array(6) { ["name"]=> string(26) "www.sometest.com." ["cname"]=> string(21) "sometest.com" ["ttl"]=> string(5) "14400" ["Line"]=> int(22) ["class"]=> string(2) "IN" ["type"]=> string(5) "CNAME" } [17]=> array(6) { ["cname"]=> string(21) "sometest.com" ["name"]=> string(26) "ftp.sometest.com." ["ttl"]=> string(5) "14400" ["Line"]=> int(23) ["class"]=> string(2) "IN" ["type"]=> string(5) "CNAME" } } } } } } In the .tpl file I am trying to print the dns zone file into a table, but nothing shows: {foreach item=records from=$getDNSrecords} <b>{$records.data.zone.record}</b> {/foreach} Any help much appreciated.
  2. So we've been seeing this issue a lot the last few months. Scenario: Client signs up today for domain $10 and annual hosting $25, total being $35. Next year he gets a "Domain Renewal" reminder that he must renew his domain. Client logs into WHMCS client area then from Cart renew the domain name at $10. The system already generated an invoice for recurring $35. The client is upset and says he already paid his service, we have to explain that there is another invoice for the hosting as well. Ideally I though about a hook that checks if an invoice is on the system for the domain in question, then disables the ability to renew that specific domain. The problem is however that WHMCS does not have a hook point for Cart -> DomainRenewals Any ideas would be much appreciated.
  3. Indeed the code worked and I place successful orders for the renewals. As you know from my previous posts I am trying to solve a Closed Redemption issue and proceeded to write a Addon Module which lists expired domains for clients, more than 45 day ago. I can successfully place a domain renewal order for selected domains from a addon module page. Only issue now is is using the "domainrenewoverride" parameter to change the price for each domain to 285.00 float.
  4. Hi all, I am using the Local API to add a new order, for domain renewal at a different price. The information I am using is coming from https://developers.whmcs.com/api-reference/addorder/ The order gets added to the cart, it generates an invoice etc. BUT, the "domainrenewoverride" parameter is not working, so the renewal price is not getting updated. $command = 'AddOrder'; $adminUsername = 'Admin'; $postData["clientid"] = $uid; $postData["paymentmethod"] = 'offlinecc'; $postData["domainrenewals"] = array(); foreach ($_POST['renewthesedomains'] as $key => $value) { $postData["domainrenewals"][$value] = "1"; } $postData["domainrenewoverride"] = 285.00; var_dump ($postData); $results = localAPI($command, $postData, $adminUsername); print_r($results); The var_dump shows: array(4) { ["clientid"]=> int(1) ["paymentmethod"]=> string(12) "offlinecc" ["domainrenewals"]=> array(2) { ["domain1.com"]=> string(1) "1" ["domain2.com"]=> string(1) "1" } ["domainrenewoverride"]=> array(1) { [0]=> float(285) } } But the actual renewal price for the domains do not get adjusted to 285.00 Any ideas would be appreciated.
  5. Thank you for that! I am however looking to only temporarily change the price, if the domain expired more than 30 days ago. Sort of a Redemption Fee hook. The Price Formatter class appears to allow for permanent updating of the price field of the domain/s.
  6. Hi, I am trying to update a value for a template variable. The {debug} on the domainrenewals.tpl states: $renewals Origin: "Smarty object" Value Array (3) 0 => Array (12) id => "21" domain => "mydomain.com" tld => ".com" status => "Expired" expirydate => "06/09/2016" daysuntilexpiry => -151 beforerenewlimit => false beforerenewlimitdays => 0 ingraceperiod => false pastgraceperiod => true graceperioddays => "30" renewaloptions => Array (1) 0 => Array (2) period => 1 price => WHMCS\View\Formatter\Price Object (0) So, via a hook on ClientAreaPageCart I am trying to update the price value, but cannot get this right: I've tried: $template->assign('price', '285.00'); and also: $return['renewals']['renewaloptions']['price'] = "285.00"; The last one above actually overrides the entire array, but I just want to update the price. Now, the .tpl file itself shows the variable as {$renewaloption.price} Any help appreciated.
  7. Same here, this is an exact quote of a client after we told him this has been removed: "You've taken something that worked efficient and made it inefficient"
  8. Fantastic, thank you, this is exactly what I was looking for.
  9. Hi, The developer docs state that it is possible to post from an Addon Module's tpl file to the module: My understanding of this is that, if I have: myaddonmod.tpl <form method="post" action="addonmodules.php?module=myaddonmod"> <input type="text" name="domain"><br> <input type="submit" name="submit" value="Submit Form"><br> </form> I am submitting to the module and should be able to capture it there: myaddonmod.php function myaddonmod_output($vars) { $modulelink = $vars['modulelink']; $domname = $_POST['domain']; *** do things to $domname *** } But this does not seem to work, running v7.1 Any help appreciated.
  10. ThemesChamp.com provided us with a fantastic custom integration of their Ace Theme. The turn-around time and professional manner in which the latter was done is incredible.
  11. Has anyone else noticed system and module emails behaving erratic after upgrading to 5.3.10 ? Admin users getting weird emails meant for clients, like pwresets and sometime duplicate mails? Custom modules using local API sendemail function is also not working.
  12. I have an issue, not sure if this is a WHMCS bug: I have a custom Registrar module developed by ourselves. One of the Registrar functions is: function rar_ApproveTransfer($params) with Error value like this in the actual registrar module: $values["error"] = 'Cannot approve transfer now'; return $values; The approve button is available to admins: function rar_AdminCustomButtonArray() { $buttonarray = array( "Approve Transfer" => "ApproveTransfer", ); return $buttonarray; } as well as to our clients in the client area: function rar_ClientAreaCustomButtonArray() { $buttonarray = array( "Approve Transfer" => "ApproveTransfer", ); return $buttonarray; } The problem I am facing is that if an admin clicks on the button it will correctly return: "Cannot approve transfer now". but if a client clicks on the button via domains -> domain details -> management drop down it just does not return any success or error, despite there being: {elseif $registrarcustombuttonresult=="success"} <div class="alert alert-success"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times</button> <p>{$LANG.moduleactionsuccess}</p> </div> {elseif $registrarcustombuttonresult} <div class="alert alert-danger"> <p><strong>{$LANG.moduleactionfailed}:</strong> {$registrarcustombuttonresult}</p> </div> Any input appreciated.
  13. Hi, I have a custom page that lists upcoming renewals, called: expiring-soon.php At the moment the page merely queries the db for upcoming renewal in 30 days and lists them. I would like to put in a link so that a user can perform a "Quick Renew" of a single domain (instead of going to cart.php?gid=renewals and being shown every domain he has) and post the renewal directly to the shopping cart. I had a look at http://docs.whmcs.com/Linking_to_WHMCS without success. It tried variations of something like /cart.php?a=add&gid=renewals&sld=test&tld=.com Any help would be appreciated
  14. +1 for ModulesGarden, In the design rules Matt indicated a modern look, that is damn fine work and I think that it would meliorate WHMCS as a billing system in general.
  15. I the meantime, htb, sorry for the double reply, I mailed ya, can't wait 3/4 months for something like this to get thinked over (no offence WHMCS staff, you do a great job as usual and won't move to another system).
×
×
  • 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