I have a series of products with custom options of type checkbox. However I cannot set from the setup of the product the default state of that particular option.
I need at least one of the checkboxes (options) to be checked by default as the user enters the product page / adds to cart from category page.
Is this doable from the Magento administration or will it require some extra development (if so how this can be done)?
Best Answer
I don't know if recommending an extension counts as a valid answer (for a question with a bounty) but someone claims here that he wrote an extension that does exactly what you need. Extension can be downloaded from here. I haven't tested it but, as soon as I do, I will post and update. I only looked through the code and there is a lot of it. I lost interest after 2 files. I hope it works for you.
[EDIT]
I've got my interest back. I tested the extension on ce-1.7.0.2 and it (almost) works.
If you use it with developer mode on you will get some errors. Here is what you need to change to make it work.
in
/app/code/local/Magebuzz/Customoption/controllers/Adminhtml/CustomoptionController.php
on line 28 there is this:This shows an 'undefined index' warning. To avoid it, wrap it in an
if
statement.In
/app/code/local/Magebuzz/Customoption/Block/Adminhtml/Customoption/Edit/Tab/Form.php
on line 129 there is this:$values
may be null so change the code to this:Now it should work.
Now some review.