I can never find my old posts either ... :cry:
but it's out there ... :smile:
However, being the nice person that I am and since others may need to find how to allow Option Names with a Single Options Value you can look in the attributes module:
/includes/modules/attributes.php
There is a section that controls in the case statement for the Options Names Option Type where you have set it up to be a dropdown but have only one option value and this, by default, is switching that dropdown to the selected radiobutton so the customer does not waste the time clicking a 1 option value option name ...
However, I digress ...
Look at the section for:
// dropdown menu auto switch to selected radio button display
case ($products_options->RecordCount() == 1):
if ($show_attributes_qty_prices_icon == 'true') {
$options_name[] = '<label class="switchedLabel ONE" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . ATTRIBUTES_QTY_PRICE_SYMBOL . $products_options_names->fields['products_options_name'] . '</label>';
} else {
$options_name[] = $products_options_names->fields['products_options_name'];
}
$options_menu[] = zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_value_id, 'selected', 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsRadioButton" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label>' . "\n";
$options_comment[] = $products_options_names->fields['products_options_comment'];
$options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0');
break;
If you comment out that whole case then it will not run and the single option value on the dropdown option type will now switch back to a dropdown and not a radio button ...
Commenting it is easy ... just copy the file to your overrides directory:
/includes/modules/your_template_dir/attribute.php
and change the code to read:
/*
// dropdown menu auto switch to selected radio button display
case ($products_options->RecordCount() == 1):
if ($show_attributes_qty_prices_icon == 'true') {
$options_name[] = '<label class="switchedLabel ONE" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . ATTRIBUTES_QTY_PRICE_SYMBOL . $products_options_names->fields['products_options_name'] . '</label>';
} else {
$options_name[] = $products_options_names->fields['products_options_name'];
}
$options_menu[] = zen_draw_radio_field('id[' . $products_options_names->fields['products_options_id'] . ']', $products_options_value_id, 'selected', 'id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '"') . '<label class="attribsRadioButton" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label>' . "\n";
$options_comment[] = $products_options_names->fields['products_options_comment'];
$options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0');
break;
*/
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!