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
  #41  
Old 10-31-2007, 04:08 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: extended order status with email notifications

OK so I found the problem, there is a line of code that tells func_order.tpl which codes are allowed e.g. $allowed_order_status = 'IQPBDFCXSRUK'; although I have now added the new codes to this line, so far so good, the mod is now working, although I need to do a little more testing.

I will be happy to share what essentially needs changing to make it 4.1.8 and 4.1.9 compatible.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #42  
Old 11-01-2007, 06:44 AM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: extended order status with email notifications

Hi All, well it was late last night when I made my last post and when I checked everything this morning whilst I had managed to get the status to change the emails weren't being sent, but I have now fixed that too and so far it all seems to be fully functional.

It seemed that the mod was just skipping all the new options, those that already existed but had just been amended continued to function so I Q P C were still as before but with enhanced emails.

Anyway, it now appears to be working well and I am quite pleased with myself.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #43  
Old 11-05-2007, 04:55 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: extended order status with email notifications

I really need the system to send out an email when selecting backordered - Im running v4.1.9, I would also be interested in seeing the coding for v4.1.x
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote
  #44  
Old 11-05-2007, 11:00 AM
  2coolbaby's Avatar 
2coolbaby 2coolbaby is offline
 

eXpert
  
Join Date: Sep 2004
Location: TN moving to FL
Posts: 265
 

Default Re: extended order status with email notifications

I would also like to get instructions for 4.1.8. I have been pretty much having to set non-normal orders to queued.
__________________
Mary Lee
-------------------
Dinner and a Murder Mystery Games
http://www.dinnerandamurder.com

x-cart version 4.7.5 / Mac OS 10.10.5 and Windows 8/10 sometimes - Ideal Responsive Template
Reply With Quote
  #45  
Old 11-09-2007, 02:31 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: extended order status with email notifications

sorry guys been busy, give me a few more days and I will add the changes I made to the code that now works a charm here for you.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #46  
Old 12-03-2007, 10:56 AM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default Re: extended order status with email notifications

I am also really interested in the code the get this working for 4.1.X an updates?

Thanks a lot
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #47  
Old 01-23-2008, 01:13 PM
  chamberinternet's Avatar 
chamberinternet chamberinternet is offline
 

X-Wizard
  
Join Date: Sep 2005
Location: Lancashire, UK
Posts: 1,470
 

Default Re: extended order status with email notifications

Quote:
Originally Posted by chris.barber
sorry guys been busy, give me a few more days and I will add the changes I made to the code that now works a charm here for you.

Any update on on releasing the full mod for 4.1.x ?

Thanks

Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!)
Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x
Multiple Instances of X-Cart
MySQL 5.6.37
CentOS 7.4


Chamber Internet
- Lancashire, United Kingdom
http://www.chamberelancs.co.uk
Reply With Quote
  #48  
Old 01-28-2008, 02:09 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: extended order status with email notifications

Sorry again guys, this is the first chance I have had to even get on here, I will try and make time this week, but don't hold your breath, the business has started slowly and is growing but I had to go get a job to pay the bills, so my days are now full so I will try and do something by the end of the week.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #49  
Old 01-28-2008, 02:28 PM
 
chris.barber chris.barber is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 74
 

Default Re: extended order status with email notifications

OK so I followed the instructions in the first post, but when I got to mod3 of func, which is actually in /include/func/func.order.php I amended the code to look like this...

Quote:

// 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", "");
}
}
elseif ($status == "C" && $order["status"] != "C") {
func_complete_order($orderid);
}
if ($status == "B" && $order["status"] != "B") {
$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);
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);
}
if ($status == "S" && $order["status"] != "S") {
$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);
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);
}
if ($status == "K" && $order["status"] != "K") {
$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);
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);
}
if ($status == "R" && $order["status"] != "R") {
$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);
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);
}
if ($status == "U" && $order["status"] != "U") {
$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);
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);


You also need to make sure you add all the codes so that about a screen and a half upwards you get the following:

Quote:

# This function change order status in orders table
#
function func_change_order_status($orderids, $status, $advinfo="") {
global $config, $mail_smarty, $active_modules, $current_area;
global $sql_tbl;
global $session_failed_transaction;

$allowed_order_status = 'IQPBDFCXSRUK';
if (!strstr($allowed_order_status, $status))
return;

It's the allowed order status bit you need to match to your new statuses.

I hope that helps, alternatively if anyone wants a copy of my func.order.php to do a compare on then just ask and I will send it to you.

It's been a while since I updated this mod to make it work and I really should have documented it at the time, but it has worked flawlessly for me since I did it.
__________________
Chris Barber
Version 4.1.9
MOD - BCSE Shipping Estimator
MOD - Shopzilla Feed
MOD - Price Match with Captcha
MOD - Links Manager 2008
MOD - One Page Checkout
MOD - Sitemap
Reply With Quote
  #50  
Old 02-28-2008, 10:02 AM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: extended order status with email notifications

I would like to see your func.order.php . the above post is a bit confusing.

thanks
__________________
4.4
Code:
Hello World
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 04:10 AM.

   

 
X-Cart forums © 2001-2020