X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Email Confirmation - Order Status Modification (https://forum.x-cart.com/showthread.php?t=6522)

UserBU 03-01-2004 02:38 PM

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

dsparks 03-01-2004 03:14 PM

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.

UserBU 03-01-2004 03:24 PM

dsparks,

Thanks for the reply. I will try it out and see if it works.

GM 03-27-2004 11:42 AM

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.

Risky 04-21-2004 08:53 AM

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


All times are GMT -8. The time now is 09:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.