Jump to content

AllToolKits.com

Members
  • Posts

    139
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by AllToolKits.com

  1. Hi, I have to call a table i created from the function public function getAdminServiceInfo I tried below code $this->components(array("Record")); $cron_log = $this->Record->select()-> from("my_table")-> fetchall(); Seems like that is not working. This table can't be part of the module, so i need a way to query the table. Let me know how i can do it? i recall someone told to use plugin for calling custom tables, but i can't use plugin as i need to call the table data from module function getAdminServiceInfo. Please let me know how i can do it.
  2. You mean, for you it's dispaying "hi" ?
  3. Hi, I am trying to display some data when i click a service. At the moment i got 'This service has no details.' message. We need to modify public function getAdminServiceInfo($service, $package) { return null; } to display any data i want, right? I just tried public function getAdminServiceInfo($service, $package) { return "hi"; } But hi is not displayed. I should re install the module? if so is there anyway to take backup of module and then reinstall it?
  4. Hi, I am developing a blesta plugin. I have country drop down, on each country select state drop down should load corresponding states. Jquery Code: $( "#country" ).change(function() { var value = $( "#country" ).val(); $.post( url + "plugin/name/admin_did/get_states", { country_id: value }) .done(function( data ) { alert( "Data Loaded: " + data ); }); }); Controller public function get_states() { $c_id = $this->post['country_id']; $states = $this->Country->getList($c_id); echo json_encode($states); exit; } But got error Data Loaded: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" dir="ltr"> <head> <title>Blesta</title> <link rel="stylesheet" type="text/css" href="/app/views/errors/css/styles.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div class="program_error"> <h3>Oh noes!</h3> <div class="contents"> <p>Files does not exist: C:\pathofplugin\views\admin\default\message.pdt on line <strong>120</strong> in <strong> What is wrong with this ajax call approch?
  5. Please see the attached shot of a page of my plugin, i would like to add a bread crump . How to do it with the code? At the moment there is only a star present. My code is below <?php echo $this->Html->ifSet($message); $this->Widget->clear(); $this->Widget->setStyleSheet($this->view_dir . "css/styles.css"); $this->Widget->setTabs($tabs); $this->Widget->create("Create DID", true); $dirname = $this->base_uri."../plugins/"; ?> <div class="pad"> <div class="inner"> <section class="common_box" id="navigations_staff"> <div class="common_box_inner"> <table class="table navstaff">
  6. Hi, I got that error because of submitting a form without csrf token it. I fixed it by adding public function preAction() { if($this->action == "updatebalance"){ Configure::set("Blesta.verify_csrf_token", false); } parent::preAction(); } I wish to use csrf in the form, how i can add that to the form ?
  7. Developing a plugin, in that i have a form with below code <form action="<?php echo $this->Html->safe($this->base_uri . "plugin/pname/client_pnaname/updatebalance") ?>" method="post"/> Amount: <input type="text" name="amount" /> <input type="submit" class="btn btn-default" name="update" value="Update" /> </form> But i post, i get an error Oh noes! Files does not exist: C:\inetpub\wwwroot\plugins\pname\views\client\bootstrap\message.pdt on line 120 in C:\inetpub\wwwroot\lib\view.php I do have a a file controller folder with class ClientPname extendsPnameController { and a function in it with name updatebalance It works if the method is get, but getting error for post only. any idea why it's so?
  8. for example: if we set a plan with the monthly period, let's say from 1-st of each month. now is 31 August, so tomorrow the Invoice will be generated for the month of september? From 01 September till 01 October?And will charge not for August, will charge for this Invoice for the full month of September?
  9. From cron we are generating invoices, when user will pay for it? is it prepaid or post paid?
  10. Is blesta using prepaid or postpaid for invoice payment?
  11. I can load wrapper class using oader::loadModels ?
  12. Hi, I would like to create a PDF report from a blesta plugin. Seems like i can use http://source-docs.blesta.com/class-TCPDF.html, for the pdf generation. tried to load uisng Loader::loadModels($this, array("TCPDF")); from plugin, but it's shows error. Is there any code snippet to use TCPDF class? Will be helpful if i get a code on how to generate pdf from plug-in using TCPDF.
  13. Hi, I am developing a blesta plugin that display a set of tabular data with pagination. I would like to export selected rows to a PDF and CSV file, is there any ready made blesta class or code for that? Code already developed will help me a lot. Thanks in adavnce.
  14. Yeah, How i can understand that the invoice is generated from api or cron or web?
  15. That will be called even if the invoice is created from web interface. We can use Invoices.add, just ned a way to check weather the it's called after creating the invoice via cron or not.
  16. Hi, Using the below link, the cron is runing at a regular interval. http://mysampledomain.com/index.php/cron/?cron_key=txg6s9c0 It will create invoice for a domain. I would like to call a function in a plugin when the invoice is generating from the cron. Is there any Event for that? That means how the plugin will know when ever a invoice is created from cron?
  17. How i can get the clientid from plugin, i just hard coded the client id as 1501, that i picked from admin side manually. Do you have any code snippet to get client_id?
  18. Thanks for that, i got below error Array ( [client_id] => Array ( [exists] => Invalid client ID. ) [lines[0][service_id]] => Array ( [exists] => Invalid service ID. ) )
  19. I tried below code, but it's not working. any idea why it's so? Loader::loadModels($this, array("Invoices")); $params = $event->getParams(); $invoice_id = $params['invoice_id']; $vars = array( "client_id" => "1501", "lines" => array( array( "description" => "test item", "qty" => "1", "amount" => "10" ) ) ); $this->Invoices->edit($invoice_id, $vars); The item with cost 10 is not added to that invoice, any idea how we can add the row?
  20. Can you get me a link to that plugin? If possible some code snippet too will help a lot.
  21. Thanks, this info helped me to create link. How i can display content without affecting the header and footer? When i click the link i just want to display Say "Hello World" in the content area, where the top header and footer, also left side should not be changed . Just the content area need some content change , how we can achieve that ?
  22. See the attached image, i would like to add two or more links to the right side of Documents link in the top . How we can do that without modifying blesta code. That is how we can do using module or plugin?
  23. We can do that uisng module or plugin, that's without touching the blesta code?
×
×
  • Create New...