Jump to content

So, who am I ?

Members
  • Content count

    35
  • Joined

  • Last visited

Community Reputation

10 Good

About So, who am I ?

  • Rank
    Member
  1. OrderDomainPricingOverride hook error

    just in case anyone have the same problem, putting hook in /includes/hooks folder helped thanks, braian!
  2. OrderDomainPricingOverride hook error

    ah lol just noticed the limit in your code, my bad $domain = explode('.', $vars['domain'], 2);
  3. OrderDomainPricingOverride hook error

    I know that, when I first saw site shut down I thought it was cuz of a duplicate function declaration or something like that since the two registrars I refer to, is the same registrar but with the different name and accounts, so basically they have the same files and functions, changed functions' name for one of them but still got error cuz of hook and was a bit confused cuz there was no any registrar function call in hook file. thought to remove it after I left office, will give it a try tomorrow, but I don't think it will solve the problem. oops yeah the duplication, I do explode two times, forgot to delete unnecessary code on the other hand, my code is correct cuz I need to change the price for 2-character .ge domains but domains can also be .com.ge, .net.ge etc and I don't need a different price for them. $domain_name = explode('.', $vars['domain']); if(count($domain_name)==2 && strlen($domain_name[0])==2 && $domain_name[1]=='ge'){ return 900.00; } with count($domain_name)==2, I make sure I catch 2-element array that will be .ge domains only and it won't be .com.ge/.net.ge etc that create 3-element array after exploding. oh, so it means I can't have the same hook multiple times in different registrars folders... yeah, I know that. will add it later cuz I'm still working on multi-currency site, since I couldn't find the product with a good review and kinda not sure it won't mess up the billings I'm thinking to find the way around it myself and hope it will work
  4. Different domain price for other countries

    than you, brian! will take a look at them
  5. OrderDomainPricingOverride hook error

    Hello I use OrderDomainPricingOverride hook to change some domain price manually, I need two registrars to use this hook, but when I add hook file to the second registrar's folder I get blank page and the whole site shuts down. I don't use any registrar function in the file, I just check domain's sld and tld and generate price, how can I manage to use the hook for both registrars ? this is my whole hook file: <?php /** * WHMCS SDK Sample Registrar Module Hooks File * * Hooks allow you to tie into events that occur within the WHMCS application. * * This allows you to execute your own code in addition to, or sometimes even * instead of that which WHMCS executes by default. * * WHMCS recommends as good practice that all named hook functions are prefixed * with the keyword "hook", followed by your module name, followed by the action * of the hook function. This helps prevent naming conflicts with other addons * and modules. * * For every hook function you create, you must also register it with WHMCS. * There are two ways of registering hooks, both are demonstrated below. * * @see https://developers.whmcs.com/hooks/ * * @copyright Copyright (c) WHMCS Limited 2016 * @license https://www.whmcs.com/license/ WHMCS Eula */ // Require any libraries needed for the module to function. // require_once __DIR__ . '/path/to/library/loader.php'; // // Also, perform any initialization required by the service's library. /** * Register a hook with WHMCS. * * add_hook(string $hookPointName, int $priority, string|array|Closure $function) */ add_hook('AdminHomeWidgets', 1, function() { return new SampleRegistrarModuleWidget(); }); add_hook('OrderDomainPricingOverride', 1, function($vars) { // Perform operations to determine price // logActivity('OrderDomainPricingOverride 900', 0); $domain = explode('.', $vars['domain']); $sld = $domain[0]; $tld = '.' . $domain[1]; $domain_name = explode('.', $vars['domain']); if(count($domain_name)==2 && strlen($domain_name[0])==2 && $domain_name[1]=='ge'){ return 900.00; } }); /** * Sample Registrar Module Admin Dashboard Widget. * * @see https://developers.whmcs.com/addon-modules/admin-dashboard-widgets/ */ class SampleRegistrarModuleWidget extends \WHMCS\Module\AbstractWidget { protected $title = 'Sample Registrar Module'; protected $description = ''; protected $weight = 150; protected $columns = 1; protected $cache = false; protected $cacheExpiry = 120; protected $requiredPermission = ''; public function getData() { return array(); } public function generateOutput($data) { return <<<EOF <div class="widget-content-padded"> Your widget output goes here... </div> EOF; } }
  6. Hello I'd like to sell domains with different price and currency for customers who visit from outside my country. I'm thinking to use OrderDomainPricingOverride hook to change price for non local customers, I plan to differ local and non local customers by their IP. But before I start, thought to ask here, maybe there's a better built in way of doing it that I couldn't find. I see I can add another currency to WHMCS but it says: Customers who visit your site can then choose to shop in their local currency. I don't want customers to have to choose currency, I want local ones to shop with local currency and non local one with non local currency. I still can differ it manually by IPs I know, just want to know if WHMCS has some extra features for it that I can use.
  7. Client Area delault language doens't work

    I've never thought to check templates for it, thought it was all about database, my bad yeah, current admin language is English. Instead of totally removing language, I passed Georgian as language parameter, so it will always open in Georgian from admin area, no matter what language user uses <a id="summary-login-as-client" href="../dologin.php?username={$clientsdetails.email|urlencode}&language=georgian"><img src="images/icons/clientlogin.png" border="0" align="absmiddle" /> {$_ADMINLANG.clientsummary.loginasclient}</a> thanks for help, brian!
  8. Hello I want my Client Area to be Georgian. I went to Set Up >> General Settings >> Localisation and chose Georgian as Default Language. When I go to client area it works fine, but if I go to Client Profile >> Summary and click 'Login as Client' in 'Client Information' box, it still redirects me to English version of Client Area. I've done a little research on the web before asking here and some said it isn't saved in database and that's why it doesn't work, I checked tblconfiguration table and it says that language is Georgian, am I looking for it in a wrong table ? How can I fix this ?
  9. Bulk Domain Transfer

    I add them to the cart and system generates invoice, but when I pay invoice system transfers only one domain and won't call TransferDomain method for the second domain. I'm not sure but I guess bulk domain transfer used to call DomainTransfer method once and domains array was passed to it, so it means it was called one time ? I've not done many research on it and that's just my guess tho. What I don't understand is if user can register more than one domain at a time and once he pays invoice all the domains get registered, why is that a problem for transfer ? Once invoice is payed DomainRegister is called as many times as the number of bought domains are in invoice, I suppose DomanTransfer method should be working the same way, but it's not, maybe I have to do some changes in settings ?
  10. Bulk Domain Transfer

    no there's not any third-party addon and yeah I have a permission to transfer domains from registrar. Ahm... honestly, I don't exactly know how bulk domain transfer worked in version 6, but what I do is that, I add one domain in my cart to transfer, then go back and check other domain for transfer and add it to the cart as well, so when I click 'Next' I have two domains to transfer and system asks for EPP codes, since registrar generated one code for both domains I enter the same code two times and after invoice is generated I pay it. Well, one invoice is generated for two domains and after payment both of them should be transferred, but they aren't, system calls TransferDomain method one time for the first domain and it doesn't even call it for the second domain, that's what I know from logs. (in TransferDomain method I mean WHMCS TransferDomain method from registrar module, in which I call registrar's Transfer method that sends them transfer notification and they automatically approve it. Since system doesn't call WHCMS TransferDomain method, it doesn't call registrar's Transfer method and so they don't get transfer notification at all.) while I was testing I even tried to transfer two domains with different EPP Codes and it did the same, it transferred first domain and didn't call the method for the second one. I don't know how bulk domain transfer was in v6, like if you had to check more than one domain at a time without adding them one by one manually to cart, like I did, but I guess it doesn't matter cuz after invoice payment, system is asked to transfer more than one domain and it can't do it, cuz that option is removed. I mean giving the end-user the option of bulk transferring domains.
  11. Bulk Domain Transfer

    Hello I need to add bulk domain transfer, I've searched it and found out that WHMCS removed bulk domain transfer in version 7.0. Registrar has a method that generates one EPP Code for all user's domains and user can transfer them all at a time. I know it's removed but maybe there's any other way of doing it without downgrading to version 6.0
  12. CheckAvailability

    oh wait, you mean to do what I did, but just write the actual code in whois.json file ? I never thought that whois.json would wok with the actual API code in it
  13. CheckAvailability

    yeah I know, it's annoying, I just thought to post it, when all work is done
  14. CheckAvailability

    sure it's just there's still some work going on in the background, I still have to print domain info properly in WHMCS whois lookup and so on, well there might be some unreturned information in upcoming days cuz as I said above there's still work going on for method that whois calls, but here's the working whois that you can write in your whois.json file if you need .ge domain registration { "extensions": ".ge,.com.ge,.net.ge,.org.ge,.edu.ge,.pvt.ge", "uri": "https://whois.ns.ge:443/index.php?domain=", "available": "NO OBJECT FOUND!" }
  15. CheckAvailability

    Yeah I wrote only .com but meant all the tlds enom sells Anyway, I found a solution and created custom whois that calls registrar's method to get domain's availability and it works fine! Anyway, thanks for you time, brian!
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines