cantcloseaccount Posted July 8, 2013 Share Posted July 8, 2013 Hi All, I'm a relative novice when it comes to PHP so please excuse me if I am way off tangent. I would really appreciate any feedback or help. I'm trying to implement a custom rounding function to mirror an existing pricing sturcture. I have created a custom rounding type and defined it in AdminPrefencesController.php defines.inc.php I am now in the process of trying to integrate the custom function into tools.php which I have copied to the overrides folder. The current format has an if elseif statement to call the PS_ROUND_UP and PS_ROUND_DOWN modes. I'm guessing with 3 different modes to call, I will need to change that to a Switch? Here is a sample of what I have done. If anyone has any advice, it would be muchly appreciated! Thanks Louis Attached Code MetroRound.php Link to comment Share on other sites More sharing options...
cantcloseaccount Posted July 11, 2013 Author Share Posted July 11, 2013 Am I going up the wrong path? Is it possible to simply overwrite an existing rounding function as I will only ever need the new function? 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