Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

extended order status with email notifications

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 12-22-2005, 05:07 AM
 
Dorette Dorette is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 71
 

Default

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
__________________
Version 4.0.17
Reply With Quote
  #22  
Old 01-15-2006, 03:54 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default

Does anyone have this mod working successfully in version 4.0.17? The include/func.php is totally different.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #23  
Old 01-15-2006, 05:32 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

Yes fully working and no problems in version 4.0.17

/include/func.php Mod1

Code:
# # Mail template processing # $admin_notify = (($order_status == "Q") || ($order_status == "I" && $config["Email_Note"]["enable_init_order_notif"] == "Y")); $customer_notify = (($order_status == "Q" || $order_status == "I") && $config["Email_Note"]["enable_init_order_notif_customer"] == "Y");

/include/func.php Mod2

Code:
# mod.extended.order.status, add check for cancel elseif(($status == "D" && $order["status"] != "D" && $order["status"] != "F") || ($status == "X" && $order["status"] != "X" && $order["status"] != "D" && $order["status"] != "F")){ func_decline_order($orderid, $status); } # mod.extended.order.status, add check for cancel elseif(($status == "F" && $order["status"] != "F" && $order["status"] != "D" && $order["status"] != "X")){ func_update_quantity($order_data["products"]); if($current_area == 'C') $session_failed_transaction++; # mod.extended.order.status, email notifications for fail $userinfo =$order_data["userinfo"]; $to_customer = ($userinfo['language']?$userinfo['language']:$config['default_customer_language']); $mail_smarty->assign("products", func_translate_products($order_data["products"], $to_customer)); $mail_smarty->assign("order", $order); $mail_smarty->assign("customer", $userinfo); // send email notifications to customer if($config['Email_Note']['eml_oc_notif_failed'] == 'Y'){ func_send_mail($userinfo['email'],"mail/order_customer_failed_subj.tpl", "mail/order_customer_failed.tpl", $config["Company"]["orders_department"], false); } // send email notifications to admin if($config['Email_Note']['eml_oa_notif_failed'] == 'Y'){ $mail_smarty->assign("show_order_details", "Y"); func_send_mail($config["Company"]["orders_department"], "mail/order_admin_failed_subj.tpl", "mail/order_admin_failed.tpl", $config["Company"]["orders_department"], true, true); $mail_smarty->assign("show_order_details", ""); } }

/include/func.php Mod3

Code:
elseif ($status == "C" && $order["status"] != "C") { func_complete_order($orderid); } # mod.extended.order.status, check extended status and send email notifications for shipping, backordered, back in stock, process_return, refunded if($status == "S" || $status == "B" || $status == "K" || $status == "R" || $status == "U" || $status == "T"){ $userinfo =$order_data["userinfo"]; $to_customer = ($userinfo['language']?$userinfo['language']:$config['default_customer_language']); $mail_smarty->assign("products", func_translate_products($order_data["products"], $to_customer)); $mail_smarty->assign("order", $order); $mail_smarty->assign("customer", $userinfo); } switch($status){ //(S)hipping case "S": if ($order["status"] != "S") { if ($config['Email_Note']['eml_oc_notif_process_shipping'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_process_shipping_subj.tpl", "mail/order_customer_process_shipping.tpl", $config["Company"]["orders_department"], false); } break; //(B)ackordered case "B": if ($order["status"] != "B") { if ($config['Email_Note']['eml_oc_notif_backordered'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_backordered_subj.tpl", "mail/order_customer_backordered.tpl", $config["Company"]["orders_department"], false); } break; //(K) Back in Stock case "K": if ($order["status"] != "K") { if ($config['Email_Note']['eml_oc_notif_back_in_stock'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_back_in_stock_subj.tpl", "mail/order_customer_back_in_stock.tpl", $config["Company"]["orders_department"], false); } break; //(R) Process Return case "R": if ($order["status"] != "R") { if ($config['Email_Note']['eml_oc_notif_process_return'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_process_return_subj.tpl", "mail/order_customer_process_return.tpl", $config["Company"]["orders_department"], false); } break; //(U) Refunded case "U": if ($order["status"] != "U") { if ($config['Email_Note']['eml_oc_notif_refunded'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_refunded_subj.tpl", "mail/order_customer_refunded.tpl", $config["Company"]["orders_department"], false); } break; //(T) Bank Transfer case "T": if ($order["status"] != "T") { if ($config['Email_Note']['eml_oc_notif_bank_transfer1'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_bank_transfer_subj.tpl", "mail/order_customer_bank_transfer.tpl", $config["Company"]["orders_department"], false); } break; default: break; }

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 case "T": if ($order["status"] != "T") { if ($config['Email_Note']['eml_oc_notif_bank_transfer1'] == 'Y') func_send_mail($userinfo['email'],"mail/order_customer_bank_transfer_subj.tpl", "mail/order_customer_bank_transfer.tpl", $config["Company"]["orders_department"], false); } break;


