Blesta Addons Posted September 11, 2017 Report Posted September 11, 2017 is there any built_in function to fetch the available Configurable Options for the service X ? not the purshased one, but all the vaialable Configurable Options to purshase . Quote
Jono Posted September 11, 2017 Report Posted September 11, 2017 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. Quote
Blesta Addons Posted September 11, 2017 Author Report Posted September 11, 2017 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 , 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) . Jono 1 Quote
Jono Posted September 11, 2017 Report Posted September 11, 2017 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 . 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. Quote
Blesta Addons Posted September 11, 2017 Author Report Posted September 11, 2017 22 minutes ago, Jono said: Glad you found what you needed . 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 . 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.