Leaderboard
Popular Content
Showing content with the highest reputation on 04/07/2017 in all areas
-
Modifying the invoice creation form would be part of the core. However, you could create a plugin that adds an action to the Actions section on a client profile page, when clicked, would load the plugin with your own invoice creation form. You'd have full control over it. The core form would still exist, but you could use the one you created instead. This is a good place to start - https://docs.blesta.com/display/dev/Creating+a+Plugin2 points
-
Event Handlers - Client & Contact CRUD
activa and one other reacted to Blesta Addons for a topic
i remember i have sent the same events with a lot of events already made to @Paul a age ago, but it seem they have their own priority and roadmap to add events . i have already integrated a gateways/contacts/clients_groups/companies/coupons/cronjob/calenders/staff/transactions if any one need the vent files i canshare theme, they need only to the event in the model i haven't time to search the old files, but it very easy to add them, thanks Besta for the open source files Note, i don't have enough space to add more files/images !! can anyone add 0 in the end of my upload files limit2 points -
Yup, I figured that out pretty quickly. I ended up adding that functionality to Blesta itself. Here is the Pull Request. Hopefully the guys can accept it. In the mean time, use git apply to merge my changes. From: Adam Brenner <adam@netops.me> Date: Thu, 6 Apr 2017 22:45:22 -0700 Subject: [PATCH 1/1] CUD Callbacks on Clients and Contacts This is a new feature to Blesta that will allow anyone to get callbacks when any CUD operation occurs on a client or contact. Signed-off-by: Adam Brenner <adam@netops.me> --- app/models/clients.php | 6 +++ app/models/contacts.php | 9 +++++ .../events/default/events_clients_callback.php | 22 +++++++++++ .../events/default/events_contacts_callback.php | 46 ++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 components/events/default/events_contacts_callback.php diff --git a/app/models/clients.php b/app/models/clients.php index c6fdef0..1bd4468 100644 --- a/app/models/clients.php +++ b/app/models/clients.php @@ -302,6 +302,9 @@ class Clients extends AppModel $fields = ['user_id', 'client_group_id', 'status']; $this->Record->where('id', '=', $client_id)->update('clients', $vars, $fields); } + + $this->Events->register('Clients.edit', ['EventsClientsCallback', 'edit']); + $this->Events->trigger(new EventObject('Clients.edit', ['client' => $this->get($client_id)])); } /** @@ -337,6 +340,9 @@ class Clients extends AppModel $this->Users->delete($client->user_id); } } + + $this->Events->register('Clients.delete', ['EventsClientsCallback', 'delete']); + $this->Events->trigger(new EventObject('Clients.delete', ['client' => $client])); } /** diff --git a/app/models/contacts.php b/app/models/contacts.php index 8776585..3e39efc 100644 --- a/app/models/contacts.php +++ b/app/models/contacts.php @@ -93,6 +93,9 @@ class Contacts extends AppModel $this->setPermissions($contact_id, $vars['permissions']); } + $this->Events->register('Contacts.create', ['EventsContactsCallback', 'create']); + $this->Events->trigger(new EventObject('Contacts.create', ['contact' => $this->get($contact_id)])); + return $contact_id; } } @@ -227,6 +230,9 @@ class Contacts extends AppModel $this->Logs->addContact(['contact_id'=>$contact_id, 'fields'=>$fields]); } + $this->Events->register('Contacts.edit', ['EventsContactsCallback', 'edit']); + $this->Events->trigger(new EventObject('Contacts.edit', ['contact' => $new_contact])); + return $new_contact; } } @@ -270,6 +276,9 @@ class Contacts extends AppModel $this->Users->delete($contact->user_id); } } + + $this->Events->register('Contacts.delete', ['EventsContactsCallback', 'delete']); + $this->Events->trigger(new EventObject('Contacts.delete', ['contact' => $contact])); } /** diff --git a/components/events/default/events_clients_callback.php b/components/events/default/events_clients_callback.php index b9fc40c..6c81144 100644 --- a/components/events/default/events_clients_callback.php +++ b/components/events/default/events_clients_callback.php @@ -21,4 +21,26 @@ class EventsClientsCallback extends EventCallback { return parent::triggerPluginEvent($event); } + + /** + * Handle Clients.edit events + * + * @param EventObject $event An event object for Clients.edit events + * @return EventObject The processed event object + */ + public static function edit(EventObject $event) + { + return parent::triggerPluginEvent($event); + } + + /** + * Handle Clients.delete events + * + * @param EventObject $event An event object for Clients.delete events + * @return EventObject The processed event object + */ + public static function delete(EventObject $event) + { + return parent::triggerPluginEvent($event); + } } diff --git a/components/events/default/events_contacts_callback.php b/components/events/default/events_contacts_callback.php new file mode 100644 index 0000000..42b55c9 --- /dev/null +++ b/components/events/default/events_contacts_callback.php @@ -0,0 +1,46 @@ +<?php +/** + * Handle all default Contacts events callbacks + * + * @package blesta + * @subpackage blesta.components.events.default + * @copyright Copyright (c) 2010, Phillips Data, Inc. + * @license http://www.blesta.com/license/ The Blesta License Agreement + * @link http://www.blesta.com/ Blesta + */ +class EventsContactsCallback extends EventCallback +{ + + /** + * Handle Contacts.create events + * + * @param EventObject $event An event object for Contacts.create events + * @return EventObject The processed event object + */ + public static function create(EventObject $event) + { + return parent::triggerPluginEvent($event); + } + + /** + * Handle Contacts.edit events + * + * @param EventObject $event An event object for Contacts.edit events + * @return EventObject The processed event object + */ + public static function edit(EventObject $event) + { + return parent::triggerPluginEvent($event); + } + + /** + * Handle Contacts.delete events + * + * @param EventObject $event An event object for Contacts.delete events + * @return EventObject The processed event object + */ + public static function delete(EventObject $event) + { + return parent::triggerPluginEvent($event); + } +} -- 2.12.12 points
-
Configurable Options Multi-currency
ariq01 reacted to Blesta Addons for a question
we have unchecked "Use Package Pricing for New Services Only " . when the client switch to a currency that is not setup in the package prices, blesta make the exchange rate and show the price with the new currency . at here all thing is good . now hen the package has Configurable Options , blesta only show it if the selected currency are already set in the Configurable Options . is this a limitation of Blesta or we have something wrong in our system ? if we have 8 active currency , we need to enter 8 times the prices for each currency for every term, and that is a lot for manual work , also if the exchange rate change we need to update them all .1 point -
We made the decision to use config option pricing when we added config options and not do a currency conversion because of the complexity. That's not to say that can't change in the future, but it was intentional.1 point
-
@Blesta Addons lists an OVH Server module as "Coming Soon". Have you tried reaching out to Leaseweb or Antagus about a Blesta module? If you have accounts there and have a good contact at those companies, feel free to loop us in on a conversation.1 point
-
A new Virtualmin module (alpha) is available. To install, download the attached virtualmin.zip, unzip and upload the "virtualmin" directory to ~/components/modules/ and visit Settings > Company > Modules to install and configure. Any comments or suggestions, please post in this thread! virtualmin.zip1 point
-
We will be putting it on our Github (github.com/blesta) next week, we've made some changes to the module. It'll stay on Github, and if we can get some feedback on the module and consider it stable, we'll likely start pulling it in in our builds where it'll appear in the subsequent minor release.1 point
-
It does appear to be removed from the defaults. The good news is the code (components/session/session.php) still checks to see a Configuration value of 'Session.ttl' exists. Just add that to your config (config/blesta.php) and you should be good to go. Configure::set('Session.ttl', 9000); -Adam1 point
-
Just post a patch file. Stop uploading zips, they are a pain to work with and make it hard to merge.1 point
-
Depends on what files? Naja7Host did the CSS/JS/PHP plugin which allows editing but keeping them as they are:1 point
-
Full Service Invoicing
Blesta Addons reacted to activa for a question
I suppose the others working with a credit system like piont . In the end of the mounth they comvert the credit to a invoice to be paid . For me invoice every hour i never see it with any provider ... but is not q probleme to have every hour a invoice but is not pro .1 point -
Ghostbill - Order Forms Bundle.
Paul reacted to Web Hosting UK for a topic
Great work! Added these to my website at https://billing.bradfordwebdesignandhosting.com Also hello all (my first post)1 point -
SFTP and FTPS are two different things. Is your server configured to use the correct one? SFTP uses SSH over port 22 FTPS uses FTP with TLS/SSL over port 21 -Adam1 point
-
Braintree vs Authorize.Net, API and user experience
furioussnail reacted to Paul for a topic
I'm not sure about availability in Romania, you'll have to inquire. Usually it has to do with the merchant provider, and authorize.net supports many different merchant providers. The main difference is that Braintree doesn't support tokenization. Authorize.net supports both tokenization and local storage of CC #'s.1 point