Everything else is done, but email_template_checkout.html.
I found from a thread on this forum's (How do I modify the text in a 'checkout email'?) that I have to modify /includes/classes/order.php file to make the changes.
At around line 176 I have added:
$dataFinalSale = "SELECT products_final_sale FROM " . TABLE_PRODUCTS . " where products_id = " . (int)$products['id'];
$result = $db->Execute($dataFinalSale);
if (!$result->EOF){
echo '<br><span class="alert bold">' . $result->fields['products_final_sale'] . '</span>' ;
}
I have also added $result->fields['products_final_sale'] to the following
// build output for email notification
$this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
$currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
$this->products_ordered_attributes . "\n";
$this->products_ordered_html .=
'<tr>' . "\n" .
'<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . ' x</td>' . "\n" . $result->fields['products_final_sale'] .
'<td class="product-details" valign="top">' . nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" .
'<nobr>' .
'<small><em> '. nl2br($this->products_ordered_attributes) .'</em></small>' .
But I am not getting the products_final_sale message from the products table.
I have also noticed that through the file (int)$order_id is used, but I can not see and match the relation between (int)$order_id and ** (int)$products_id** found in zen_orders_products table.
I know I am **not **matching the products_id, but at this point I am lost.