jquery - Link PHP with Ajax Magento 2 -


i'm trying create simple "register interest" action. have front end working i'm not sure how link ajax php file. put php file?

my current code ajax is:

$.ajax({                         url: "register-interest.php",                         type: "get",                         datatype: "json",                         data: {                             type : "registerinterest",                             email : useremaillog,                             user : usernamelog,                             product : producttitle,                             sku : productsku                         },                         success: function (response) {                             json.stringify(response);                         },                         error: function (err) {                             json.stringify(err);                         },                         complete : function() {                             //$('.user-accept').addclass('unhide');                             loading();                         }                      }); 

first check url variable correct or not , provide response data

success: function (response) {                         json.stringify(response);                     }, 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -