Jump to content

Service Module Row Not Updated When Changing Package


Rodrigo

Recommended Posts

Hi,

 

I've been using 2 packages from the same module to offer services in different locations.

 

Each module row has the API URL that blesta should use to manage the service.

 

When I change the package from an existing service using "Upgrade/Downgrade", the service keeps using the old API URL instead of changing to the new module row from the new selected package.

 

I'm currently using Blesta 3.5.1 and have this strange bug preventing me from implementing auto-cancel. Can this be fixed from the Module code or is it a Blesta bug?

 

Thanks,

Rodrigo

Link to comment
Share on other sites

The module row is not changed for the service because this could cause other problems in many cases.

 

What module are you referring to?

 

If your module has two module rows, and you have both module rows assigned to a single module group, then you should have an option under the Service Information section when you edit the service to select which module row to set on the service. The Reassign Pricing plugin will also update the module row when making a manual change to service pricing.

Link to comment
Share on other sites

Hi,

 

I've changed the following change to fix the issue:

Before: 
$row = $this->getModuleRow();
After:
$row = $this->getModuleRow($package->module_row);

 

As package gets changed when using upgrade I can get the current API URL for the location of the service. I haven't implemented automatic migration between locations yet, but I think in that case would be recommended to assign a service field to store the location right?

 

Thanks!

Rodrigo

Link to comment
Share on other sites

If the API URL is derived from the module row, then you'll need both the old module row and new module row to perform the migration internally in your module. You could store it as a service field if you'd like, or determine it from the module rows instead.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...