首页 > 其他 > 详细

zencart产品属性dropmenu select只有一个选择项时自动变成radio单选的解决办法

时间:2014-09-22 11:37:33      阅读:408      评论:0      收藏:0      [点我收藏+]

includes\modules\classic\attributes.php

在大约786行代码

case ($products_options->RecordCount() == 1):

 

的下面找到

$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_menu[] = zen_draw_pull_down_menu(‘id[‘ . $products_options_names->fields[‘products_options_id‘] . ‘]‘, $products_options_array, $selected_attribute, ‘id="‘ . ‘attrib-‘ . $products_options_names->fields[‘products_options_id‘] . ‘"‘) . "\n";

 

即可。

zencart产品属性dropmenu select只有一个选择项时自动变成radio单选的解决办法

原文:http://www.cnblogs.com/afish/p/3985589.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!