AllToolKits.com Posted June 6, 2015 Report Posted June 6, 2015 Is there any module function that will be called when adding a service to a customer?addService function will be called when we create a service, right?Any way to call some function when we add an existing service to a customer? Quote
serge Posted June 6, 2015 Report Posted June 6, 2015 what I ever done (for internal use only and not to sell module), was to create mysql triggers. Quote
AllToolKits.com Posted June 6, 2015 Author Report Posted June 6, 2015 I would like to use some standard method. If nothing work, will use mysql triggers. serge 1 Quote
serge Posted June 8, 2015 Report Posted June 8, 2015 maybe a custom cron, Blesta do have cron functions Quote
AllToolKits.com Posted June 8, 2015 Author Report Posted June 8, 2015 Can cron trigger when we add a service to a customer? Quote
serge Posted June 8, 2015 Report Posted June 8, 2015 http://docs.blesta.com/display/dev/Plugin+Cron+Tasks I suppose, if you: - your custom cron task is aded to the blesta cron system - your module create a key at service_fields table, like "my-custom-task-setup", being empty value at the start, - your cron function check any active service having above value empty and will run all custom task and update above value to "1" when it's done. note the "1" value could also be a timestamps or anything you want Quote
Tyson Posted June 8, 2015 Report Posted June 8, 2015 Is there any module function that will be called when adding a service to a customer? addService function will be called when we create a service, right? Any way to call some function when we add an existing service to a customer? If the service is added with "Use Module" checked, the module's ::addService method is called. If the service already exists for the client, and you are updating it, then ::editService is called. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.