Adding conditional code to emails
Hi all, just wondering what file i would need to edit to add some code to the 'welcome' and 'order updates' emails?
If possible, Id like to include some code if it equals a certain zone ID - in other words, there some extra wording I want to include for international customers.
Thanks in advance,
Scott. :smile:
Re: Adding conditional code to emails
i would imagine you might want to create a new function that is similar to the send_order_email() function, and then add whatever logic you like for your restrictions on content there. this function is located in the file includes/classes/order.php.
not sure about changes to the order, but i'd imagine their would be a similar function in the admin classes folder for status changes and such. please don't blame me if it doesn't work though, as I've not tried altering this before!
andrejs
Re: Adding conditional code to emails
sorry, forgot to mention this function is called from includes/modules/checkout_process.php, so once you create your new function make sure to call it from this file instead of the original.
Re: Adding conditional code to emails
Hi Andre, thats great thanks, this at least points me in the right direction. :smile:
Cheers,
Scott.
Re: Adding conditional code to emails
LOL .. actually it points you in completely wrong directions, at least as far as filenames are concerned. Neither of those files has anything to do with welcome emails or order-status-update emails.
welcome emails = create_account module
order-status-updates = admin orders.php
Re: Adding conditional code to emails
Hmm ok, thanks. :cool:
I wish I had more of a programming background at times like this... :blush:
Re: Adding conditional code to emails
...and i wish i had read your initial email properly. please accept my apologies, must have been way past my bedtime, as i was on a completely different tangent...
Re: Adding conditional code to emails
No harm done, and no apology required Andre.. Im sure I wouldnt muddled my way through to the right file eventually! :smile: