![]() |
extended order status with email notifications
Hi all,
I have seen requests and solutions for bits and pieces of various order status along with email notifications all over the forum. I was also in need of this so I added more order status along with email notifications which can be enabled or disabled from email notificaitons menu in general settings from admin. This was modified for Version 4.0.13, but I imagine it should work with 4.xx unless there was some major changes to include/func.php 4.xx versions. The functions are complete but the body of each email template is quite generic, just showing the order id, date and invoice. It would be nice to customize each template for each status to make it more meaniful for the customers. I don't have time to do this right now, however, if you already have something like this for various statuses shown below, I am sure everyone would appreciate it if you share your template code. I am posting this mod in hope that everyone could benefit from this. It would be great if others can post additions to this mod of other status I haven't thought about or detailed HTML email templates for some of these status. Enjoy. :) ~x-light ---------- readme.txt ---------- Description: This mod adds additional order status along with email notifications to either customer and/or administrators. These notifications can also be enabled or disabled via the email notifications. Key feature: * added the following status - cancelled, process shipping, back in stock, process return, refunded, fraud * the cancel status has the same logic as declined or failed, that is quantities are automatically updated and/or coupons, giftcerts are rolled back * the shipping has the same logic as queued, processed, or complete * moved existing email options related with order under Order Notifications Options starting at orderby number 2000 (check update_tables.sql for details) To Do: * modify the body of the email templates to make each status message more meaniful to customers and administrators * add body of the email templates for plain text (not really needed right now) Modified for X-Cart Gold: Version 4.0.13 stock Tested with: Version 4.0.13 stock Apache 1.33, OpenSSL 0.9.6b, PHP 4.3.10, SQL 4.0.22 Intended Audience: This mod requires changes to various php, tpl files and some sql table(s) as well as outlined in "General Overview" below. If you are a store owner and have met the requirements for the modified and tested X-Cart versions, you can follow the instructions below and it should work. However, if you intend to make this mod work with previous X-Cart versions or make any changes to this mod, it is recommended that you hire a developer with development and coding knowledge to perform this task. Disclaimer: This mod may work on other X-Cart versions, but it has not been tested. Therefore, use it at your own risk. We are not responsible for any loss in sales, time spent or damages that is direct or indirectly caused by this modification to your store. By using this modification, you have agreed all the terms to the license agreement and hold all personel indemfiable and harmless including but not limited to owners, shareholders, stakeholders, employees, contractors, or anyone else related to the business. License: Standard Open Source / Freeware As usual, always backup your current store or try it on a development store before integrating this with production. General Overview: sql table modification xcart_config files modified application logic related: include/func.php template related: skin1\main\order\order_status.tpl various tpl files in skin1\mail various tpl files in skin1\mail\html language files: lang.txt.csv (comma delimited) each code section which has been modified has the comment header: mod.extended.order.status Instructions: Prerequisites: BACKUP, BACKUP, BACKUP!! Installation: 1. update sql table using ssh or sql patch from admin menu If using ssh, issue command: "mysql -u username -p dbname < update_tables.sql" If using sql patch just upload the update_tables.sql file 2. modify code a. match the code section under the "find original code snippet" and "end original code snippet" with your source b. replace original code section with the code section under the "replace modified code snippet" 3. repeat step 2 for each php and template files until all are done 4. import the language file used in this modifications "lang.txt.csv" under language settings in admin ---------- update_tables.sql ---------- Code:
# this script will update the 'orderby' field for all order status and Code:
"txt_thankyou_for","Thank-You for","Thank-You for","Text" Code:
{* $Id: order_status.tpl,v 1.4 2004/05/28 12:21:03 max Exp $ *} Code:
---------- mod1 ---------- ALL EMAIL SUBJECT TEMPLATES (skin1/mail) ---------- ---------- decline_notification_subj.tpl ---------- Code:
{* mod.extended.order.status *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status *} Code:
{* mod.extended.order.status *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status templates *} Code:
{* mod.extended.order.status *} ---------- ALL HTML EMAIL BODY TEMPLATES (skin1/mail/html) ---------- Warning, some of these templates are hard coded in US language and rather incomplete. Please check them before using them in your real store! ---------- order_admin_cancelled.tpl ---------- Code:
{* mod.extended.order.status templates - order_admin_cancelled.tpl *} Code:
{* mod.extended.order.status templates - order_admin_failed.tpl *} Code:
{* mod.extended.order.status templates - order_admin_processed.tpl *} Code:
{* mod.extended.order.status templates - order_customer_back_in_stock.tpl *} Code:
{* mod.extended.order.status templates - order_customer_backordered.tpl *} Code:
{* mod.extended.order.status templates - order_customer_cancelled.tpl *} Code:
{* mod.extended.order.status templates - order_customer_failed.tpl *} Code:
{* mod.extended.order.status templates - order_customer_process_return.tpl *} Code:
{* mod.extended.order.status templates - order_customer_process_shipping.tpl *} Code:
{* mod.extended.order.status templates - order_customer_refunded.tpl *} |
Thank you for your HUGEEEE writing dude. Eventho i might not do it but it is impressive custom mods and great attribution.
|
Has anyone tried this ????
It sounds really great. |
Hello x-online,
Quote:
Your welcome. I developed these mods since I need them for my store as well. I am sharing them so hopefully people can benefit from them, give their opinions and even improve on them. Also, it would be great if someone can start customizing the contents of some of these email messages. I just don't have the time to do this, but if I ever get to it, I will post them as well. Hi jmell, Quote:
Unfortunately I can't say I have since I only have access to the latest 4.0.x branch. However if the sql fields for config table is the same and the code in func.php is similar. You may have to do some slight modifications to make it work. If you follow the code in how and where these notifications are being sent in the func.php, it should all make more sense. Good luck. ~x-light |
We just installed this in X-Cart version 4.0.14 and it works perfect. Thank you so much for posting this.
Awesome work!! |
Hello jcnelson,
Your welcome. I am glad it worked for 4.0.14 as well. ~x-light |
Hi,
Its a really great mod, but I cant find the places where to put codes in func.php i searched allot but cant find it. |
Hello eaglemobiles,
Humm... Are you using 4.0.11 for your cart? This mod was tested with 4.0.13, but I can't imagine that the func.php in 4.0.11 is that different from the 4.0.13. ~x-light |
Has anybody done this for 4.0.16 :?:
|
I have implimented this successfully in 4.0.13 and 4.0.15 stores. Took about an hour for me to do both stores. All I can say is "WOW"! My orders department NEEDED this! It is obvious that a lot of thought, time, effort and energy was put into this mod. Thanks for sharing!!
|
We have worked to personalize our business as much as possible, so I've played around with the e-mails to make them easier to edit the messages being given to the customer. I also took the invoices out of the e-mails because they were redundant. The e-mail already had the ordered item information in it.
I used two new language labels in each e-mail. One for the general text, and one for a signature (eml_order_status_signature) that was consistent throughout all the e-mails. Create a new csv to be imported into languages, or add it to the lng.txt.csv from above. This can be used as a starting point for your language lable text: Code:
eml_order_status_signature,Orders department,Orders department,E-Mail now use these .tpl's for the e-mails: order_customer_back_in_stock.tpl Code:
{* mod.extended.order.status templates - order_customer_back_in_stock.tpl *} order_customer_backordered_tpl Code:
{* mod.extended.order.status templates - order_customer_backordered.tpl *} order_customer_cancelled.tpl Code:
{* mod.extended.order.status templates - order_customer_cancelled.tpl *} order_customer_process_return.tpl Code:
{* mod.extended.order.status templates - order_customer_process_return.tpl *} order_customer_process_shipping.tpl Code:
{* mod.extended.order.status templates - order_customer_process_shipping.tpl *} order_customer_refunded.tpl Code:
{* mod.extended.order.status templates - order_customer_refunded.tpl *} here is an example of the results of the language labels: Quote:
I have changed all of my customer e-mails to use this two language label method so I can quickly change either the message being given to customers or the signature through the languages section in the admin, while keeping the look consistent. Please look through the language csv before uploading to alter it to your needs. I also make no promises about spelling. :wink: I hope some find this helpful! A big thanks to x-ligh for sharing this great mod!!!! |
x-cart so need to take a good look at this post, 4.1 should have this by default.
The declined status is a classic example, it always causes customers offence, the mod above is an excellent way of showing how it should be implemented. Very well done :D |
Just to let you know this works ok on 4.0.17 as well. The func.php was as described in the above text file.
|
Just a quick question for x-light.
In the text of order_admin_failed.tpl you have: Quote:
and in the text in order_customer_refunded.tpl you have: Quote:
What are these supposed to do, and how did you use them effectively? Thanks! |
You would enter your own text, mine was:
order_admin_failed.tpl : [*]You did not complete your order [*]You canceled your order before paying order_customer_refunded.tpl: I wanted to drop you this note to let you know that your return has been processed, and a credit has been issued |
Hello all,
Sorry, I didn't get a chance to respond to this thread recently. Been extremely busy lately with multiple projects. I am very delighted that people are finding this mod useful. I implemented this mod to my store as well and it does work great! HWT, many thanks for adding the language contents to the other order status. Keep up the good work, everyone! BTW, I will be sending a post regarding my first live store. Would appreciate it if I can get some feedbacks. ~x-light |
That's what I figured, ShishaPipeUK. What caught me was that the _blank_ was in the middle of the sentance, and unless you have a 1 item or 1 price shop, it would have to be dyanmically generated somehow.
Quote:
|
I was able to install the mod,
But as admin I am able to received emails but not the customer, which file should I take a look at |
I am now able to send emails to cutomers but they receive them the next day, how do I fix that,
As admin I am able to receive mine immediately the order is placed, but the customers receive it the day after. Is there a file I have to fix. |
Quote:
If you are able to receive email on the admin side, you should definitely able to receive email on the customer side. This is because both type of notifications uses the same function call to send the email. So I think there should be nothing wrong this the script. Maybe this is a host related issue and your host can help you out more. Good luck. ~x-light |
it was definitely a problem on the host side.
apparently I had a huge number of bounced emails due to spam sitting in a queue waiting to be sent. I has all been cleared now Thank you all |
Does anyone have this mod working successfully in version 4.0.17? The include/func.php is totally different.
|
Yes fully working and no problems in version 4.0.17
/include/func.php Mod1 Code:
# /include/func.php Mod2 Code:
# mod.extended.order.status, add check for cancel /include/func.php Mod3 Code:
elseif ($status == "C" && $order["status"] != "C") { I also added a email to send to a customer when there payment order was by Bank Transfer, you can of cause delete the bottom bit as it was not in the original code by X-Light. If you do not want the bank transfer email in the above func.php mod3 then delete: Code:
//(T) Bank Transfer /include/func.php Mod4 Code:
# /include/func.php Mod5 Code:
if($config['Email_Note']['eml_order_p_notif_admin'] == 'Y') { /include/func.php Mod6 Code:
# /include/func.php Mod7 Code:
# mod.extended.order.status, send email notifications for cancel The above is my working 4.0.17 func.php code for this custom mod. |
X-light is the man..his email mod worked perfectly and now this..
Thanks again X-light! Also this was on v4.0.9. Note for newbies like me, for the lng.txt.csv, when importing be sure to select Comma as the delimeter. Otherwise won't read all of the labels. |
is this mod also for 3.5.10 ? Who can help us with install? give me your price.
|
it seems the emails are not coming throught properly. Cant understand it as i followed the mod to a T. so it should work perfectly.
|
Re: extended order status with email notifications
thanks!
|
Re: extended order status with email notifications
Has any one got this working for 4.1.3
|
Re: extended order status with email notifications
Could someone please post the complete walkthrough for the latest version?
|
Re: extended order status with email notifications
I'm also interested these changes but for X-Cart 4.1.x
From my inital examination it appears that there is no longer a func.php this has been broken out into separate files in a include/func/ Thanks. |
Re: extended order status with email notifications
this mod is something ive wanted to do to my cart for sometime. I was thinking I was going to have to get someone to custom code this for me. Thank you very much for this x-light :)
|
Re: extended order status with email notifications
anyone have this working for 4.1.6?
|
Re: extended order status with email notifications
Quote:
Anyone? |
Re: extended order status with email notifications
Great Mod. We also need a hold status, with admin and cust notifications. Anyone know how to do this?
thanks |
Re: extended order status with email notifications
Bump.
So anyone tried installing this mod on a 4.1.x system? |
Re: extended order status with email notifications
Quote:
I've installed it on 4.1.8 with some modifications to support the following status states and notification messages:
|
Re: extended order status with email notifications
Gardel,
After looking at include/func/func.order.php file (for version 4.1.8 ), I couldn't find where most of the code modifications go. Is there any chance you can post the mods you made? Specifically, I am looking to add "Waiting for Payment" (for money orders), "Backordered" (for items out of stock), "Canceled" (for canceled orders), and "Refunded" (for refunds to credit cards), all with customer emails being sent. I have the AOM module but it does not send emails for these (why not for "canceled" I have no idea). Anyway, any help would be appreciated. |
Re: extended order status with email notifications
I would be interested in seeing a detailed instalation for this mod in 4.1.8.
|
Re: extended order status with email notifications
I too would be interested in a complete posting for 4.1.8 as well.
|
Re: extended order status with email notifications
Gardel or anyone else who can help, I am running 4.1.9, but this is almost identical to 4.1.8 so I would also be interested in anything else you changed, I think I am just about there with getting this to work, the only issue I have is the order_status.tpl file is not right, and I have tried all combinations to fix it, the problem I have is if I pick shipping for example as the status, the tool goes through the process of updating it and then returns to the orders management screen with the status unchanged.
Any ideas anyone? |
All times are GMT -8. The time now is 05:34 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.