vasikgreif Posted July 27, 2014 Share Posted July 27, 2014 Hi, I would need to do some minor change in setLastInvoiceNumber() function in Order.php class. Is there a way to override just this function? I mean, if I copy the whole Order.php to overrides/classes/order/Order.php, I will override the whole class, which is kind of overkill and makes updating PS harder I guess... Link to comment Share on other sites More sharing options...
misthero Posted July 27, 2014 Share Posted July 27, 2014 (edited) I agree deeply with you and don't love overrides myself at all, anyway you can override just 1 function in your class, the rest will come from the parent class Order extends OrderCore { public function myOverriddenFunction() { return $myresult; } } this can be enough to cange the output of just one function, I don't know what you need to do but this example should help Edited July 27, 2014 by misthero (see edit history) 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