...

View Full Version : Adding a postcode / zipcode to an email subject line



ronnieb
09-09-2011, 10:25 AM
Hi
I am presently using opencart, and need to add a postcode / zipcode to the subject line that the admin gets (when an order is placed)


and the line is

213
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);I think the database wording is
payment_postcode

but Im guessing the correct variable will be somewhere in the file below


how do I do this

any help greatly appreciated

the script is attached as its to long to post



thanks

Inigoesdr
09-09-2011, 05:19 PM
To update it properly you should change the format of text_new_subject and add an argument to the sprintf() (http://php.net/sprintf) function. But, you can simply append it like so:

$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id) . ' Postal Code: ' . $order_info['payment_postcode'];
// Or
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
$subject .= ' Postal Code: ' . $order_info['payment_postcode'];

ronnieb
09-09-2011, 07:31 PM
Thank you so much, it works perfectly !!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum