I'm a complete novice to javascript and I am ready to rip my hair out over this one. I'm supposed to make a webpage that, upon loading, asks the user their name, what product they want to purchase, what the price of that product is, what the discount on that product is and what quantity of that product they would like to purchase. With this information, I am supposed to write javascript that will, at the bottom of my webpage in plain text, return:

"Thank you for placing an order with us [customer name].
The cost of buying [quantity] of [product name] is [cost].
The discount for this purchase is [how much of a discount the customer will be receiving].
With the discount, your total order cost is [total cost of order with discount]."

Anything in brackets is a variable that I've defined in my code.

Here's the code:
PHP Code:
<script type="text/javascript">
    var 
nameproductpricediscountquantity;
    
    var 
name prompt("Welcome to Ryan's Ice Cream Shop. What is your name?","Enter name");
    var 
sentence "Hello " name " please look through our available products and services before placing your order.";
    
alert(sentence);
    
    var 
product prompt("Please enter the name of the product you are looking to purchase from the table.","Enter product");
    var 
price prompt("Please enter the price that corresponds to the product you would like to purchase from the price column.","Enter price");
    var 
discount prompt("Please enter the discount that corresponds to the product you would like to purchase from the discount column.","Enter discount");
    var 
quantity 1*prompt("How many " product " would you like to purchase?","Enter quantity");
    
    var 
costprice quantity;
    var 
orderdiscountprice discount quantity;
    var 
totalcostcost orderdiscount;
    
    
document.write("Thank you for placing an order with us, " name ".");
    
document.write("The cost of buying " quanitity "of" product "is" totalcost ".");
    
document.write("The discount for this purchase is " orderdiscount ".");
    
document.write("With the discount, your total order cost is " totalcost ".");
</script> 
Nothing after document.write("Thank you for placing an order with us, " + name + "."); works. I just cannot figure out what I've done wrong.

Any help is greatly appreciated.