Zeroi Posted April 20, 2012 Share Posted April 20, 2012 Hello, I wonder how I can, on certain products (lets say, on "Package 1" and "Package 2"), I want to insert a row into the database, to create a generated code. I know how to do it, but I can't seem to find the last checkout file? Where can I find it? (I need to edit the file which is used after payment). Link to comment Share on other sites More sharing options...
bellini13 Posted April 20, 2012 Share Posted April 20, 2012 Technically it is the payment module itself that would do such things. You could override the PaymentModule class in the validateOrder method to perform some events after a successful order, but perhaps a better way would be to create your own module that hooks "new order" and perform your logic there. Link to comment Share on other sites More sharing options...
Zeroi Posted April 20, 2012 Author Share Posted April 20, 2012 Technically it is the payment module itself that would do such things. You could override the PaymentModule class in the validateOrder method to perform some events after a successful order, but perhaps a better way would be to create your own module that hooks "new order" and perform your logic there. Thank you for your reply. I don't really know the PDO way that Prestashop are built. Is there no really easy way, like, on the actual payment page, check if $product_id = 1. If true, then run my query?= 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