thiegui Posted October 14 Share Posted October 14 (edited) Hi everyone, I need to cancel an order, with code, under certain circumstances, before show the information about it. Where is the best way to do it? I guess this is the file: controllers/admin/AdminOrdersController.php but I'm not sure how to do it. Thanks in advance! Edited October 17 by thiegui Solved (see edit history) Link to comment Share on other sites More sharing options...
ventura Posted October 15 Share Posted October 15 Depending on the business logic to be implemented, the best way to implement it would be through a module that runs on a hook. for example if you want to register the order but that this is concelebrated according to a business logic to be applied you can use actionOrderStatusUpdateBefore. If it is necessary to validate the registration or not of an order you can use actionValidateOrder 1 Link to comment Share on other sites More sharing options...
thiegui Posted October 17 Author Share Posted October 17 Nice!, thank you! Finally I made a module and created a hook to implement this. It works perfect! Link to comment Share on other sites More sharing options...
Divine Posted October 17 Share Posted October 17 Don't forget to edit your first post and add [Solved] in the title 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