nomadman Posted May 17, 2013 Share Posted May 17, 2013 Hi I ve searched for a solution for a while before posting I m now trying to make a product reservation in a shop selling tissue for retailer who want to reserve for a custommer I manage to make it by playing with the order statut when i try to modify an order statut with the script below it's work (i can see it on the global order page and the stock are modified) but dont modify the order history so the retailer can't see the order statut change Please if someone can help please for updating the order history the php code <?php require(dirname(__FILE__).'/config/config.inc.php'); $id_order = new Order(4); //order with id=1 $history = new OrderHistory(); $history->id_order = $id_order; $history->changeIdOrderState(intval(2), intval($id_order)); echo 'done'; ?> Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 hello what prestashop version you use? Link to comment Share on other sites More sharing options...
nomadman Posted May 17, 2013 Author Share Posted May 17, 2013 Hello Prestashop 1.5.4.1 Tanks Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 it's better to use this: $order=new Order(ID_ORDER); $order->setCurrentState(ID_STATUS); 1 Link to comment Share on other sites More sharing options...
nomadman Posted May 17, 2013 Author Share Posted May 17, 2013 Tanks a lot its work like a charm Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 Awesome :-) now i can go ahead, and mark this topic as solved the quickest help ever regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now