Jump to content

where is function what adding rows into ps table order_payment?


Recommended Posts

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

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

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

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

 

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

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

×
×
  • Create New...