1

i'm working with magento 1.9.0.1 and be-responsive theme.I have a series of products with custom options of type radio. 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)?

  • Check this: magento.stackexchange.com/q/12902/146 – Marius Nov 11 '14 at 10:48
  • @Marius: thanks dear thats what exactly i want, but unable to install the extention via Direct package file upload. – Manindra Singh Nov 11 '14 at 10:57
  • @Marius: i have uploaded all the folders and files into respective foldersof my magento but its not showing anything – Manindra Singh Nov 11 '14 at 11:24
  • Make sure you cleared the cache and disabled the compilation. I didn't develop the module, I only found it on the web. You should contact the developer for additional support. – Marius Nov 11 '14 at 11:26
0

You need to do from code magento is not providing any setting to select radio by default

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:

$model->setData('value['.$option_id.']',$value[0]['option_type_id']);

This shows an 'undefined index' warning. To avoid it, wrap it in an if statement.

if (isset($value[0])){
    $model->setData('value['.$option_id.']',$value[0]['option_type_id']);
}

In /app/code/local/Magebuzz/Customoption/Block/Adminhtml/Customoption/Edit/Tab/Form.php on line 129 there is this:

foreach ($values as $value) {
    $valuesArr[$value['option_type_id']]=$value['title'];
}

$values may be null so change the code to this:

if (is_array($values)){
    foreach ($values as $value) {
        $valuesArr[$value['option_type_id']]=$value['title'];
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.