/include/func.php Mod4

Code:
# # Decrease quantity in stock when "declined" or "failed" order is became "completed", "processed" or "queued" # # mod.extended.order.status, added cancelled and shipping to this check if ($status != $order["status"] && strpos("DFX",$order["status"])!==false && strpos("CPQS",$status)!==false) { func_update_quantity($order_data["products"],false); } } }

/include/func.php Mod5

Code:
if($config['Email_Note']['eml_order_p_notif_admin'] == 'Y') { # mod.extended.order.status, changed email template for processed func_send_mail($config["Company"]["orders_department"], "mail/order_admin_processed_subj.tpl", "mail/order_admin_processed.tpl", $config["Company"]["orders_department"], true, true); } $mail_smarty->assign("show_order_details", "");

/include/func.php Mod6

Code:
# # This function performs activities nedded when order is declined # status may be assign (D)ecline or (F)ail # (D)ecline order sent mail to customer, (F)ail - not # function func_decline_order($orderids, $status = "D") { global $config, $mail_smarty; global $sql_tbl, $to_customer; if(($status != "D") && ($status != "F") && ($status != "X")) return; if(!is_array($orderids))$orderids = array($orderids); foreach($orderids as $orderid) {

/include/func.php Mod7

Code:
# mod.extended.order.status, send email notifications for cancel else if($status == "X"){ $mail_smarty->assign("customer",$userinfo); $mail_smarty->assign("products",$products); $mail_smarty->assign("giftcerts",$giftcerts); $mail_smarty->assign("order",$order); $to_customer = func_query_first_cell ("SELECT language FROM $sql_tbl[customers] WHERE login='$userinfo[login]'"); if(empty($to_customer)) $to_customer = $config['default_customer_language']; $mail_smarty->assign("products", func_translate_products($products, $to_customer)); // send email notification to customer if($config['Email_Note']['eml_oc_notif_cancelled'] == 'Y') { func_send_mail($userinfo["email"], "mail/order_customer_cancelled_subj.tpl","mail/order_customer_cancelled.tpl", $config["Company"]["orders_department"], false); } // send email notification to admin if($config['Email_Note']['eml_oc_notif_cancelled'] == 'Y') { $mail_smarty->assign("show_order_details", "Y"); func_send_mail($config["Company"]["orders_department"], "mail/order_admin_cancelled_subj.tpl", "mail/order_admin_cancelled.tpl", $config["Company"]["orders_department"], true, true); $mail_smarty->assign("show_order_details", ""); } }

The above is my working 4.0.17 func.php code for this custom mod.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #24  
Old 02-07-2006, 04:19 PM
 
electronics4less electronics4less is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 38
 

Default

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.
__________________
X-cart v4.0.8
Reply With Quote
  #25  
Old 02-10-2006, 12:21 AM
 
shirtshop shirtshop is offline
 

Senior Member
  
Join Date: Nov 2002
Posts: 127
 

Default

is this mod also for 3.5.10 ? Who can help us with install? give me your price.
__________________
ver 3.5.10 with a lot of customizing
now testing 4.4.1 smartytemplate
Reply With Quote
  #26  
Old 08-16-2006, 09:34 PM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default

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.
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #27  
Old 12-24-2006, 10:16 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: extended order status with email notifications

thanks!
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #28  
Old 12-26-2006, 07:34 PM
 
artist122 artist122 is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 43
 

Default Re: extended order status with email notifications

Has any one got this working for 4.1.3
__________________
Anthony
www.ambfurniture.com

X-cart Version 4.6.1 Newly updated
Reply With Quote
  #29  
Old 12-30-2006, 09:34 AM
 
fractalspin fractalspin is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 72
 

Default Re: extended order status with email notifications

Could someone please post the complete walkthrough for the latest version?
__________________
http://www.fractalspin.com
nerdy jewelry, geekcessories, bags, tshirts and other neat stuff

Xcart Version: 4.0.17, PHP: 4.3.11, MySQL server: 4.1.13-standard-log
Reply With Quote
  #30  
Old 01-03-2007, 09:02 AM
 
Ed May Ed May is offline
 

Newbie
  
Join Date: Dec 2006
Posts: 1
 

Default 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.
__________________
X-Cart Gold Version 4.1.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:22 PM.

   

 
X-Cart forums © 2001-2020