Jump to content
Sign in to follow this  
Blesta Addons

get Configurable Options for service_id

Recommended Posts

Maybe Services::getOptionsAvailable()  is similar to what you are looking for.  services.php starting at line 1535.  It is a private function, but it is easy enough to replicate the process it does.

Share this post


Link to post
Share on other sites
2 hours ago, Jono said:

Maybe Services::getOptionsAvailable()  is similar to what you are looking for.  services.php starting at line 1535.  It is a private function, but it is easy enough to replicate the process it does.

Thanks @Jono, we don't want to make and maintain our code, we want something that are maintainer by blesta itself :blesta: ,

i have used $this->Services->getOptions($service->id) it was what i want . another function that do the same is $this->PackageOptions->getByPackageId($service->package->id) .

 

 

Share this post


Link to post
Share on other sites
17 minutes ago, Blesta Addons said:

i have used $this->Services->getOptions($service->id) it was what i want . another function that do the same is $this->PackageOptions->getByPackageId($service->package->id) .

Glad you found what you needed :blesta:.  Though I believe Services::getOptions() only gets options currents assigned to the service so be careful with that one.  Also PackageOptions::getByPackageId() does not respect settings for client addability or editability if that matters for your purposes.

Share this post


Link to post
Share on other sites
22 minutes ago, Jono said:

Glad you found what you needed :blesta:.  Though I believe Services->getOptions() only gets options currents assigned to the service so be careful with that one.

You are right, we have just take care about this, we want the same result but for all configurable options, like how blesta render in the configurable options in the client area .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×