Well, a quick look at your code and it looks like you store the product stuff inside a session variable called “cart” and you are using $_SESSION[‘cart’][$product_id] format of an array… Also, you loop thru this in the code you showed. So, all you have to do is create a message inside that loop and that should do it for you. So, inside this:
while($row = mysql_fetch_assoc($sql)){
$product_name = $row[‘product_name’];
$price_1_6 = $row[‘price_1_6’];
$price_1_6_b = $row[‘price_1_6_b’];
$price_6_plus = $row[‘price_6_plus’];
$price_6_plus_b = $row[‘price_6_plus_b’];
$type = $row[‘type’];
$price = $row[‘price’];
}
Add your code… Something like this:
[php]
while($row = mysql_fetch_assoc($sql)){
$product_name = $row[‘product_name’];
$price_1_6 = $row[‘price_1_6’];
$price_1_6_b = $row[‘price_1_6_b’];
$price_6_plus = $row[‘price_6_plus’];
$price_6_plus_b = $row[‘price_6_plus_b’];
$type = $row[‘type’];
$price = $row[‘price’];
$message .= "Product : " . $product_name . " - type : " . $type . " - price : " . $price . “\r\n”;
}
[/php]
Not sure of your code, but, this should add the products to the $message variable…
Then, just before you email it, you add your notes to it… Something like this:
$message = “Here is another order from the website!\r\n” . $message;
Or, you could add the first part earlier in your code…
Not sure if that is what you wanted, but, I think it might work for you…