Is there a way to receive the data from pay-pal that comes out when someone has confirmed they have bought my item and the payment has gone through? I am looking to then use this data to remove an option for a size when the item is out of stock. By creating a bit of code; that say there are 3 items in stock, when someone buys an item the data from pay-pal then notifies my code to change the stock number down to 2 and so on until the code reaches zero and it then removes some HTML code, so that it is impossible for someone to buy the item if it is out of stock.
This is the basic idea:
var quantity_in_stock_S = 3
/*!!When paypal Size: Small. is bought!!*/ = quantity_in_stock_S - 1
function deleteOption1(){ /* deletes HTML option */
if ( quantity_in_stock_S <= 0)
{
var S = document.getElementById("S");
document.getElementById("mySelect").removeChild(S);
}
};
window.onload = function() {
deleteOption1();
};
As you can see I am not very profficient at javascript. But I am going to teach myself it to a higher level. I am just very interested in the '/!!When paypal Size: Small. is bought!!/' part of the code and if it is possible to find it.
I have HTML like: <div id="hooray" class="section"> <div> <div> <div id="click">click</div> </div> </div> </div> When I ...
I have HTML like: <div id="hooray" class="section"> <div> <div> <div id="click">click</div> </div> </div> </div> When I ...
How can I partially sort an array in JavaScript, based on some conditions that I choose? Given an array var tab = [ {html: 'This is a test'}, {html: 'Locked item', locked: true}, {html:...
How can I partially sort an array in JavaScript, based on some conditions that I choose? Given an array var tab = [ {html: 'This is a test'}, {html: 'Locked item', locked: true}, {html:...
I am new to google api. I am able to do this file upload from app script and any file which is uploaded through that script get stored to my drive only. But how to do this using javascript. Example ...
I am new to google api. I am able to do this file upload from app script and any file which is uploaded through that script get stored to my drive only. But how to do this using javascript. Example ...
I have a large JSON file with a snippet of the file below. Please ignore the values as they are only used as placeholders for this question. "restaurants":[ "name": "Burger King", ...
I have a large JSON file with a snippet of the file below. Please ignore the values as they are only used as placeholders for this question. "restaurants":[ "name": "Burger King", ...