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)
-   -   Simple way to add new order statuses (https://forum.x-cart.com/showthread.php?t=66781)

finestshops 05-06-2013 06:26 AM

Simple way to add new order statuses
 
Hey guys,

Request to add new order statuses to X-cart is very common and I thought it will be useful to post the instructions if you want to do it yourself.

* FTP/SSH access is required.
** if you do not know what FTP is, better ask somebody else to do this
*** make backup of any file you modify

for X-cart v. 4.3+):

For example we want to add a new status: "Manually paid"

1) In Languages menu, add new language label "lbl_manually_paid" with value "Manually paid"

2) Open file "skin/common_files/main/order_status.tpl" and

after code:

<option value="P"{if $status eq "P"} selected="selected"{/if}>{$lng.lbl_processed}</option>

add

<option value="M"{if $status eq "M"} selected="selected"{/if}>{$lng.lbl_manually_paid}</option>

after code

{elseif $status eq "P"}{$lng.lbl_processed}

add

{elseif $status eq "M"}{$lng.lbl_manually_paid}

3) Open "include/func/func.order.php":

Find:

$allowed_order_status = 'IQPBDFC';

Replace with:

$allowed_order_status = 'IQPBDFCM';

* note new status "M" at the end of the list.

4) Clean templates cache and you are done.

Note: this new status will not send notifications or update inventory. This will require some additional changes to "include/func/func.order.php" Please contact Qualiteam or us for a quote.

Hope this helps.

sinobest 05-16-2013 09:53 PM

Re: Simple way to add new order statuses
 
how about x-cart v4.5.*

finestshops 05-17-2013 04:27 AM

Re: Simple way to add new order statuses
 
Quote:

Originally Posted by sinobest
how about x-cart v4.5.*


same procedure

jrsvsp 05-21-2013 04:22 AM

Re: Simple way to add new order statuses
 
Quote:

Originally Posted by finestshops
same procedure


Looking at the code in func.order.php in 4.5.5 they seem to us status "X" for x_payments and the status validity checking is done differently for X-payments

(line 1686)

if (!empty($active_modules['XOrder_Statuses'])) {
if (!func_orderstatuses_is_valid($status)) {
return;
}
} else {
$allowed_order_status = 'IQPBDFCA';

if (!strstr($allowed_order_status, $status))
return;
}

I don't know where func_orderstatus_is_valid gets defined, but I guess if you use x-payments you may need to dig a bit further? Also assume you should not use Status=X for a user status.


All times are GMT -8. The time now is 04:35 AM.

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