Jump to content

Jono

Blesta Developers
  • Posts

    376
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by Jono

  1. 8 hours ago, qba82 said:

    Yes I know, I checked without "| escape}" tag, in this case password is cut just before < > or &, but if I use "| escape}" tag, then it is not cut but it is showing &amp; instead & and &lt; instead <

    Sorry, I had a typo in my last answer.  I meant to say that you don't want "| escape}" in the text version.  Is that the case?

  2. Yea, sorry about the learning curve there.  As documented, all config options should be submitted.  It is intended behavior that all others will be deleted.

    The lack of invoice is also intended behavior.  A good place to reference is app/controllers/admin_clients.php.  Particularly lines 5590-5689

  3. Do you really mean to use a ServiceChange?  Would Services::edit do what you want instead?  Service changes are processed automatically via cron after their invoice is paid. An edit would happen immediately.  use_module tells Blesta whether to invoke the module when making the edit, so yes it will work with or without it.

    That being said, I'm not sure of your question at this point.  Are you asking what parameters should be submitted to getPresenter?

  4. I mentioned this in discord, but it is worth having it here as well.  Order form settings control whether to require manual approval on orders.  If manual approval is not required by the order form and  "Automatically Provision Paid Pending Services" is check at /admin/settings/company/billing/invoices/ then it should provision automatically.

  5. Yup, so two things.  First, those requests happen when you save the module row details, just to make sure the credentials are valid.  Second, it unfortunately seems the regular availability checks are not being logged.  To add logging to that method you can add the following line at line 2280 of app/components/module/namesilo.php:

            $this->processResponse($api, $result);

     

  6. Hi there, sorry to hear your experience has been difficult. Thanks for your feed back on the other post, we really appreciate it.

    That being said, I don't think there are any module currently doing this.  Here are two ways that should work to go about this.

    1. Load the Record component ( Loader::loadComponents($this, ['Record']); ) and manually change the database.  $this->Record->where('module_row_meta.module_row_id', '=', $module_row_id)->update('module_row_meta', ['api_key' => 'new_api_key']);

    2. Use the ModuleManager model (Loader::loadModels($this, ['ModuleManager'])).  The method you would use is ::editRow().  $this->ModuleManager->editRow($module_row_id, ['api_key' => 'new_api_key']);  One thing to keep in mind is that this method replaces all the meta data for that row so you might want to load the current meta data, update it, then submit it.

    $meta_data = $this->ModuleManager->getRowMeta($module_row_id);
    
    $vars = [];
    foreach ($meta_data as $meta) {
    	$vars[$meta->key] = ($meta->key == 'api_key' ? 'new_api_key' : $meta->value);
    }
    
    $this->ModuleManager->editRow($module_row_id, $vars);

    Hopefully that is helpful.

    Regards,

    Jonathan

×
×
  • Create New...