如何在Magento中发送和接收数据?

时间:2015-03-09 11:18:14

标签: ajax magento

如何在Magento和AJAX中发送和接收数据?当我使用AJAX发送数据时,它没有使用URL?

请告诉我此代码中的错误:

$(document).ready(function(){

    $("#category").on('change',function(){

        var prize = "<?php echo $spac_name;?>";
        $.ajax({
            url: "<?php echo Mage::getSingleton('core/url')->parseUrl(Mage::helper('core/url')->getCurrentUrl())->getPath()?>",
            type: 'POST',
            data: {prize :prize},
            success: function(data) {
                $('#da_ta').html("haha");
            }
        });
    });
});

0 个答案:

没有答案
相关问题