zador Posted August 17, 2014 Share Posted August 17, 2014 Hi, i want add event function every time when order state change to payment accepted paypal, card, or admin manual change. Please where is function what adding rows into ps table order_payment?thank you for any idea. Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 i dont quite understand well what you're trynig to accomplish. prestashop has got hook associated with order status change. this hook name is actionOrderStatusUpdate you can associate module with this hook, and make some actions related to order status updates now the question is: what you're trying to achieve with that? Link to comment Share on other sites More sharing options...
zador Posted August 17, 2014 Author Share Posted August 17, 2014 thank you for your answer!yes is there update order status. simply i want add function to ejecute other code every time when order status is added or changed to "payment accepted", to conect other DB when send variable (id order) when payment is accepted. Link to comment Share on other sites More sharing options...
zador Posted August 17, 2014 Author Share Posted August 17, 2014 if conditiion is true: // set orders as paid if ($new_os->paid == 1) { .... etc i want ejecute or load any file.php with my own code for other pages and other database } how i can make it out of ps classes and ps public functions? its posible? Link to comment Share on other sites More sharing options...
El Patron Posted August 17, 2014 Share Posted August 17, 2014 Hi, I think if you review the developers guide and then focus on hook processing will help you understand how to do this. http://doc.prestashop.com/display/PS16/Developer+Guide Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2014 Share Posted August 18, 2014 simply i want add function to ejecute other code every time when order status is added or changed to "payment accepted", to conect other DB when send variable (id order) when payment is accepted. i think that you have to create own module which will support hook that i mentioned, then you will be able to execute own code in addition $new_os variable doesnt exist - so you will have to define it first. Link to comment Share on other sites More sharing options...
zador Posted August 18, 2014 Author Share Posted August 18, 2014 var $new_os is form original PS code, please look any instalation of PS 1.6 classes/order/orderhistory.php about line 289. - i ask if its possible paste own code between PS code lines. yes its possible, i make it and work fine.. but code must be simple and continuous, without functions and without parentheses.. for it i looked for solution put code for load external file as include, requiere_once, etc.. now i understand that is need register vars and functions, and register all and token too, simply make module... ok, thankyou mens for yours time, regards from spain Link to comment Share on other sites More sharing options...
Recommended Posts