criat
Member-
Posts
84 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by criat
-
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.
-
I was gonna complain about WHMCS for something I was doing wrong, please delete this. Thanks.
-
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?
-
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");
-
https://github.com/ShaunR/template-bootstrap
-
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?
-
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.
-
Translate Client Date Format (3rd/Aug/2014) - Must have feature?
criat replied to criat's topic in Using WHMCS
Option 1: American Option 2: American Option 3: American They are all in english, but thanks -
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!
-
Translate Client Date Format (3rd/Aug/2014) - Must have feature?
criat posted a topic in Using WHMCS
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? -
How can I add a product bundle using Add Order API? Instead of pid (product id), I want to use bid (bundle id) Thanks.
-
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?
-
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!
-
Nevermind, I'm going another way... [Please delete this question]
-
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!
-
3 months later, I still don't know the answer to this question Can I change WHMCS to use d/m/Y? (03/03/2014 instead of 3rd/Mar/2014) There's no such option in Localisation tab
-
Thanks cesium, saw that but only works if admin X is logged in, I'm looking for a variable that works for any admin @DennisMidjord I've removed that bar a long time ago, I don't have it anymore (it was annoying)
-
Hello, I'm looking for a function to run something if the user is an administrator, something like {if $isadmin} You are an admin. {else} You are not an admin. {/if} Any ideas? Thanks
-
Rolled back to 5.2.12 and it's working fine. What happened? @SiteOx, I see. I don't have it at all. I'll donwload the full 5.2.14 version and get the missing files from there. Is it a real security breach to use 5.2.12 for a while?
-
Immediately after the update I got this error: Warning: main(/home/crweb/public_html/includes/class.phpmailer.php) [function.main]: failed to open stream: No such file or directory in /home/crweb/public_html/includes/functions.php on line 0 Fatal error: main() [function.require]: Failed opening required '/home/crweb/public_html/includes/class.phpmailer.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/crweb/public_html/includes/functions.php on line 0 Then I created an file named class.phpmailer.php and added this content Now the error is: Warning: main(/home/crweb/public_html/includes/licensefunctions.php) [function.main]: failed to open stream: No such file or directory in /home/crweb/public_html/dbconnect.php on line 0 Warning: main() [function.include]: Failed opening '/home/crweb/public_html/includes/licensefunctions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/crweb/public_html/dbconnect.php on line 0 Catchable fatal error: Argument 1 passed to WHMCS_TokenManager::init() must be an instance of WHMCS_Init, instance of WHMCSCore given, called in /home/crweb/public_html/includes/functions.php on line 0 and defined in /home/crweb/public_html/includes/classes/class.TokenManager.php on line 0 Luckly I have the backup, I'll just stick to 5.2.12 for a while.
-
Hello, I have received a support ticket today from a client that I had before I created my WHMCS website. So when I created her cPanel account, I didn't have WHMCS yet, same goes for e-mail. What can I do so she can see her services in WHMCS? Thanks!
-
Did it! <?php require("../dbconnect.php"); require("../includes/functions.php"); require("../includes/clientareafunctions.php"); $itemCount = 0; $productKeys = array('domains', 'products', 'addons'); foreach ($productKeys as $productKey) { if (!empty($_SESSION['cart'][$productKey])) { $itemCount += count($_SESSION['cart'][$productKey]); } } if (($itemCount += count($_SESSION['cart'][$productKey])) > 1): echo "<a href='https://yoursite.com/checkout/go?language=canada'><li class='header-icon'><div class='header-right-icon-cart'></div></li>"; echo "<li class='header-right-chat'>{$itemCount} items</li></a>"; echo "<div class='linha-vertical-header'></div>"; elseif (($itemCount += count($_SESSION['cart'][$productKey])) == 1): echo "<a href='https://yoursite.com/checkout/go?language=canada'><li class='header-icon'><div class='header-right-icon-cart'></div></li>"; echo "<li class='header-right-chat'>{$itemCount} item</li></a>"; echo "<div class='linha-vertical-header'></div>"; endif; ?>
-
Now I'm facing a bigger issue I'm trying to adapt it to work on my main website (wich is HTML/PHP, not WHMCS), how can I do it? I've googled a lot but I'm lost. My main website is on the same domain as my WHMCS @druptech Thanks for the tip
-
Hey, My main concern was the invoice e-mails wich said something like Google I (17/11/2013 - 16/12/2013) Wich seemed to be the period the product would be active. But it takes around 3 days to activate a Google account, and the client might think he would lose his 3 days. I'll just re-format the emails so these mistakes does not happens Thanks for your suggestion Good night
-
@ServWise Thanks for the tips, I'll definitely use the browser lang redirect then But, about the URL_Rewriting, I've just made my website in HTML from scratch, so now I'm thinking of sticking to it for displaying products and such. The down points of using HTML in frontend is integrating codes like "Hello, client.name", because I have to see if client is online, grab his name and display there, and I still didn't find out how to do it. - From the SEO point of view, from what I've read it seems to be fairly better But one thing is annoying me: The affiliate system. It won't work because of the redirects. Let's say my affiliate link is https://mysite.com?aff=004. When I access it, I go to https://mysite.com/br because of redirect, and the affiliate cookie simply won't grab. I'll make a topic of it
