Sorry for the delay in response. Sometimes they fall through the cracks:)
Open this file: catalog/model/checkout/order.php
Find this line:
Make it look like this:
So, all we did was grab the product description while inside the existing foreach loop, and added it to the array.
Now open up: catalog/view/theme/default/template/mail/order.tpl
Find this line:
After that put this:
Now find this:
And add this below it:
NOTE: You might run into spacing issues because descriptions can be long. If this is the case then you will want to re-structure your Mail Template to make it fit properly.
Open this file: catalog/model/checkout/order.php
Find this line:
Code: Select all
$template->data['products'][] = array(
'name' => $product['name'],
'model' => $product['model'],
'option' => $option_data,
'quantity' => $product['quantity'],
'price' => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value']),
'total' => $this->currency->format($product['total'], $order_info['currency_code'], $order_info['currency_value'])
);
Code: Select all
$order_product_description_query = $this->db->query("SELECT description FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product['id'] . "'");
$description = html_entity_decode($order_product_description_query->row['description'], ENT_QUOTES, 'UTF-8');
$template->data['products'][] = array(
'name' => $product['name'],
'description' => $description,
'model' => $product['model'],
'option' => $option_data,
'quantity' => $product['quantity'],
'price' => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value']),
'total' => $this->currency->format($product['total'], $order_info['currency_code'], $order_info['currency_value'])
);
Now open up: catalog/view/theme/default/template/mail/order.tpl
Find this line:
Code: Select all
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;"><?php echo $text_product; ?></td>
Code: Select all
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; background-color: #EFEFEF; font-weight: bold; text-align: left; padding: 7px; color: #222222;"><?php echo "Description"; ?></td>
Code: Select all
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><?php echo $product['name']; ?>
<?php foreach ($product['option'] as $option) { ?>
<br />
<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?></td>
Code: Select all
<td style="font-size: 12px; border-right: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD; text-align: left; padding: 7px;"><?php echo $product['description']; ?></td>
hi avvici, i have following all the steps, but it is not working, nothing appear on the description column. please help! Also what code i have to add if i have 2 languages for the description?
thank you!
thank you!
Attachments
mail.jpg (222.55 KiB) Viewed 4603 times
hi, i'm working with febelam, all code is fine, but the query line:
$order_product_description_query = $this->db->query("SELECT description FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product['id'] . "'");
the col name should be $product['product_id'],
thanks alot.
$order_product_description_query = $this->db->query("SELECT description FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product['id'] . "'");
the col name should be $product['product_id'],
thanks alot.
Who is online
Users browsing this forum: No registered users and 67 guests