David Bucur Posted April 24, 2014 Share Posted April 24, 2014 (edited) Hi all, I am not sure if I am doing something wrong but I am trying override the function resize in classes/ImageManager.php Therefore in override/classes I created the file ImageManager.php which has the following code. <?php class ImageManager extends ImageManagerCore { public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false) { //resizing code } } However the modification is not happening. Is something else I have to do? Edited April 24, 2014 by david-evolutione (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted April 24, 2014 Share Posted April 24, 2014 when manually placing an override, and for ps to see it right away.. delete the following file: cache/class_index,php (you can also rename it if you prefer) this is not however necessary when module is installed normally from back office. Link to comment Share on other sites More sharing options...
David Bucur Posted April 24, 2014 Author Share Posted April 24, 2014 Thanks El Patron, deleting the class_index.php fixed the problem. This wasn't a module, this was a prestashop core modification. Is the cache/class_index.php an index of all modifications? So if you delete it Prestashop regenerates it and finds the new extensions? I am asking because after deleting it and reloading the page it created again with the working extended version. Link to comment Share on other sites More sharing options...
El Patron Posted April 24, 2014 Share Posted April 24, 2014 yes, deleting will create new r.e. module, when we include overrides in ourmodule/overrides, the ps will automatically install the override for us. this is more for your info later on if you decide to create hack with module... 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