[en] automatical change of order status

Gent1304

Avatar: Gent1304

2011-01-01 11:40

Hello,

I have Quick.Cart (extended free version H2), there is possible to generate invoice (preliminary) to the PDF file on admin site.
Based on this I would like to have an extension - send email with this preliminary invoice and change order status from pending to processing.
Question is regarding change order status. How can be changed status automatically?

In action_admin/orders.php is

...

elseif( $a == 'form' && isset( $iOrder ) && is_numeric( $iOrder ) ){

if(isset( $_POST['generate_invoice'] )){

// generate invoice
header( 'Location: '.$_SERVER['PHP_SELF'].'?p=pdf-generate&iOrder='.$iOrder.'&paid='.$_POST['paid'].'&payment='. 6;_POST['payment_type'].'&date='.$_POST['invoice_date'].'&num='.$_POST['invoice_num'] );

// change status from order pending to order processing
??? (something, what change parameter selected in drop-down menu for status order from pending to processing)
$oOrder->saveOrder( $_POST );

// closing actual order and back to the order list
header('Location: '.$_SERVER['PHP_SELF'].'?p=orders-list');
exit;
}
...

Instead of ??? is necessary some code, which I can not discover...
Thanx.

» Quick.Cart v3.x

Gent1304

boboo

Avatar: boboo

2011-01-01 14:33

instead of those "???" try to put there:
$_POST['iStatus'] = 2;

http://it-service.kimla.de

Gent1304

Avatar: Gent1304

2011-01-01 18:39

That is exactly, what was necessary, thank you.

Gent1304

Back to top
about us | contact