Skip to content

Commit

Permalink
[-] BO : #PSCFV-2553 : fix bug html for email order_conf.html
Browse files Browse the repository at this point in the history
  • Loading branch information
NinjaOfWeb committed May 29, 2012
1 parent 492f421 commit 1d7aa55
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 26 deletions.
16 changes: 14 additions & 2 deletions classes/PaymentModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_
'{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1),
'{carrier}' => $virtual_product ? $this->l('No carrier') : $carrier->name,
'{payment}' => Tools::substr($order->payment, 0, 32),
'{products}' => $products_list,
'{discounts}' => $cart_rules_list,
'{products}' => $this->formatProductAndVoucherForEmail($products_list),
'{discounts}' => $this->formatProductAndVoucherForEmail($cart_rules_list),
'{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false),
'{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false),
'{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false),
Expand Down Expand Up @@ -630,6 +630,18 @@ public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_
}
}

public function formatProductAndVoucherForEmail($content)
{
return '<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;">
<colgroup>
<col width="15%"/>
<col width="30%"/>
<col width="20%"/>
<col width="15%"/>
<col width="20%"/>
</colgroup>'.$content.'</table>';
}

/**
* @param Object Address $the_address that needs to be txt formated
* @return String the txt formated address block
Expand Down
27 changes: 16 additions & 11 deletions mails/de/order_conf.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Message from {shop_name}</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Message from {shop_name}</title>
</head>
<body>
<table style="font-family: Verdana,sans-serif; font-size: 11px; color: #374953; width: 550px;">
<tbody>
<tr>
Expand Down Expand Up @@ -32,11 +32,16 @@
<td>&nbsp;</td>
</tr>
<tr>
<td align="left">{products} {discounts}
<td align="left">
<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody>
<tr style="background-color: #b9babe; text-align: center;"><th style="width: 15%; padding: 0.6em 0;">Artikelnr.</th><th style="width: 35%; padding: 0.6em 0;">Produkt</th><th style="width: 15%; padding: 0.6em 0;">St&uuml;ckpreis</th><th style="width: 15%; padding: 0.6em 0;">Menge</th><th style="width: 20%; padding: 0.6em 0;">Gesamtpreis</th></tr>
<!-- Products --><!-- Footer: prices -->
<tr>
<td colspan="5">{products}</td>
</tr>
<tr>
<td colspan="5">{discounts}</td>
</tr>
<tr style="text-align: right;">
<td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Produkte</td>
Expand Down Expand Up @@ -110,6 +115,6 @@
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop&trade;</a></td>
</tr>
</tbody>
</table>
</body>
</table>
</body>
</html>
7 changes: 6 additions & 1 deletion mails/en/order_conf.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody>
<tr style="background-color: #b9babe; text-align: center;"><th style="width: 15%; padding: 0.6em 0;">Reference</th><th style="width: 35%; padding: 0.6em 0;">Product</th><th style="width: 15%; padding: 0.6em 0;">Unit price</th><th style="width: 15%; padding: 0.6em 0;">Quantity</th><th style="width: 20%; padding: 0.6em 0;">Total price</th></tr>
<!-- Products -->{products} {discounts}<!-- Footer: prices -->
<tr>
<td colspan="5">{products}</td>
</tr>
<tr>
<td colspan="5">{discounts}</td>
</tr>
<tr style="text-align: right;">
<td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Products</td>
Expand Down
7 changes: 6 additions & 1 deletion mails/es/order_conf.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
<table style="width: 100%; font-size: 11px; color: #374953;"><!-- Title -->
<tbody>
<tr style="background-color: #b9babe; text-align: center;"><th style="width: 15%; padding: 1em 0;">Referencia</th><th>Producto</th><th style="width: 15%;">Precio Unidad</th><th style="width: 15%;">Cantidad</th><th style="width: 20%;">Precio Total</th></tr>
<!-- Products -->{products} {discounts}<!-- Footer: prices -->
<tr>
<td colspan="5">{products}</td>
</tr>
<tr>
<td colspan="5">{discounts}</td>
</tr>
<tr style="text-align: right;">
<td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Productos</td>
Expand Down
7 changes: 6 additions & 1 deletion mails/fr/order_conf.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody>
<tr style="background-color: #b9babe; text-align: center;"><th style="width: 15%; padding: 0.6em 0;">R&eacute;f&eacute;rence</th><th style="width: 30%; padding: 0.6em 0;">Produit</th><th style="width: 20%; padding: 0.6em 0;">Prix unitaire</th><th style="width: 15%; padding: 0.6em 0;">Quantit&eacute;</th><th style="width: 20%; padding: 0.6em 0;">Prix total</th></tr>
<!-- Products -->{products} {discounts}<!-- Footer: prices -->
<tr>
<td colspan="5">{products}</td>
</tr>
<tr>
<td colspan="5">{discounts}</td>
</tr>
<tr style="text-align: right;">
<td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Total produits</td>
Expand Down
25 changes: 15 additions & 10 deletions mails/it/order_conf.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Messaggio da {shop_name}</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Messaggio da {shop_name}</title>
</head>
<body>
<table style="font-family: Verdana,sans-serif; font-size: 11px; color: #374953; width: 550px;">
<tbody>
<tr>
Expand Down Expand Up @@ -39,7 +39,12 @@
<tr style="background-color: #b9babe; text-align: center;">
<th style="width: 15%; padding: 0.6em 0;">Riferimento</th><th style="width: 35%; padding: 0.6em 0;">Prodotto</th><th style="width: 15%; padding: 0.6em 0;">Prezzo unitario</th><th style="width: 15%; padding: 0.6em 0;">Quantit&agrave;</th><th style="width: 20%; padding: 0.6em 0;">Prezzo totale</th>
</tr>
<!-- Products -->{products} {discounts}<!-- Footer: prices -->
<tr>
<td colspan="5">{products}</td>
</tr>
<tr>
<td colspan="5">{discounts}</td>
</tr>
<tr style="text-align: right;">
<td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Prodotti</td>
Expand Down Expand Up @@ -113,6 +118,6 @@
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop&trade;</a></td>
</tr>
</tbody>
</table>
</body>
</table>
</body>
</html>

0 comments on commit 1d7aa55

Please sign in to comment.