Jump to content

Michael

Moderators
  • Posts

    9,522
  • Joined

  • Last visited

  • Days Won

    186

Everything posted by Michael

  1. I'd swap hosts they are telling you to use PHP 5.3.... Are they living in the dark ages since PHP 7.0 is getting the hit soon and PHP 5.4 is End of Life and 5.5 is closing nearer to EOL too.
  2. Do you have CloudLinux options like PHP Selector, if you do check it and see if mail parse is enabled.
  3. I was just wondering if it's possible to allow IMAP for sending emails with the system, because SMTP can be a bucket and a half but IMAP on the support manager works like a charm? So you can set the settings you have on the support manager as the system mail settings?
  4. perfect thanks mate
  5. Tried both mate: Code: <?php $this->Javascript->setInline(' $(document).ready(function() { fetchTicketsOpen("open"); }); function fetchTicketsOpen(status) { $(this).blestaRequest("GET", "' . $this->Html->safe($this->base_uri . "plugin/client_data/client_main/count_tickets/") . '" + status, null, function(data) { if (data) $(".count_ticket_open").html(data); }, null, {dataType:"json"}); } '); $this->Javascript->setInline(' $(document).ready(function() { fetchTicketsClosed("closed"); }); function fetchTicketsClosed(status) { $(this).blestaRequest("GET", "' . $this->Html->safe($this->base_uri . "plugin/client_data/client_main/count_tickets/") . '" + status, null, function(data) { if (data) $(".count_ticket_closed").html(data); }, null, {dataType:"json"}); } '); ?> Html: <span class="count_ticket_open">0</span>/<span class="count_ticket_closed">0</span> Both show 0/0 should be 0/11
  6. Thank you mate you are a legend Sugar mate, I can't get a value and visiting the pages => 404.
  7. mark them as inactive or fraud depending on which is better for you press the green bar.
  8. that's why you click the invoice row and un-apply the invoice that's the only way you can edit an invoice.
  9. Nope where did the /home/username/ come from?
  10. if you want to do that, just edit the invoice and make it cover the cost which has been paid e.g: Non payment - invoice repair | 1 | -rest and save after removing the transaction then the cron will apply the rest and the invoice is then closed. Job done.
  11. But you can't half pay for something you either pay it off fully or you don't pay for it. That's like going to a shop, saying I want to part pay for this shopping, but never turning up to pay the second, the company if they did that eat the rest or if they know where you live send a debtor out to get the rest.
  12. nope it's back as account credit.
  13. well the cron does pay the invoice again but you can't void an invoice if it has a transaction.
  14. the bottom code should be: /usr/local/bin/php /home/username/public_html/blesta/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/1/
  15. Click edit and then void. If it's got a translation click the row of the invoice and click unapply remove the transaction from the invoice and then click void.
  16. That would be awesome mate so you can expand by seeing how you did what for each one and then hopefully more can expand as needed?
  17. Lol mate I still can't even edit that to grab services and there's not much to edit lol. Need more time I think
  18. Magic haha Just to let people know donated to you mate for your help and time
  19. Next on the /app/views/client/bootstrap/structure.pdt add this: <div id="count_ticket">0</div> <?php $this->Javascript->setInline(' $(document).ready(function() { fetchCountTickets(); }); function fetchCountTickets() { $(this).blestaRequest("GET", "' . $this->Html->safe($this->base_uri . "plugin/count_tickets/client_main") . '", null, function(data) { if (data) $("#count_ticket").html(data); }, null, {dataType:"json"}); } '); ?>
  20. Next make the files: /plugins/count_tickets/count_tickets_controller.php <?php /** * News plugin handler */ class CountTicketsController extends AppController { public function preAction() { $this->structure->setDefaultView(APPDIR); parent::preAction(); // Override default view directory $this->view->view = "default"; $this->orig_structure_view = $this->structure->view; $this->structure->view = "default"; } } /plugins/count_tickets/controllers/client_main.php <?php /** */ class CLientMain extends CountTicketsController { /** * Pre-action save and upload */ public function preAction() { parent::preAction(); $this->uses(["SupportManager.SupportManagerTickets"]); $this->client_id = $this->Session->read("blesta_client_id"); } /** * Portal Newe index */ public function index() { if ($this->isAjax()) { $response = $this->SupportManagerTickets->getStatusCount("open", null, $this->client_id); // JSON encode the AJAX response $this->outputAsJson($response); return false; } return false; } } /plugins/count_tickets/models/client_tickets_model.php <?php class CountTicketsModel extends AppModel { /** * Constructor */ public function __construct() { parent::__construct(); // You Can Load Language here } /** * Retrieves ticket count * * @return string */ public function getCountTickets( $client_ticket_id, $status_opened ) { $ticket_numbers = $this->Record->select()-> from("support_tickets")-> where('client_id', "=", $client_ticket_id)-> where('status', "=", $status_opened)-> fetch(); return count($ticket_numbers); } } /plugins/count_tickets/models/count_tickets_model.php <?php class CountTicketsModel extends AppModel { /** * Constructor */ public function __construct() { parent::__construct(); // You Can Load Language here } /** * Retrieves ticket count * * @return string */ public function getCountTickets( $client_ticket_id, $status_opened ) { $ticket_numbers = $this->Record->select()-> from("support_tickets")-> where('client_id', "=", $client_ticket_id)-> where('status', "=", $status_opened)-> fetch(); return count($ticket_numbers); } }
  21. @Naja7Host helped show me how to get this working and this is what he did to achieve it: Folder structure: - plugins --- count_tickets --------- count_tickets_controller.php ------- controllers ----------- client_main.php ------- models ----------- client_tickets_model.php ----------- count_tickets_model.php If you just want to download the files and not do it manually you can grab them from: https://licensecart.com/public/count_tickets.zip
  22. Thanks mate let's make a thread and upload it free to download now we've got a working one
  23. Still the same mate: https://licensecart.com/plugin/count_tickets/main Maybe I'm being stupid too lol.
×
×
  • Create New...