Jump to content

get Configurable Options for service_id


Blesta Addons

Recommended Posts

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) .

 

 

Link to comment
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.

Link to comment
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 .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...