duanke1286 2014-09-09 07:00
浏览 36

输入文本字段而不是下拉产品页面上的组合

In prestashop 1.6 you have just 2 option for display the combinations to select. Radio button or drop down list. I have 2 attribute, width and lenght. The values from 50 to 300 steb by 1 cm. It's too huge to display in drop down list. I really need a souliton to change the drop down list to input text field.

The piece of code from product.tpl( this display on front end on product page):

   <!-- attributes -->
            <div id="attributes">
            {foreach from=$groups key=id_attribute_group item=group}
                {if $group.attributes|@count}
                    <fieldset class="attribute_fieldset form-group">
                        <label class="attribute_label" for="group_{$id_attribute_group|intval}">     {$group.name|escape:'htmlall':'UTF-8'} :&nbsp;</label>
                        {assign var="groupName" value="group_$id_attribute_group"}
                        <div class="attribute_list">
                        {if ($group.group_type == 'select')}
                            <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="attribute_select form-control" onchange="findCombination();getProductAttribute();">
                                {foreach from=$group.attributes key=id_attribute item=group_attribute}
                                    <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>
                                {/foreach}
                            </select>

May have to do some changes in js too.

  • 写回答

1条回答 默认 最新

  • douhe6181 2014-09-14 06:24
    关注

    You can use the following jQuery number-updown plugin its useful for your case and has many options.

    Link for the plugin in github Link

    Examples Link

    评论

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)