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

Email Confirmation - Order Status Modification

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2004, 02:38 PM
 
UserBU UserBU is offline
 

Member
  
Join Date: Nov 2003
Posts: 16
 

Default Email Confirmation - Order Status Modification

How can one change it so that the order status shows the entire word, instead of the letter in the email confirmations? For example, 'Processed" instead of 'P." I know the variable is '$order_status', but where is it defined?

Will unticking "Enable email notifications for customers about initially placed orders" prevent customers from receiving "I" or "F" email confirmations?

Thanks in advance.

---------------------------------------------------------------
Versions 3.5 & 3.53
Reply With Quote
  #2  
Old 03-01-2004, 03:14 PM
 
dsparks dsparks is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 34
 

Default Email Confirmation - Order Status Modification

As far as I know the order status will always display in the single letter format.

What I did was create a Smarty template to take care of this. This way I only have the order status descriptions in one location.

I created a new file named "modifier.orderstatus_format.php" and placed this file in the "Smarty-2.5.0/plugins" directory.

This file contains the following information:

<?php

/*
* Smarty plugin
* -------------------------------------------------------------
* Type: modifier
* Name: orderstatus_format
* Purpose: format order status
* Input: string: input order status code
* -------------------------------------------------------------
*/

function smarty_modifier_orderstatus_format($string)
{

if ($string == 'I') return 'Not finished';
elseif($string == 'Q') return 'Queued';
elseif($string == 'P') return 'Processed';
elseif($string == 'B') return 'Back ordered';
elseif($string == 'D') return 'Declined';
elseif($string == 'F') return 'Failed';
elseif($string == 'C') return 'Complete';
else return 'Unknown';

}

?>



I then changed the line in the file "skin1/mail" from:

{$lng.lbl_order_status}: {$order.status}


to:


{$lng.lbl_order_status}: {$order.status|orderstatus_format}


I have run this mod from version 3.3.4 to version 3.5.4 with no problems.

I hope this helps.
Reply With Quote
  #3  
Old 03-01-2004, 03:24 PM
 
UserBU UserBU is offline
 

Member
  
Join Date: Nov 2003
Posts: 16
 

Default

dsparks,

Thanks for the reply. I will try it out and see if it works.
Reply With Quote
  #4  
Old 03-27-2004, 11:42 AM
 
GM GM is offline
 

eXpert
  
Join Date: Mar 2004
Location: Canada
Posts: 293
 

Default

Hey dsparks... You a SMART newbie!
But I'm not sure what file you are talking about in skin1/mail ???
I'm running 3.5.5 maybe it's no longer there? Oh.. ok... found it... it's now in /mail/init_order_customer.tpl.
Reply With Quote
  #5  
Old 04-21-2004, 08:53 AM
 
Risky Risky is offline
 

Member
  
Join Date: Jan 2004
Posts: 26
 

Default

dsparks,

The use of the order status code instead of its description has annoyed me also for some time, and its only that there are so many other things to get right in the leadup to going live that has stopped me pursuing this.

Anyway, thanks for your posting and guidance which I followed to the tee, by just cut and pasting, and .. it worked flawlessly. Exactly the outcome I wanted. I amended mail/order_invoice.tpl.

X-cart would do well to incorporate this as standard .. it just makes so much sense.

Thanks again
__________________
Risky
V3.5.3
With Options-based inventory tracking mod, by X-cart
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 09:33 AM.

   

 
X-Cart forums © 2001-2020