西部数码主机 | 阿里云主机| 虚拟主机 | 服务器 | 返回乐道官网
当前位置: 主页 > php教程 > zencart教程 >

zencart产品属性dropmenu select只有一个选择项时自动

时间:2016-03-23 07:43来源: 作者: 点击:
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_o

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";

 

即可。

(责任编辑:好模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容