Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/20/2015 in Posts

  1. You would need to update the staff member's configured setting for receiving order emails in order to disable it. This is only possible when logged in as that particular staff member and going to the Orders widget. Alternatively, you could update the database to remove them from the list in the interim: under the `order_staff_settings` table, you can find records for that staff member by his staff ID, then update the `value` column to "never" for the `key`s "email_notice" and "mobile_notice". This issue will be resolved in CORE-1905.
    1 point
  2. A setting for something like this seems overkill and still wouldn't resolve cases where you might want to have it appear at the top in one ticket reply but at the bottom in another. If you want it to appear in the middle somewhere, manually moving it would still be required. Maybe another work-around could be to automatically add your signature to the reply rather than setting it in there by default. In any case, if you'd like to modify the source to have it appear at the top, update /plugins/support_manager/views/default/admin_tickets_reply.pdt, Change $('#reply_details').val($('#reply_details').val() + data); to $('#reply_details').val(data + $('#reply_details').val()); and change $('#note_details').val($('#note_details').val() + data); to $('#note_details').val(data + $('#note_details').val());
    1 point
  3. Tyson

    Proxmox Module Nodos

    Sorry, I don't have Skype. The problem could be that the node has an ID of 0 and is not included, but I'm not certain. You can try to add another node in Proxmox and see if it appears in Blesta. You might double-check your Proxmox settings in Blesta to ensure they are accurate--[settings] -> [Modules] -> (click "Manage" next to Proxmox). The fact you don't have a module log regarding Proxmox is concerning, since a remote request will be made via the API to retrieve the nodes, and details on that request will be logged. The nodes should be automatically populated after you choose a Type from the Module Options section of the package. JavaScript will need to be enabled in your browser.
    1 point
  4. We spoke about this before and the Support Manager Pro does it at the top now. I personally moved all our responses to articles in the KB and just link to it.
    1 point
  5. I believe the signature is set in the ticket reply by default. A predefined response would be appended to the ticket reply making it appear at the end. I think this behavior is normal for most cases, but may be inconvenient if you are using a signature, and would require you to move the text to a more appropriate place. When you click to add a predefined response, it can be added either at the beginning or end of the reply text, and we opted for the end. Without more information (such as adding a second step), we couldn't choose a particular place in the reply text to insert the predefined response.
    1 point
  6. The AJAX order form types use the fewest steps. There isn't going to be a way to take an order for a service, configure it, add any optional add-ons, their configuration, set a coupon (if any), choose a payment method, login, and submit the payment from a single step.
    1 point
  7. Here's a very simple script to run the Blesta cron tasks as a constantly running background service and to do away with cron altogether. This is useful if you need to run the tasks more frequently than 5 minutes, or, get locking and overlap with cron. I have been running this now for about 24 hours and no problems so far. This script can be improved on greatly, but it does have a simple feature to ensure that you don't have more than one service running at the same time. With a bit more work you could have a very useful script that behaves like a system service with cli args, better error checking and signal handling for graceful shutdowns etc. (I have added basic signal handling but I haven't tested it. It requires the posix extension which I do not have). You can either start/stop the service from the command line or within a script, or use a process monitor like supervisord or daemontools to handle it (they have better logging and protect you from starting more than one). Two files are used; service.php and config.json. Start the service: redirect output to a log file and place the process in the background (append & to the end of the command). Choose your own php path and log file path. #run as current user /usr/local/bin/php service.php > BlestaService.log & Check the service is running: you should see the service name (set in config) and the pid of the process. ps -aux | grep BlestaService Stop the service:If usePIDFile in the config is set to true, the service will stop if the pid file is deleted. This provides a very simple way of gracefully stopping the service (the while loop will stop if the file cannot be found). Otherwise, you can use kill to stop it immediately, but ideally try to avoid this. DB transactions may be in use, but there could be issues when exiting during imap connections etc. Alternatively and more cleanly, send it signals if you have the posix extension. #kill kill 47854 #send quit signal, better kill -s QUIT 47854 service.php <?php require('/usr/local/www/blesta/blesta/lib/init.php'); set_time_limit(0); class BlestaService { private $config; private $pidFile; private $running = true; public function run() { //these are required steps so dont catch errors thrown from this function $this->prep(); while($this->keepRunning()) { try { $start = time(); //do the cron work Dispatcher::dispatch('/cron/', true); //clean up. might not be absolutely required gc_collect_cycles(); sleep(max(0, $this->config->runInterval - (time() - $start))); } catch(Exception $e) { $this->logWrite($e); sleep(60); } } $this->cleanup(); } private function prep() { gc_enable(); $this->config = json_decode(file_get_contents('config.json')); if(function_exists('cli_set_process_title') && function_exists('cli_get_process_title')) { $currentTitle = cli_get_process_title(); cli_set_process_title($this->config->serviceName); } if($this->config->usePIDFile) { $this->pidFile = $this->config->pidFileDir. DIRECTORY_SEPARATOR .$this->config->serviceName.'.pid'; $this->exitIfPIDFileExists(); $this->setPIDFile(); } if(function_exists('pcntl_signal')) { //signal handling declare(ticks = 1); pcntl_signal(SIGQUIT, 'sigHandler'); pcntl_signal(SIGTERM, 'sigHandler'); pcntl_signal(SIGKILL, 'sigHandler'); pcntl_signal(SIGABRT, 'sigHandler'); pcntl_signal(SIGHUP, 'sigHandler'); pcntl_signal(SIGINT, 'sigHandler'); } } private function exitIfPIDFileExists() { if(file_exists($this->pidFile) === true) { $pid = file_get_contents($this->pidFile); $this->logWrite("Unable to start. Is there a service already running with pid $pid? Otherwise remove the pid file located at $this->pidFile before starting"); exit(1); } } private function setPIDFile() { file_put_contents($this->pidFile, getmypid()); chown($this->pidFile, $this->config->pidFileOwner); chmod($this->pidFile, 0600); } private function removePIDFile() { if($this->config->usePIDFile && file_exists($this->pidFile) === true) { unlink($this->pidFile); } } private function keepRunning() { if($this->config->usePIDFile) { //removing pid file will shutdown the service $this->running = file_exists($this->pidFile); } //alternatively use pcntl_signal to stop the service cleanly by setting $this->running = false in the SIGTERM, SIGKILL, SIGINT handler return $this->running; } private function logWrite($string) { //echo to console as output will be redirected to a log file echo "$string\n"; } public function sigHandler($signo) { switch($signo) { case SIGQUIT: case SIGTERM: case SIGHUP: case SIGABRT: $this->keepRunning = false; break; case SIGKILL: //probably cant catch this one but try anyway $this->cleanup(); break; case SIGINT: break; default: } } private function cleanup() { $this->logWrite('Exiting gracefully'); $this->removePIDFile(); exit; } /*public function __destruct() { //removed this as it will be called when exiting via exitIfPIDFileExists() when a service exists already, causing that services pid file to be deleted (and eventually stop running) $this->cleanup(); }*/ } //run $service = new BlestaService(); $service->run(); ?> config.json { "serviceName":"BlestaService", "runInterval":60, "usePIDFile":true, "pidFileDir":"/tmp", "pidFileOwner":"www" }
    1 point
  8. Oops, I forgot to mention; to have cron tasks running sooner than 5 minutes you also need to do what PauloV suggested here http://www.blesta.com/forums/index.php?/topic/4942-1-one-minute-cron-jobs/#entry39451
    1 point
  9. Michael

    Downloads / Uploads

    You need a uploads folder, if you haven't got one. To set this up you need /home/username/uploads/ if you have the uploads folder outside the public_html folder for security, else you need it as /home/username/public_html/uploads or /home/username/public_html/billing/uploads/
    1 point
×
×
  • Create New...