This may already be possible, but I can't figure out how to do it. What I want is to give the user some options, but I want them to be in checkbox form. This way, if they choose any of them, then those options are added, otherwise none are added. Is there a way to do this? Or possibly making them radio buttons instead? Checkboxes are ideal.
Checkbox Options
|
|
In the latest code (after beta 6) attributes get display options which let you choose between textfields, select boxes, and radio buttons. Checkboxes don't fit with the way the data is stored, and changing things to allow for them would make the model adjustments very difficult to deal with. Maybe that can be addressed again for version 2.0, but it's looking doubtful. We'll see.
Thanks for the response. That makes sense. I do have a question, the version of ubercart that is on the site I am working on is 5.x-1.0-beta1. I have created an attribute with no options (thus a textfield appears for the attribute). However, there is no checking done on that attribute, so if I type in </td></tr></table></div> then it messes the page up quite a bit. I was wondering if there is a way that I can hook in to a product and check the attribute once it is entered so that I can verify it is valid?
Wow, that's no good. There needs to be a check_plain() on line 1433 of uc_attribute.module. That'll be in the next release.
Users looking for update instructions, read this. The line number above may be incorrect and doesn't really show the fix, so look for a function in uc_attribute.module named _uc_cart_product_get_options() and change the following:
<?php
// From:
'name' => $oid,
// To:
'name' => check_plain($oid),
?>(Lyle, please correct this if I missed anything.
)
|
|




Joined: 03/07/2008