Jump to content

Search the Community

Showing results for tags 'laravel'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


WHMCS.Community

  • The latest WHMCS Release
  • The Latest from the WHMCS Team
    • News, Announcements & Blogs from WHMCS
  • WHMCS.Community
    • Community Announcements
    • Introduce Yourself
  • Using WHMCS
    • Pre-Sales Questions
    • Admin & Configuration Questions
    • Installation, Upgrade, and Import Support
    • Using WHMCS
    • Troubleshooting Issues
    • Vendor Discussions
  • WHMCS Showcase
    • Showcase Your Site
    • Share Your Best Practices & Tips
  • Developing & Extending WHMCS
    • Third Party Add-ons
    • Service Offers & Requests
    • Developer Corner
    • Building Modules
    • Share Ideas for WHMCS Modules
  • Community Competitions
    • Competitions
  • General Discussions
    • General Discussion
  • General Feedback & Assistance
    • Feedback
    • WHMCS.Community Tips & Tricks
  • Third Party Developers's Topics
  • Turkish International Discussions's Topics
  • Russian International Discussions's Topics
  • Spanish International Discussions's Topics
  • Portuguese International Discussions's Topics
  • French International Discussions's Topics
  • Italian International Discussions's Topics
  • German International Discussions's Topics
  • WHMCS Brasil's Topics
  • WHMCS Brasil's Tópicos
  • ModulesGarden Club's Topics
  • Hungarian International Discussions's Segítség
  • ThemeMetro Club's Topics
  • WHMCS Services Club's Topics
  • WHMCS Global Services Club's Topics
  • Katamaze's Free Scripts
  • Katamaze's Modules
  • Zomex Club's Topics
  • 0100Dev Club's Topics

