Riya92 Posted October 20, 2015 Share Posted October 20, 2015 I want to post some data to OrderController.php from a form in shopping-cart.tpl through ajax . How should I do it? this is my code var formData = $('#gift_voucher').serialize(); var data = {}; data.ajax = 1; data.controller = "AdminAddresses"; data.formData = formData; $.ajax({ url : "index.php?controller=Order&sentmailnow=1", type: "POST", data : data, success: function(data) { alert(1); } }); Please help anyone. Link to comment Share on other sites More sharing options...
tuk66 Posted October 20, 2015 Share Posted October 20, 2015 Learn from code. Almost everything is already there. Link to comment Share on other sites More sharing options...
Recommended Posts