StreamingServers Posted February 6, 2017 Share Posted February 6, 2017 Hi, how can i limit a free product/service only onetime to a client? I just want that a client order the free product/service only onetime with his account. I just want prvent some Spam cients, that make multiple order for the free producht or service. I would be happy about every ideas or excitement. Kind regards 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 6, 2017 Share Posted February 6, 2017 I don't know if it's v7 compatible, but you could try the free module below. https://github.com/Jetserver/WHMCS-Product-Limiter 0 Quote Link to comment Share on other sites More sharing options...
StreamingServers Posted February 6, 2017 Author Share Posted February 6, 2017 I don't know if it's v7 compatible, but you could try the free module below. https://github.com/Jetserver/WHMCS-Product-Limiter Thanks for the Info. 0 Quote Link to comment Share on other sites More sharing options...
StreamingServers Posted February 6, 2017 Author Share Posted February 6, 2017 Can i limit the Time of free Trail Version less than 24h ? If yes how can do this ? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 6, 2017 Share Posted February 6, 2017 you can write ActionHook function to handle this task 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted August 4, 2017 Share Posted August 4, 2017 I don't know if it's v7 compatible, but you could try the free module below. https://github.com/Jetserver/WHMCS-Product-Limiter Just tested this with 7.2.3 and it DOES NOT work. Getting the following errors: BadFunctionCallException: mysql_free_result is not supported in /home/username/public_html/includes/dbcompatfunctions.php:0Stack trace: #0 /home/username/public_html/modules/addons/limit_purchase/functions.php(21): mysql_free_result(Object(PDOStatement)) #1 /home/username/public_html/modules/addons/limit_purchase/functions.php(9): limit_purchase->loadConfig() #2 /home/username/public_html/modules/addons/limit_purchase/limit_purchase.php(91): limit_purchase->__construct() #3 [internal function]: limit_purchase_output(Array) #4 /home/username/public_html/admin-login/addonmodules.php(0): call_user_func('limit_purchase_...', Array) #5 {main} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 4, 2017 Share Posted August 4, 2017 works for me on v7.2.3 using Six & Standard_cart - e.g., setup a product with a limit of 1... then go to the cart and try to add two of these products, click checkout and it correctly outputs the error message and prevents checkout occurring... remove the second product and checkout works as normal. I guess your problem will be that you're using PHP7 (i'm testing with 5.5 on the dev currently) and so mysql_free_result has been removed... http://php.net/manual/en/function.mysql-free-result.php WarningThis extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: mysqli_free_result() Assign the value of NULL to the PDO object, or PDOStatement::closeCursor() so long-term, it's definitely going to fail if it's isn't rewritten to use mysqli or PDO... short term, if you're not using PHP7 (or possibly 5.6), it should work fine. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted August 4, 2017 Share Posted August 4, 2017 Is this hard to update for PHP7? A couple line changes ?!?! or is it like a total rewrite of the module ? I am trying to compare modules to see if I can notice the differences in the files and see what I can do to get this to work, as I could use this module right now with my free trails I want to offer. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 4, 2017 Share Posted August 4, 2017 that could be one of those "how long is a piece of string" questions! either way, I suspect the answer is somewhere between the two... more than a couple of tweaks, but not quite a complete rewrite... the core addon works, so it's just a case of tweaking the SQL method. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.