Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option Types Lock-in #3538

Open
bhsmither opened this issue Apr 4, 2024 · 1 comment
Open

Option Types Lock-in #3538

bhsmither opened this issue Apr 4, 2024 · 1 comment

Comments

@bhsmither
Copy link
Contributor

In the admin template products.options.php, the Attributes tab, the select (line 70) and the accompanying fieldset (line 104) are locked to two specific option types: select and radio.

There are also checkbox and hidden types, as well as custom types, added through hooks, that then need to have value attributes associated with those types.

Maybe make Catalogue::_options_selectable and Catalogue::_options_textual public, or provide magic getter and setter for these arrays (able to marshal the array contents).

Eventually, in the admin script products.options.inc.php, near line 286, the template variable GROUPS could contain an element in $option to indicate that this is a 'selectable' type of option type.

Then, the template will test for 'selectable' instead of the hard-coded option types.

Please also look at template lines 169-185. (Select and Radio has the same code.)

@bhsmither
Copy link
Contributor Author

Also look at products.index.inc.php, near line 792:

$select_types = array(0,4);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant