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 Selector Types #73
Comments
👍 |
This reminded me of a task I did a few months back. |
Please can I add a request for radio-button option selections to be available. These are by far the most user-friendly,and experience shows that they do generate more sales and fewer order errors. |
I have emailed to CubeCart a diff file of what I have done so far in enabling more of the other types of form input types (radio buttons so far). Maybe the file will show up here shortly. |
Thanks for this. Just for my reference (sales ticket 101285). |
Radio checkboxes have been implemented: |
I'd like to use these but I really can't use the Foundation skin. What changes would I need to make to enable them in a v5 skin? Is it a big task? |
It's fairly big. All code changes to the skin can be found in this repo. Please note that Foundation skin uses a recent jQuery. v5 is stuck on v1.7 so it may not be compatible. |
I think the only one left to integrate may be "OPTION_FILE". I can't see a use for password, checkbox. The date picker could be useful but it would probably be dumb (as in allowing any date to be picked). |
A standard html5 date picker is easily good enough, future proof and easy to do. I can see a lot of uses for checkboxes - they allow multiselect in a much more user-friendly way than a multi-select dropdown. Password does seem unlikely to be useful |
I agree about HTML5 to an extent. According to this site there should be 85% compatibility globally. http://caniuse.com/#search=date%20pickers is that good enough? .. it depends on the merchant. Personally I don't like the UX, browsers such as Chrome work with required fields for example. The jQuery Validation plugin in the Foundation skin is much friendlier and much more flexible. Checkboxes would allow multiple options to be selected. CubeCart has no support for that right now so it would take more than just GUI changes unless only one checkbox was allowed per option. |
I don't understand. CubeCart DOES support multiple options. You can choose large, medium or small AND pink, green or blue. So you are choosing "large pink" or "medium green" - surely that's multiple options! I accept that it doesn't support multiple option values, (large, pink and green) but there are lots of places where it would be good to be able to select one or more single-value options using checkboxes. After all, that's how you select single-value options in the admin - for good reason! |
Multiple selections per option. So for example: Color: Green, red & Blue As a drop down this would three options with one selectable. I'm sure it can be done but its not immediately simple. |
Yes, it'd need to only allow single-value (on or off) options to be set up as checkboxes.That would be really good if it can be done. |
Agreed. :) 👍 |
I can think of some example situations:
Mixed Nuts, Mixed Chocolates, that kind of thing. |
Nice! Thanks Brian. |
Just wondering if "OPTION_FILE" is still on the cards (longer term). Its an option i really miss from zencart, i'm curently using a www.powr.io form to get round this (example here http://laserlab.co.uk/create-parts/wood/plywood-6mm-p10.html [bottom of page]), its clunky and looses the association to an order number. It would be nice to be core code rather that an extension. |
With respect to #62, I am working (actually on CC5216 and have yet to check if this applies to the CC6 codebase) to eliminate the hard-coded enumeration of option selector types. These types are located in the Catalogue class and every effort should be made to use them as they stand.
The code I am experimenting with is near line 270 (CC5216) in the file product.options.inc.php (as well as the template code in products.options.php).
PHP's get_defined_constants() seemed like the perfect solution, but it does not actually collect constants declared (as opposed to defined) in classes. So, using this suggestion:
http://us1.php.net/manual/en/function.get-defined-constants.php#84975
(be careful of the syntax error on line 5) placed in the Catalogue class, I can get this:
From that, it is trivial to get the language phrases and populate the Smarty variables.
This brings up the issue that there is no code, as yet, to deal with the option selector types other than 0,1, and 2. So, prior to assigning the data to Smarty, it will be necessary to tweak the array.
Also to add the appropriate language strings for the rest of the selector types.
The text was updated successfully, but these errors were encountered: