![]() |
Send order notification to multiple email addresses
I must have overlooked this or misunderstood how to get this done.
Is it possible to let the shop send order notifications to multiple mail addresses (with X-Cart 4.2.x)? At the moment only this (one address) is accepted, for example: sales@myshop.com I tried adding an extra address like this: sales@myshop.com,anothermailaddress@theinternet.com sales@myshop.com, anothermailaddress@theinternet.com But this isn't accepted by the system i.e. resulting in an error message. |
Re: Send order notification to multiple email addresses
You can go in and modify the PHP to send to multiple addresses. It would probably be easier to just use your server and forward the email address to multiple parties. http://www.systemsabuse.com/2008/04/29/creating-a-single-forward-to-multiple-email-addresses-with-cpanel/
|
Re: Send order notification to multiple email addresses
Thanks for the pointer, but unfortunately the cPanel solution is not available since this specific webshop is using its own (external) mail servers.
You have any idea what php file should be modified and how this can be done? |
Re: Send order notification to multiple email addresses
I would think that any mail server would allow forwarding. Well anyway, I believe that include/func/func.order.php would control sending the mail.
I see this around line 1438 in 4.4.X Code:
if ($admin_notify) { |
Re: Send order notification to multiple email addresses
That mail server can forward of course but it should not, a bit difficult to explain why not. :)
I will take a look at the function php file, thanks again! |
Re: Send order notification to multiple email addresses
I think that all you will need to change is the code that checks for a valid email address. This is the function func_email_validation_regexp which is in include/func/func.core.php. You need to add a comma to the allowed characters of the email address.
|
Re: Send order notification to multiple email addresses
Quote:
|
Re: Send order notification to multiple email addresses
This SQL patch does the trick... (v4.4.x - v4.5.x)
Code:
REPLACE INTO xcart_config VALUES ('orders_department','Orders department email address','first@email.com,second@email.com','Company',330,'text','','','email');The others available are... Code:
REPLACE INTO xcart_config VALUES ('site_administrator','Site administrator email address','first@email.com,second@email.com','Company',310,'text','','','email');The caveat is that where emails are displayed elsewhere in your store, it will show both, so you may need to adjust / hard code the order invoice etc. |
Re: Send order notification to multiple email addresses
Hi PhilJ
I've tried your patch on 4.6.4 and it keeps giving me error. I have tried every variation; adding a space between the commas, switching up the email addresses, changing "REPLACE" to "INSERT". I even tried editing the "xcart_data.sql" file in SQL Server rather than uploading the patch through x-cart. Please help, do you have any more information on this? |
Re: Send order notification to multiple email addresses
Danielle, it would be helpful if you could explain what the error message said.
|
| All times are GMT -8. The time now is 07:47 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.