Jump to content

Mail alerts - add new field to new_order template


Recommended Posts

Hi,

I would like to add the [available_message] field (from product_lang table) to the product name in the mail alerts module, in the mail to the admin - new_order.

 

In the file: /modules/mailalerts/MailAlert.php

in function: public static function getProducts ($ customer, $ id_lang)

I added to the SQL query:

SELECT ma.`id_product`, p.`quantity` AS product_quantity, pl.`name`, pl.`available_now` AS availability_message, ma.`id_product_attribute`

 

Next, in the file: /modules/mailalerts/mailalerts.php

I added in line 310 (to $items_table) in function: public function hookActionValidateOrder($params)

 

<td style="padding:0.6em 0.4em;">
                        <strong><a href="'.$url.'">'.$product['product_name'].'</a>'
                            .(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '')
                            .(!empty($customization_text) ? '<br />'.$customization_text : '')
                            .$product['availability_message']
                        .'</strong>
                    </td>

 

Unfortunately, it still doesn't work.

Information about availability doesn't come in the email to the admin.

 

Could you please help me? Thank you in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...