So i'm currently creating a module similar to the DigitalOcea module but for a different service, and one of the things I'd like to do is streamline alot of the product creation via code. Currently, thanks to PackageFields, we can set up custom fields for the main package. But I can't figure out how to do this for "Packages=>Options".
Right now, I have to by hand, click Create Group, call it Operating Systems, then "Create Option", choose Dropdown as type, and then for each entry list the label and the API's ID for that particular OS. In code during checkout, I'll then parse the OS-id that's sent and execute accordingly. BUT I have to know the OS-id's before hand. and when I say, "I have to know", I mean you the end user who's not a developer and just installing my module to use. I already have the API so that I can take care of letting the end user get the correct results, I just don't know how to code into the Options view fields.
Question
uaktags
So i'm currently creating a module similar to the DigitalOcea module but for a different service, and one of the things I'd like to do is streamline alot of the product creation via code. Currently, thanks to PackageFields, we can set up custom fields for the main package. But I can't figure out how to do this for "Packages=>Options".
Right now, I have to by hand, click Create Group, call it Operating Systems, then "Create Option", choose Dropdown as type, and then for each entry list the label and the API's ID for that particular OS. In code during checkout, I'll then parse the OS-id that's sent and execute accordingly. BUT I have to know the OS-id's before hand. and when I say, "I have to know", I mean you the end user who's not a developer and just installing my module to use. I already have the API so that I can take care of letting the end user get the correct results, I just don't know how to code into the Options view fields.
Nothing in here https://docs.blesta.com/display/dev/Module+Methods appears relevant to that page either.
Any help or advise would be appreciated.
If it helps, the page I'm talking about is /admin/package_options/add/
1 answer to this question
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.