echo code with define

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
barryjenkins
Forum Newbie
Posts: 3
Joined: Sun Dec 18, 2011 5:09 pm

echo code with define

Post by barryjenkins »

Hi All,

I am a newbie here, I have been modifying various code in our webshop and i am having trouble with some PHP code, that I am hoping may be able to get some help/assistance guidance. I have not been able to get the code right for some reason.

Anyway I wanted to input a friendly greeting on the email that gets sent after a customer places an order so I have tried to enter this, but does not seem to come up. Do i need to enter this as a function or something? See the full code below where I inserted into the PHP.

Any help would be greatly appreciated!!!!

Thanks in Advance!

echo('Thank you for your valued order, which will be depatched as soon as possible. Please find below details of your order. If you have any queries please contact us on 1300 131 545');

Code: Select all

*/

define('EMAIL_TEXT_SUBJECT', 'Order Process');
echo('Thank you for your valued order, which will be depatched as soon as possible. Please find below details of your order. If you have any queries please contact us on 1300 555 555');
define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:');
define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:');
define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:');
define('EMAIL_TEXT_PRODUCTS', 'Products');
define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:');
define('EMAIL_TEXT_TAX', 'Tax:        ');
define('EMAIL_TEXT_SHIPPING', 'Shipping: ');
define('EMAIL_TEXT_TOTAL', 'Total:    ');
define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address');
define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address');
define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');

define('EMAIL_SEPARATOR', '------------------------------------------------------');
define('TEXT_EMAIL_VIA', 'via');
define('TEXT_SHIPWIRE_TRANSACTION_ID', 'Shipwire Fullfillment Transaction Successful. Transaction ID: ');
?>
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: echo code with define

Post by mikosiko »

See the full code below where I inserted into the PHP
that is not the full code (or the relevant one)... that is showing only a group of constants definitions... the echo is completely out of place the there.
but does not seem to come up
"come up" where?

post your relevant code, in that way someone could offer better help
barryjenkins
Forum Newbie
Posts: 3
Joined: Sun Dec 18, 2011 5:09 pm

Re: echo code with define

Post by barryjenkins »

Thanks Mikosiko,

I think i may need to add the define and create a new EMAIL_GREETING under the languages area for checkout_process.php there and then call this up under the root checkout_process.php? may be easier to do this as have.

I think this is the correct code, can i just enter an echo in here?

{
$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
Post Reply