drolex Posted August 1, 2014 Share Posted August 1, 2014 (edited) I have PS version 1.6. I want to add a field to the DB table product_attribute and be able to enter the value on the Combinations tab of Products in the back office. I think I need to override the function processProductAttribute in AdminProductsController as well as a tpl file. This new field will allow me to define different dimensions and weight for each attribute combination. To override the controller function, do I copy the entire function and modify it in my override file?Thank you for helping! EDIT: I already figured this out, but I didn't use overrides, so I still want the answer to that question. This required substantial modification of the following files: controllers/admin/AdminProductsController.php classes/Product.php classes/Combination.php admin/themes/default/template/controllers/products/combinations.tpl js/admin-products.js classes/Cart.php I also have a modified shipping module to make use of the new field. Edited August 1, 2014 by drolex (see edit history) Link to comment Share on other sites More sharing options...
drolex Posted August 11, 2014 Author Share Posted August 11, 2014 Can anyone answer my question: To override the controller function, do I copy the entire function and modify it in my override file? Link to comment Share on other sites More sharing options...
redactuk Posted January 9, 2015 Share Posted January 9, 2015 Hi drolex, did you ever get any help with this? as I'm trying to work out how to do the same. Link to comment Share on other sites More sharing options...
drolex Posted January 10, 2015 Author Share Posted January 10, 2015 I didn't get help but I figured it out as I stated in the 1st post. I listed the files I had to edit. Link to comment Share on other sites More sharing options...
jojo89 Posted August 10, 2015 Share Posted August 10, 2015 Hi Drolex, Well that's depend what u want change in the function u can copy the entire to ur override and change it (in this case if in your function u have an parent::callToTheParentFunction(); you have to jump and call the parent parent ) 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