zoukankan      html  css  js  c++  java
  • zencart产品属性dropmenu select只有一个选择项时自动变成radio单选的解决办法

    includesmodulesclassicattributes.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>' . "
    ";

    替换为

    $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'] . '"') . "
    ";

    即可。

    转载请注明出处!小鱼阁工作室 -专注zencart建站,织梦企业建站,ecshop商城,二次开发,产品采集,模板修改!技术QQ 631992791
  • 相关阅读:
    AJAX
    选择器
    断电原则
    radio为什么不能选择。急急急
    IBase<T>
    委托
    Log4Net
    博弈论 学习笔记
    解决You have new mail in /var/spool/mail/root提示
    Zookeeper分布式安装部署
  • 原文地址:https://www.cnblogs.com/afish/p/3985589.html
Copyright © 2011-2022 走看看