WHMCS Version

  • V8.3.x Hotfixes
  • V8.2.x Hotfixes
  • V8.1.x Hotfixes
  • V8.0.x Hotfixes
  • V7.10.x Hotfixes
  • V7.9.x Hotfixes

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 6 results

  1. whmcs dismisses the best ideas? for developers trying to create a better ecosystem for whmcs "they discard the best ideas" to get into context, some time ago while working with the whmcs API, I noticed that whmcs does not allow including "custom files within /includes/api" I'll leave a link on what I had to do to achieve it: which is absurd if you think about it. if they allowed to include files (within the api roles) they would allow other developers to join the project and add new functions that WHMCS does not yet have. now I take it that someone posted the exact same question but it was discarded: https://requests.whmcs.com/idea/custom-api-support it is very obnoxious that the WHMCS team does not allow one to create their own api functions. it is unfortunate that they do not listen to users. It is unfortunate that the vision of whmcs is not to allow the use of its software as a means of administration, but that we generate our own functions for our projects (in the case of my company, a laravel project). I wonder if the WHMCS team really listens to users. I wonder if they ever have ... I am very disappointed that whmcs does not allow the newly added files to appear in the api folder as shown in these images: as you can see from the images, we are unable to assign the role of the new file. instead I had to modify the table: tblapi_roles within my database directly to manually give the file permissions. WHMCS DOES NOT LISTEN TO ITS CUSTOMERS, WHMCS IS NOT INTERESTED IN THAT WE DO BETTER PROJECT, NOR THAT THE ECOSYSTEM IS IMPROVED! If an admin reads this topic, please understand that I am looking for WHMCS to be used more by developers. Currently we live very limited, the documentation and all the files written in / includes/api lack many features that we developers could include. We could provide more external functionalities. and we would have the ability to develop our own characteristics. this would open the doors much more for new customers to join in purchasing whmcs licenses. In addition to increasing sales of whmcs, it would also allow the possibility of writing our own characteristics, developing new modules that we would publish in the marketplace ecosystem, increasing the number of modules and characteristics that WHMCS currently has. I hope this topic has relevance to both whmcs and external developers. my point of view is that if they allow "Role Management" to detect the files included in /includes/api as roles. (similar to how it works when we add modules and plugins that automatically appear in the whmcs module manager). it would open new doors for developers. I am sure that this functionality could be done with a few lines and in a short time. as a developer I know that this would not take too much work. I hope they understand me. my english is not very good. 🙂
  2. while working with the api I realized that getproducts (https://developers.whmcs.com/api-reference/getproducts/) does not bring up the field to know if the product is active or not. I saw someone post a similar idea several years ago: so with a little engineer I made my own version of getproducts and uploaded it to /includes/api/ Request Parameters "GetProductsActive" Parameter Type Description Required action string “GetProductsActive” Required pid int string Obtain a specific product id configuration. Can be a list of ids comma separated gid int Retrieve products in a specific group id Optional Response Parameters Parameter Type Description result string The result of the operation: success or error totalresults int The total number of results available startnumber int The starting number for the returned results numreturned int The number of results returned products array An array of products matching the criteria passed I will leave the file called: getproductsactive.php however this may throw an api error, you have to give access in the table tblapi_roles in database, in the field: permissions add: ,"getproductsactive": 1 before closing }, This modification is due to WHMCS not showing the files added in includes/api as a role. (I do not know why). With this you can get the field: hidden which defines 0 if it is visible and 1 if it is hidden. (true or false also works) my code is a copy of includes/api/getproduct.php just add to show the hidden field (, "hidden" => $data["hidden"]), this would have been easier if WHMCS implemented it, it only took me 2 minutes to show this field. <?php if (!defined("WHMCS")) { exit("This file cannot be accessed directly"); } if (!function_exists("getCustomFields")) { require ROOTDIR . "/includes/customfieldfunctions.php"; } if (!function_exists("getCartConfigOptions")) { require ROOTDIR . "/includes/configoptionsfunctions.php"; } global $currency; $currency = getCurrency(); $pid = $whmcs->get_req_var("pid"); $gid = $whmcs->get_req_var("gid"); $module = $whmcs->get_req_var("module"); $where = array(); if ($pid) { if (is_numeric($pid)) { $where[] = "tblproducts.id=" . (int) $pid; } else { $pids = array(); foreach (explode(",", $pid) as $p) { $p = (int) trim($p); if ($p) { $pids[] = $p; } } if ($pids) { $where[] = "tblproducts.id IN (" . implode(",", $pids) . ")"; } } } if ($gid) { $where[] = "gid=" . (int) $gid; } if ($module && preg_match("/^[a-zA-Z0-9_\\.\\-]*\$/", $module)) { $where[] = "servertype='" . db_escape_string($module) . "'"; } $result = select_query("tblproducts", "tblproducts.*", implode(" AND ", $where), "tblproductgroups`.`order` ASC, `tblproductgroups`.`id` ASC, `tblproducts`.`order` ASC, `tblproducts`.`id", "ASC", "", "tblproductgroups ON tblproducts.gid = tblproductgroups.id"); $apiresults = array("result" => "success", "totalresults" => mysql_num_rows($result)); while ($data = mysql_fetch_array($result)) { $pid = $data["id"]; $productarray = array("pid" => $data["id"], "gid" => $data["gid"], "type" => $data["type"], "name" => $data["name"], "description" => $data["description"], "module" => $data["servertype"], "paytype" => $data["paytype"], "hidden" => $data["hidden"]); if ($language = $whmcs->get_req_var("language")) { $productarray["translated_name"] = WHMCS\Product\Product::getProductName($data["id"], $data["name"], $language); $productarray["translated_description"] = WHMCS\Product\Product::getProductDescription($data["id"], $data["description"], $language); } if ($data["stockcontrol"]) { $productarray["stockcontrol"] = "true"; $productarray["stocklevel"] = $data["qty"]; } $result2 = select_query("tblpricing", "tblcurrencies.code,tblcurrencies.prefix,tblcurrencies.suffix,tblpricing.msetupfee,tblpricing.qsetupfee,tblpricing.ssetupfee,tblpricing.asetupfee,tblpricing.bsetupfee,tblpricing.tsetupfee,tblpricing.monthly,tblpricing.quarterly,tblpricing.semiannually,tblpricing.annually,tblpricing.biennially,tblpricing.triennially", array("type" => "product", "relid" => $pid), "code", "ASC", "", "tblcurrencies ON tblcurrencies.id=tblpricing.currency"); while ($data = mysql_fetch_assoc($result2)) { $code = $data["code"]; unset($data["code"]); $productarray["pricing"][$code] = $data; } $customfieldsdata = array(); $customfields = getCustomFields("product", $pid, "", "", "on"); foreach ($customfields as $field) { $customfieldsdata[] = array("id" => $field["id"], "name" => $field["name"], "description" => $field["description"], "required" => $field["required"]); } $productarray["customfields"]["customfield"] = $customfieldsdata; $configoptiondata = array(); $configurableoptions = getCartConfigOptions($pid, array(), "", "", "", true); foreach ($configurableoptions as $option) { $options = array(); foreach ($option["options"] as $op) { $pricing = array(); $result4 = select_query("tblpricing", "code,msetupfee,qsetupfee,ssetupfee,asetupfee,bsetupfee,tsetupfee,monthly,quarterly,semiannually,annually,biennially,triennially", array("type" => "configoptions", "relid" => $op["id"]), "", "", "", "tblcurrencies ON tblcurrencies.id=tblpricing.currency"); while ($oppricing = mysql_fetch_assoc($result4)) { $currcode = $oppricing["code"]; unset($oppricing["code"]); $pricing[$currcode] = $oppricing; } $options["option"][] = array("id" => $op["id"], "name" => $op["name"], "rawName" => $op["rawName"], "recurring" => $op["recurring"], "required" => $op["required"], "pricing" => $pricing); } $configoptiondata[] = array("id" => $option["id"], "name" => $option["optionname"], "type" => $option["optiontype"], "options" => $options); } $productarray["configoptions"]["configoption"] = $configoptiondata; $apiresults["products"]["product"][] = $productarray; } $responsetype = "xml"; ?> Hope this helps others to show the field they need to show files and hidden products. getproductsactive.php
  3. Hello! I'm using Lang::trans within a php hook for EMailPreSend. I set 'credited' in each language override file: $_LANG['locale'] = "en_GB"; $_LANG['credited'] = "has been credited"; and $_LANG['locale'] = "ro_RO"; $_LANG['credited'] = ": tranzacția a fost creditată"; Then, in the hook: $merge_fields = []; $paymentMethodTitle = "Bank Transfer"; $newSubject = $paymentMethodTitle.' '.Lang::trans('credited'); $merge_fields['custom_subject'] = $newSubject; $vars = array_merge( $vars, $merge_fields ); return $vars; In the Email Template, the subject is {$custom_subject}, which shows $newSubject variable just fine. But I guess Lang::trans doesn't use the client's language. The email template (body) uses the client's language without issue, but ... how in the world do I get Lang::trans in EMailPreSend to use the client's language? I just want the client's language to be used when sending the client an email (call me silly!). Thanks for any clues!
  4. Hello, I'm working on an Addon Module to store a License Key for an addon. I can have it verify the get the license key from the table.. but what I'm trying to do is figure out how to put a check_license within this: class License extends Model { /** @var string $table The table in which the addon settings are stored. (mod_mylicensetable) */ protected $table = 'mod_squareLicensing'; //protected function results($results); private $vString = "16da9d4d6fc1e1ec25ce622d59d3d34e2b147bed894296693492985d85d27868"; } $Licensedata = License::where('id', '1')->first( As such, I can get my License data as expected, however, within the Addon Module itself -- to ideally get everything, the check needs to be inside the Class. I'd like to do something like function verify_license { //--get information from original license call and do our actions for invalid or active } Can someone give me guidance? I'm new working with Laravel. I know how to do a license call with the default check_sample.php and have adapted that as needed, and have built upon it.. but working with the classes are new to me. Any help and pointers would be greatly appreciated 🙂
  5. Hello WHMCS Community! I come here to try to clarify a doubt. I developing a custom provisioning module and I want to use the Eloquent Model from Laravel to manipulate the database over the Query Builder which is mentioned in the documentation. Are there any restrictions on use? Regards!
  6. I'm trying to learn the new approach from v6 that uses Laravel for queries but this seems rather more messy (at least for me than the old way which is going to be deprecated. For example I made this query: This works and it gets the users logged in domains but the problem is that all results are into the single $dom variable as ouput. I tried setting them in $row like the a standard PHP query to MySQL but it does not work. Neither arrays worked for me. The problem with this approach is that I cannot use domains separately in the code. Is there an easier way to pull domains out of a users account?
×
×
  • 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