Jump to content

Julien

Member
  • Posts

    6
  • Joined

  • Last visited

About Julien

Julien's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Dear all, I tried the following hook to simply change $companyname but it does not work: add_hook('ClientAreaPage', 1, function($vars) { global $smarty; $vars['companyname'] = 'Acme Ltd'; $vars['companyname2'] = 'Acme Ltd'; $smarty->assign('companyname', 'Acme Ltd'); return $vars; }); When using {debug}, $companyname2 is set to 'Acme Ltd', but $companyname is still set to the company name defined in WHMCS. So I'd like to know if you know a way to change existing Smarty variables. $companyname is just an example, I want to do to more complicated stuff with WHMCS variables so please do not let me know how to change $companyname 😉 Thanks :)
  2. Hello, It is enabled. I ended up rewrite to a custom .php which rewrites $_SERVER['REQUEST_URI'] and $_SERVER['REDIRECT_URL'] before reincluding WHMCS's index.php.
  3. Hello : ) We did exactly this with Cloudflare Access for our admin using a custom WHMCS hook: if(defined('ADMINAREA') && ADMINAREA && isset($_COOKIE['CF_Authorization'])) { if (basename($_SERVER['SCRIPT_NAME']) == 'logout.php') { $auth = new WHMCS\Auth(); $auth->logout(); header('Location: /cdn-cgi/access/logout'); exit; } if (<redacted> && ($data = get_query_vals("tbladmins", "id", array("email" => <redacted>)))) { $auth = new WHMCS\Auth(); $auth->getInfobyID($data['id']); $auth->setSessionVars(); $auth->processLogin(); } } I redacted some of our code but I hope this gives you an idea on how to proceed. Thanks.
  4. Dear WhmTools, It's the same product and same currency, just we'll do some changes on the product page to add some messages relevant to the country for SEO purposes. Thanks.
  5. Hello : ) There's a pretty complete sample registrar module on GitHub which you can use as a base: https://github.com/WHMCS/sample-registrar-module/tree/master/modules/registrars/registrarmodule. You will need to customize ` registrarmodule_getConfigArray` function to show some configuration options. Hope this helps!
  6. Dear all, We are about to expand to multiple countries and we'd like the following link structure (where "cc" is the country code): https://www.example.com/cc/store/product-group We already easily achieved this for our custom pages but we are not able to find the correct RewriteRule for this. We did try the following with no success: RewriteRule ^(re|mu|fr)/store/(.*)(/?)$ index.php?country=$1&rp=store/$2 [L] It causes a 404 error when accessing any link under /re/, /mu/ or /fr/. But if I go to the following link, it does show the correct page: https://www.example.com/index.php?country=re&rp=store/product-group I tried reaching out to WHMCS support but they advised to post here, so here I am. I hope my post makes sense and I'd love to hear your thoughts about it! Thanks : )
  7. Hello there, I founded a web-host in Reunion Island and we are glad to have found WHMCS because it streamlined a lot our process. I come from a Laravel background so I do some coding around WHMCS to make it even more suited for our needs. Talk soon : )
×
×
  • 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