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

Simple way to add new order statuses

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-06-2013, 06:26 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Lightbulb 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.
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote

The following 2 users thank finestshops for this useful post:
Mark N (06-17-2013), tony_sologubov (05-15-2013)
  #2  
Old 05-16-2013, 09:53 PM
 
sinobest sinobest is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 462
 

Default Re: Simple way to add new order statuses

how about x-cart v4.5.*
__________________
X-Cart Version: 4.7.12 GOLD
www.cheapglasses123.com prescription glasses online at discounted prices.
prescriptionglassesusa.com
www.loupesusa.com X-Cart Version: 4.7.11 GOLD PLUS
Reply With Quote
  #3  
Old 05-17-2013, 04:27 AM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default Re: Simple way to add new order statuses

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

same procedure
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote
  #4  
Old 05-21-2013, 04:22 AM
 
jrsvsp jrsvsp is offline
 

Advanced Member
  
Join Date: Oct 2011
Posts: 73
 

Default 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.
__________________
X-Cart 4.4.5 Live
X-cart 4.5.5 Live
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 11:34 AM.

   

 
X-Cart forums © 2001-2020