Jump to content

[1.4.8.3] How to Update Order Status with a function or PHP code?


Recommended Posts

Hello, I need a function or a PHP code that updates the order status tu status #2 (Payment Acepted)

 

I've tried this:

<?php

require(dirname(__FILE__).'/config/config.inc.php');

$objOrder = new Order(1); //order with id=1

$history = new OrderHistory();

$history->id_order = (int)$objOrder->id;

$history->changeIdOrderState(2, (int)($objOrder->id)); //order status=2

echo 'done';

?>

 

But it dont work (It should update order #1 to status 2). It display done.

 

Prestashop version: 1.4.8.3

 

Somebody knows how to do it?

 

Thanks in advance!

Link to comment
Share on other sites

×
×
  • Create New...