[-] BO : #PSCFV-2553 : fix bug html for email order_conf.html

This commit is contained in:
lLefevre
2012-05-29 16:37:28 +00:00
parent 492f42176b
commit 1d7aa551f5
6 changed files with 63 additions and 26 deletions
+14 -2
View File
@@ -560,8 +560,8 @@ abstract class PaymentModuleCore extends Module
'{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1),
'{carrier}' => $virtual_product ? $this->l('No carrier') : $carrier->name, '{carrier}' => $virtual_product ? $this->l('No carrier') : $carrier->name,
'{payment}' => Tools::substr($order->payment, 0, 32), '{payment}' => Tools::substr($order->payment, 0, 32),
'{products}' => $products_list, '{products}' => $this->formatProductAndVoucherForEmail($products_list),
'{discounts}' => $cart_rules_list, '{discounts}' => $this->formatProductAndVoucherForEmail($cart_rules_list),
'{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false), '{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_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), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false),
@@ -630,6 +630,18 @@ abstract class PaymentModuleCore extends Module
} }
} }
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 * @param Object Address $the_address that needs to be txt formated
* @return String the txt formated address block * @return String the txt formated address block
+7 -2
View File
@@ -32,11 +32,16 @@
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<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 --> <table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody> <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> <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;"> <tr style="text-align: right;">
<td>&nbsp;</td> <td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Produkte</td> <td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Produkte</td>
+6 -1
View File
@@ -36,7 +36,12 @@
<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title --> <table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody> <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> <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;"> <tr style="text-align: right;">
<td>&nbsp;</td> <td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Products</td> <td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Products</td>
+6 -1
View File
@@ -36,7 +36,12 @@
<table style="width: 100%; font-size: 11px; color: #374953;"><!-- Title --> <table style="width: 100%; font-size: 11px; color: #374953;"><!-- Title -->
<tbody> <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> <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;"> <tr style="text-align: right;">
<td>&nbsp;</td> <td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Productos</td> <td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Productos</td>
+6 -1
View File
@@ -36,7 +36,12 @@
<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title --> <table style="width: 100%; font-family: Verdana,sans-serif; font-size: 11px; color: #374953;"><!-- Title -->
<tbody> <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> <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;"> <tr style="text-align: right;">
<td>&nbsp;</td> <td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Total produits</td> <td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Total produits</td>
+6 -1
View File
@@ -39,7 +39,12 @@
<tr style="background-color: #b9babe; text-align: center;"> <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> <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> </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;"> <tr style="text-align: right;">
<td>&nbsp;</td> <td>&nbsp;</td>
<td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Prodotti</td> <td style="background-color: #b9babe; padding: 0.6em 0.4em;" colspan="3">Prodotti</td>