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 –