0
我正在开发prestashop模块,我创建了一些自定义字段吃了产品页面。 我有从JSONPrestashop自动完成输入类型
这里通过自动完成得值的字段是模块TPL场:
<div class="form-group">
<label class="control-label col-lg-3">Post 6:</label>
<div class="col-lg-9">
{*<input type="text" name="principi_name" value="{$principi_name}">*}
{include
file="controllers/products/textarea_lang.tpl"
languages=$languages
input_name='principi_name'
class="textarea testingautocolplete"
input_value=$principi_name}
</div>
</div>
这里是jQuery的:
$(document).ready(function() {
product_tabs['product_type'] = new function(){
$('.testingautocolplete').autocomplete('http://www.domain.com/dbsearch.php', {
width: 320,
max: 4,
highlight: false,
multiple: true,
multipleSeparator: " ",
scroll: true,
scrollHeight: 300,
})
}
});
场上的结果是所有json: 我想我犯了一个错误,但我找不到什么:
谢谢。
你好,感谢您的回复。我用你的代码,这是好的,我吃的情况下我ajax.php只返回一个JSON这样的:'[ “LA-BuONa外,cosmesi枝-FA-好处 - allambiente-valori-E-valore二unimpresa -buona-dicono二叔NOI”, “COLORE-自然漆每VISO-E-CORPO-violetto-realizzato-CON-alcanna” ]'但它没有显示如在选择形式dwropdown在情况下,我返回其结果作为阵列JSON编码'回波json_encode($ simplearray)'IMG:HTTP://prntscr.com/cqary9 –