Hi I am trying to create a button that will call a php function to add products to Shopify from web application
First this is my result.php file which is showing amazon products successfully http://codepad.org/MPs4y1Qu
There you will find two important things
first <button type="button">add</button>and
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$.ajax({
type: 'POST',
url: 'create_product.php',
success: function(data) {
prompt(data);
}
});
});
});
</script>
The problem is when I click on Add Button it shows the HTML of the page but nothing happens on the create_product.php file. I want it to call that function. On the other hand my code on create_product is fine and working 100% separately but not with my web app.
here is my create_product.php code:
create_product.php. You need adatakey in your$.ajaxoptions containing the info you want to utilize in your PHP script, which will be available via$_POST$_POSTviadataand what actually should it include?