Author Topic: add more order status  (Read 1564 times)

Offline Cazz

  • Posts: 68
add more order status
« on: February 28, 2016, 10:14:18 PM »
It have now delivered, invoice, reminder, paid and archives

But I like to add Partial delivery and restad.

Is it easy and possible to do that?

Offline Gast

  • Posts: 5920
Re: add more order status
« Reply #1 on: February 29, 2016, 12:03:11 AM »
yes, if you know a little bit about coding

look into the folder modules / bakery/ payment_methodes
every subfolder there is a payment method. if you go into the backend to bakery -> payment_methodes, the script read this folder and add a new methode to the database, if there is no entry for that

so copy one of this folders with the best conditions for you and change whatever you need. But dont forget the language files for your used language. bakery use some of this variables for the database insert.

tip 1: go to bakery -> payment_methodes if you finish with your changes in the new methode and not before for a first look  :wink:
bakery add this methode and this database insert only at the first visit or in the next module-upgrade. if you forget maybe the methode-name to change, you can change it only in the database (delete this methode and reload it again)

tip 2: dont change anything on the page bakery -> payment_methodes if you not realy finish with this work. if you use maybe the same name from the methode or the directory, bakery change maybe the wrong database entry

at the end: if the new methode is added on the page bakery -> payment_methodes, you can use it everywhere in bakery, no other changes needed


freeSbee

  • Guest
Re: add more order status
« Reply #2 on: February 29, 2016, 08:18:21 AM »
Hi Cazz

I think you are more after the order status than the payment methode, aren't you?
You can add other order status in the file modify_orders.php. The code for the status images starts about line 170 and for the status select about line 205.

Regards Christoph

Offline Cazz

  • Posts: 68
Re: add more order status
« Reply #3 on: February 29, 2016, 05:13:17 PM »
hi and thanks for the replay

yes it is the order status I'm looking for and I have find how to add case in line 170

But what I can see in line 205 is get information from the database.

well I can static add it in select but I'm not sure if I get it right.

It does look a little strange that the line in 170 is static and 205 is dynamic from a database.

At around line 170

Code: [Select]
case 'ordered': echo "<img src='$status_img_url/ordered.gif' alt='{$MOD_BAKERY['TXT_STATUS_ORDERED']}' title='{$MOD_BAKERY['TXT_STATUS_ORDERED']}' $status_img_style />"; break;

case 'shipped': echo "<img src='$status_img_url/shipped.gif' alt='{$MOD_BAKERY['TXT_STATUS_SHIPPED']}' title='{$MOD_BAKERY['TXT_STATUS_SHIPPED']}' $status_img_style />"; break;

case 'busy': echo "<img src='$status_img_url/busy.gif' alt='{$MOD_BAKERY['TXT_STATUS_BUSY']}' title='{$MOD_BAKERY['TXT_STATUS_BUSY']}' $status_img_style />"; break;


At around line 205
Code: [Select]
echo " <select name='status[{$costumer['order_id']}]' style='width: 110px'>";
foreach ($select_status as $option_value => $option_text) {
echo "<option value='$option_value'";
echo stripslashes($costumer['status']) == $option_value ? ' selected="selected"' : '';
echo ">$option_text</option>\n";
}
echo "</select>";

 

postern-length