Jump to content

criat

Senior Member
  • Content Count

    84
  • Joined

  • Last visited

Community Reputation

0 Neutral

About criat

  • Rank
    Member
  1. ContactDelete hook only returns userid and clientid. After it deleted all other data. I saw there is PreDeleteClient hook, wich runs before the data is deleted from the database. It would be nice to have something similar for contacts. This way I can get whatever data I need before it is deleted.
  2. I was gonna complain about WHMCS for something I was doing wrong, please delete this. Thanks.
  3. Hello, I'm trying to make a hook that runs After Module Create. It should simply add the domain as a separate order with zero cost, just so the customer can see his domain on the client area. I've already tweaked the client area to show just expiration date and whois link for "domains" page. I've set this hook up, but it isn't working. if (!defined("WHMCS")) die("This file cannot be accessed directly"); function add_domain_on_create($vars) { $domain = $vars['params']['domain']; $userid = $vars['params']['userid']; $command = "addorder"; $adminuser = "admin"; $values["clientid"] = $userid; $values["domain"] = $domain; $values["billingcycle"] = "free"; $values["domaintype"] = "register"; $values["regperiod"] = 10; $results = localAPI($command,$values,$adminuser); } add_hook("AfterModuleCreate",1,"add_domain_on_create"); Can somebody help me out with that?
  4. What's wrong with this, for example? if (!defined("WHMCS")) die("This file cannot be accessed directly"); function add_domain_on_create($vars) { $domain = $vars['params']['domain']; $userid = $vars['params']['userid']; $command = "addorder"; $adminuser = "admin"; $values["clientid"] = $userid; $values["domain"] = $domain; $values["billingcycle"] = "free"; $values["domaintype"] = "register"; $values["regperiod"] = 10; $results = localAPI($command,$values,$adminuser); } add_hook("AfterModuleCreate",1,"add_domain_on_create");
  5. https://github.com/ShaunR/template-bootstrap
  6. Hello, I'm trying to make a hook that runs After Module Create. It should simply add the domain as a separate order with zero cost, just so the customer can see his domain on the client area. I've already tweaked the client area to show just expiration date and whois link for "domains" page. Can somebody help me out with that hook?
  7. I want to send a welcome e-mail as soon as my client purchases a product, the content os this e-mail is something like this: I have created the e-mail template for it. I have set this as the welcome e-mail for my Product. I have set my product to auto-provisioning (just so I can send this e-mail instantly, and didn't work), and I have the option "Only Auto Provision for Existing" UNCHECKED. The problem is, it only sends the welcome e-mail when I manually accept the order, therefore killing the purpose of the welcome e-mail in my case. The only way I see doing this is through the API, but I think there should be this functionality built-in, since I've seen a lot of people looking for it as well, but I don't remember seeing an answer. Thanks.
  8. Option 1: American Option 2: American Option 3: American They are all in english, but thanks
  9. Hello, I'm using API to add a order with two products - Website (one-time, instant activation after order - should send a welcome e-mail as soon as the client places the order) - Hosting (monthly, activation after accepting pending order) The problem is, the welcome e-mail for website is only being sent when I manually accept the pending order. Both products show as pending on order. How can I overcome this? Thanks!
  10. It looks very unprofessional for all non-american WHMCS users (95.6% of world population) to send invoice e-mails with american date format. Is there any way to translate the date format used to send invoice-emails, etc?
  11. How can I add a product bundle using Add Order API? Instead of pid (product id), I want to use bid (bundle id) Thanks.
  12. How can I run an Add Order function using the client's e-mail instead of his ID? Get Client Details allows me to search the client by his e-mail, why not Add Order?
  13. Hello, I'm setting a SESSION in my HTML page that doesn't gets pulled by WHMCS: HTML header.php <script> $(document).ready(function() { $(".comprarnaologado").click(function(){ var pid = $(this).data('pid'); $.post("/redirecttoproduct.php", {"pidofproduct": pid}); }); }); </script> redirecttoproduct.php <?php if(!session_id()) session_start(); $_SESSION['redirectproductpid'] = $_POST['pidofproduct']; ?> It echoes: print_r($_SESSION); = Array ( [tkval] => 48jEK8Xm7f5m [redirectproductpid] => 14 ) But on WHMCS, the $_SESSION doesn't contain redirectproductpid print_r($_SESSION); Array ( [tkval] => c7Brzy1qww6o [calinkupdatecc] => 0 [calinkupdatesq] => 0 [cart] => Array ( [user] => Array ( [country] => BR ) ) [Language] => brasil [uid] => 27 [upw] => 60dafaa05bca2fdc335640beb8202199fde50f30 ) I think it's starting a new SESSION, how can I make WHMCS pages and non-WHMCS pages share the same SESSION? Thanks!
  14. Nevermind, I'm going another way... [Please delete this question]
  15. I have made ahook to redirect the user to Cart if he has any products in his cart: And it displays a message in cart saying he got redirected there because he has items on cart. The problem with it, is that it echoes the message even if the client REGISTERS, it shouldn't show this message if it's the first time the client is logging in! What can I do to fix it? Thanks!
×
×
  • 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