2014-11-14 2 views
0

cms.tpl에서 데이터 아약스를 보내야하지만 URL은 작동하지 않습니다. 디스플레이 (404)CMS 페이지의 Prestashop Ajax

var formData = { 
    'referencia_producto': $('input[name=reference_product]').val(), 
    'tipo_form': $('input[name=tipo_form]').val() 
}; 

$.ajax({ 
    type: 'POST', 
    headers: {"cache-control": "no-cache"}, 
    url:baseUri+'index.php?id_cms=18&controller=cms', 
    data: formData, 
    async: true, 
    cache: false, 
    dataType: 'json', 
    success: function (data) { 
    } 
}); 

CMS에서 AJAX를 구현하기위한 방법은 무엇입니까?

내 마음에 당신에게

답변

0

니켈 수소 가장 쉬운 방법 감사 : 당신이 당신의 JS, CSS, PHP 코드를 작성하고 CMS에 후크 수있는 모듈을 만들 수 있습니다.

또한이 코드를 TPL 파일에 사용하려면 {literal} YOUR CODE {/ literal}에서 시도해 보셨습니까?

+0

감사합니다. 나는 시도 할 것이다. –

관련 문제