msg.replace('{:curQuantity}', quant); msg.replace('{:newQuantity}', '12'); msg.replace('{Date1}', startDay); msg.replace('{Date2}', endDay); The point is to replace all entries in this line with a value. But for some reason, replace () did not really want to change. For the line, you can take this value:
var msg = '{:curQuantity} bottles currently in stock. Order {:newQuantity} bottles and your items will ship {Date1} – {Date2}';
msg = msg.replace('{:curQuantity}', quant);w3schools.com/jsref/jsref_replace.asp - Igor