[英]Input text field instead of drop down for combinations on product page
在prestashop 1.6中,只有2个选项可显示要选择的组合。 单选按钮或下拉列表。 我有2个属性,宽度和长度。 值从50到300 b 1 cm。 它太大,无法显示在下拉列表中。 我真的需要一个souliton来更改下拉列表以输入文本字段。
来自product.tpl的代码段(此代码显示在产品页面的前端):
<!-- 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'} : </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>
可能也必须在js中进行一些更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.