Nieuw lid |
|
Beste Sitemasters,
Ik zit een beetje met mijn handen in mijn haar. Ik heb een webshop systeem waar mensen (logisch) spullen kunnen kopen. Nu werkt het factuur systeem netjes, alleen krijgt de klant de facturen binnen in HTML. En ik snap niet hoe dat kan komen. Hij gebruikt Vista Outlook 2007. Dus ik denk dat de taal die ik meegeef in mijn headers niet kloppen of zoiets. Weet iemand hier iets over?
Dit krijgt mijn klant binnen in zijn email:
Content-type: text/html; charset=iso-8859-1
To: Joep <hoi@hoi.nl>
From: Jeurdi <hoi@hoi.nl>
<html><head><strong>FACTUUR</strong><head><br><br><body>
Deze e-mail is ter bevestiging van uw aankoop in onze webshop. U heeft de volgende producten bij ons bestelt:<br><br>
<table width="500" border="1" cellpadding="3">
<tr>
<td width="50%"><strong>Product</strong></td>
<td width="25%"><strong>Aantal</strong></td>
<td width="25%"><strong>Prijs excl BTW</strong></td>
</tr>
<tr>
<td width="50%">5007 Halssieraad met turquase Hanger</td>
<td width="25%">1</td>
<td width="25%">€ 6,50</td>
</tr>
<tr>
<td width="50%">5012 Halsketting met emaille hanger roze</td>
<td width="25%">1</td>
<td width="25%">€ 1,95</td>
</tr>
<tr>
<td width="50%">5005 Halsketting met emaille hanger wit</td>
<td width="25%">1</td>
<td width="25%">€ 2,95</td>
</tr>
<tr>
<td width="50%">7000 New Time Dames Quartz Horloge met Strass</td>
<td width="25%">1</td>
<td width="25%">€ 7,45</td>
</tr>
<tr>
<td width="50%">7064 New Toime Dames Quartz Horloge met Strass</td>
<td width="25%">1</td>
<td width="25%">€ 7,45</td>
</tr>
<tr>
<td width="50%">7015 New Time Dames Quartz Horloge</td>
<td width="25%">1</td>
<td width="25%">€ 6,45</td>
</tr>
<tr>
<td width="50%">5014 Halssnoer met hanger antraciet met Strass-Steen</td>
<td width="25%">1</td>
<td width="25%">€ 3,25</td>
</tr>
<tr>
<td width="50%">5036a Zilverkleurige Halssieraad met medaillon bruin</td>
<td width="25%">1</td>
<td width="25%">€ 3,00</td>
</tr>
<tr>
<td width="50%">5013 Halsketting, touwtjesmodel met parels</td>
<td width="25%">1</td>
<td width="25%">€ 4,95</td>
</tr>
<tr>
<td width="50%">5020 Halsketting met Kralen met verlenging </td>
<td width="25%">1</td>
<td width="25%">€ 3,75</td>
</tr>
<tr>
<td width="50%">5027 Halssieraad Zilverkleurig mat </td>
<td width="25%">1</td>
<td width="25%">€ 6,95</td>
</tr>
<tr>
<td width="50%">5029 Zilverkleurig Halssieraad met Grijs getinte Stenen</td>
<td width="25%">1</td>
<td width="25%">€ 7,95</td>
</tr>
<tr>
<td width="50%">5035 Zilverkleurige Halsketting</td>
<td width="25%">1</td>
<td width="25%">€ 3,75</td>
</tr>
<tr>
<td width="50%">5039 Zilverkleurige Halsketting met Groene Stenen</td>
<td width="25%">1</td>
<td width="25%">€ 5,75</td>
</tr></table>
Content-type: text/html; charset=iso-8859-1 To: Joep <hoi@hoi.nl> From: Jeurdi <hoi@hoi.nl> <html><head><strong>FACTUUR</strong><head><br><br><body> Deze e -mail is ter bevestiging van uw aankoop in onze webshop . U heeft de volgende producten bij ons bestelt :<br ><br > <table width="500" border="1" cellpadding="3"> <tr> <td width="50%"><strong>Product</strong></td> <td width="25%"><strong>Aantal</strong></td> <td width="25%"><strong>Prijs excl BTW</strong></td> </tr> <tr> <td width="50%">5007 Halssieraad met turquase Hanger</td> <td width="25%">1</td> <td width="25%">€ 6,50</td> </tr> <tr> <td width="50%">5012 Halsketting met emaille hanger roze</td> <td width="25%">1</td> <td width="25%">€ 1,95</td> </tr> <tr> <td width="50%">5005 Halsketting met emaille hanger wit</td> <td width="25%">1</td> <td width="25%">€ 2,95</td> </tr> <tr> <td width ="50%">7000 New Time Dames Quartz Horloge met Strass </td > <td width="25%">1</td> <td width="25%">€ 7,45</td> </tr> <tr> <td width="50%">7064 New Toime Dames Quartz Horloge met Strass</td> <td width="25%">1</td> <td width="25%">€ 7,45</td> </tr> <tr> <td width ="50%">7015 New Time Dames Quartz Horloge </td > <td width="25%">1</td> <td width="25%">€ 6,45</td> </tr> <tr> <td width="50%">5014 Halssnoer met hanger antraciet met Strass-Steen</td> <td width="25%">1</td> <td width="25%">€ 3,25</td> </tr> <tr> <td width="50%">5036a Zilverkleurige Halssieraad met medaillon bruin</td> <td width="25%">1</td> <td width="25%">€ 3,00</td> </tr> <tr> <td width="50%">5013 Halsketting, touwtjesmodel met parels</td> <td width="25%">1</td> <td width="25%">€ 4,95</td> </tr> <tr> <td width="50%">5020 Halsketting met Kralen met verlenging </td> <td width="25%">1</td> <td width="25%">€ 3,75</td> </tr> <tr> <td width="50%">5027 Halssieraad Zilverkleurig mat </td> <td width="25%">1</td> <td width="25%">€ 6,95</td> </tr> <tr> <td width="50%">5029 Zilverkleurig Halssieraad met Grijs getinte Stenen</td> <td width="25%">1</td> <td width="25%">€ 7,95</td> </tr> <tr> <td width="50%">5035 Zilverkleurige Halsketting</td> <td width="25%">1</td> <td width="25%">€ 3,75</td> </tr> <tr> <td width="50%">5039 Zilverkleurige Halsketting met Groene Stenen</td> <td width="25%">1</td> <td width="25%">€ 5,75</td> </tr></table>
En daarbij is dit de code die dit doet versturen:
//Assemble e-mail message(s)
$email['message'] = '<html><head><strong>FACTUUR</strong><head><br><br><body>
Deze e-mail is ter bevestiging van uw aankoop in onze webshop. U heeft de volgende producten bij ons bestelt:<br><br>
<table width="500" border="1" cellpadding="3">
<tr>
<td width="50%"><strong>Product</strong></td>
<td width="25%"><strong>Aantal</strong></td>
<td width="25%"><strong>Prijs excl BTW</strong></td>
</tr>';
while ($fetch = mysql_fetch_array($sql['products'])) {
$product = $this->ProductDetails($fetch['product_id']);
if (STOCK == true) {
//Lower stock with amount of products
mysql_query("UPDATE products SET stock = stock - " . $fetch['amount'] .
" WHERE product_id='" . $product['product_id'] . "'") or die(mysql_error());
}
//$price = $product['price'] + (($product['price'] / 100) * $product['tax']);
$price = $product['price'];
$btw = $btw + $fetch['amount']*(($product['price'] / 100) * 19);
$email['message'] .= '
<tr>
<td width="50%">' . $product['name'] . '</td>
<td width="25%">' . $fetch['amount'] . '</td>
<td width="25%">€ ' . number_format($price, 2,
',', '.') . '</td>
</tr>';
}
$totaal = number_format($this->GetTotalPriceOfOrder($_SESSION['order_id'], false), 2);
//$ver = round($totaal - $tryme,2);
if ($totaal < 200) {
$ver = number_format(VERZENDINGK,2);
} else {
$ver = number_format(0,2);
}
//$totaal = $totaal + $ver;
$ontotaal = $this->GetTotalPriceOfOrder($_SESSION['order_id']) - $btw;
$email['message'] .= ' <tr>
<td width="50%"><i>Verzendkosten</i></td>
<td width="25%"> </td>
<td width="25%"><i>€' . $ver . ',-</i></td>
</tr>';
$email['message'] .= '<tr>
<td width="50%"><strong>Totaal BTW</strong></td>
<td width="25%"> </td>
<td width="25%"><strong>€' . number_format($btw,2) . ',-</strong></td>
</tr>';
$email['message'] .= ' <tr>
<td width="50%">Totaal exl BTW</td>
<td width="25%"> </td>
<td width="25%">€' . number_format($ontotaal,2) .',-</td>
</tr>';
$email['message'] .= ' <tr>
<td width="50%"><strong>Totaal incl BTW</strong></td>
<td width="25%"> </td>
<td width="25%"><strong>€' . $totaal .',-</strong></td>
</tr>';
$email['message'] .= '</table>
<br><br>Referentie: <br>
'.$referentie.'
<br><br>Commentaar: <br>
'.$commentaar.'
<br><br>
<strong>Adresgegevens</strong><br>
Uw producten worden naar het volgende adres verstuurt:<br><br>
' . $OrderData['name'] . '<br>
' . $OrderData['address'] . '<br>
' . $OrderData['zipcode'] . ' ' . $OrderData['place'] . '<br><br>';
if ($ideal == true) {
$email['message'] .=
'U heeft iDEAL gekozen om te betalen. Uw bestelling wordt zo snel mogelijk verstuurt.';
} else {
$email['message'] .= '
<BR>
---------------------------------------------------------
<BR>
Mededeling: Factuur nr.' . $_SESSION['order_id'] . '.
<BR>
<BR>
Na ontvangst van uw betaling zal uw bestelling verzonden worden.</body></html>';
}
//Mail to the customer
$email['subject'] = "Bevestiging van order " . $_SESSION['order_id'];
//Set the address
$email['to'] = $user['email'];
// To send HTML mail, the Content-type header must be set
$email['headers'] = 'MIME-Version: 1.0' . "\r\n";
$email['headers'] .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$email['headers'] .= "To: " . $user['name'] . " <" . $user['email'] . ">" . "\r\n";
$email['headers'] .= 'From: ' . WEBSHOP_NAME . ' <' . WEBSHOP_EMAIL . '>' . "\r\n";
$email['headers'] .= 'Bcc: ' . WEBSHOP_EMAIL . "\r\n";
// Mail it
mail($email['to'], $email['subject'], $email['message'], $email['headers']);
//Set the order to confirmed
mysql_query("UPDATE orders_general SET confirmed='1' WHERE order_id='" . $_SESSION['order_id'] .
"'") or die(mysql_error());
//Delete cart products
mysql_query("DELETE FROM cart WHERE userid='" . $_SESSION['userid'] . "'") or
die(mysql_error());
//Assemble e-mail message(s) $email['message'] = '<html><head><strong>FACTUUR</strong><head><br><br><body> Deze e-mail is ter bevestiging van uw aankoop in onze webshop. U heeft de volgende producten bij ons bestelt:<br><br> <table width="500" border="1" cellpadding="3"> <tr> <td width="50%"><strong>Product</strong></td> <td width="25%"><strong>Aantal</strong></td> <td width="25%"><strong>Prijs excl BTW</strong></td> </tr>'; $product = $this->ProductDetails($fetch['product_id']); if (STOCK == true) { //Lower stock with amount of products mysql_query("UPDATE products SET stock = stock - " . $fetch['amount'] . " WHERE product_id='" . $product['product_id'] . "'") or die(mysql_error()); } //$price = $product['price'] + (($product['price'] / 100) * $product['tax']); $price = $product['price']; $btw = $btw + $fetch['amount']*(($product['price'] / 100) * 19); $email['message'] .= ' <tr> <td width="50%">' . $product['name'] . '</td> <td width="25%">' . $fetch['amount'] . '</td> ',', '.') . '</td> </tr>'; } $totaal = number_format($this->GetTotalPriceOfOrder($_SESSION['order_id'], false), 2); //$ver = round($totaal - $tryme,2); if ($totaal < 200) { } else { } //$totaal = $totaal + $ver; $ontotaal = $this->GetTotalPriceOfOrder($_SESSION['order_id']) - $btw; $email['message'] .= ' <tr> <td width="50%"><i>Verzendkosten</i></td> <td width="25%"> </td> <td width="25%"><i>€' . $ver . ',-</i></td> </tr>'; $email['message'] .= '<tr> <td width="50%"><strong>Totaal BTW</strong></td> <td width="25%"> </td> <td width="25%"><strong>€' . number_format($btw,2) . ',-</strong></td> </tr>'; $email['message'] .= ' <tr> <td width="50%">Totaal exl BTW</td> <td width="25%"> </td> </tr>'; $email['message'] .= ' <tr> <td width="50%"><strong>Totaal incl BTW</strong></td> <td width="25%"> </td> <td width="25%"><strong>€' . $totaal .',-</strong></td> </tr>'; $email['message'] .= '</table> <br><br>Referentie: <br> '.$referentie.' <br><br>Commentaar: <br> '.$commentaar.' <br><br> <strong>Adresgegevens</strong><br> Uw producten worden naar het volgende adres verstuurt:<br><br> ' . $OrderData['name'] . '<br> ' . $OrderData['address'] . '<br> ' . $OrderData['zipcode'] . ' ' . $OrderData['place'] . '<br><br>'; if ($ideal == true) { $email['message'] .= 'U heeft iDEAL gekozen om te betalen. Uw bestelling wordt zo snel mogelijk verstuurt.'; } else { $email['message'] .= ' <BR> --------------------------------------------------------- <BR> Mededeling: Factuur nr.' . $_SESSION['order_id'] . '. <BR> <BR> Na ontvangst van uw betaling zal uw bestelling verzonden worden.</body></html>'; } //Mail to the customer $email['subject'] = "Bevestiging van order " . $_SESSION['order_id']; //Set the address $email['to'] = $user['email']; // To send HTML mail, the Content-type header must be set $email['headers'] = 'MIME-Version: 1.0' . "\r\n"; $email['headers'] .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $email['headers'] .= "To: " . $user['name'] . " <" . $user['email'] . ">" . "\r\n"; $email['headers'] .= 'From: ' . WEBSHOP_NAME . ' <' . WEBSHOP_EMAIL . '>' . "\r\n"; $email['headers'] .= 'Bcc: ' . WEBSHOP_EMAIL . "\r\n"; // Mail it mail($email['to'], $email['subject'], $email['message'], $email['headers']); //Set the order to confirmed mysql_query("UPDATE orders_general SET confirmed='1' WHERE order_id='" . $_SESSION['order_id'] . //Delete cart products mysql_query("DELETE FROM cart WHERE userid='" . $_SESSION['userid'] . "'") or
Alvast echt heel erg bedankt, kan hier weinig over vinden wat mij echt verder kan helpen!
Groeten Jeurdi
|