jmpeduto Posted January 8, 2013 Share Posted January 8, 2013 hi, I'm working now in a project that uses prestashop and want to make some overrides to the AdminProductController, to change the interface that is displayed when you want to add a new product in the backoffice. So, my question is, someone know how PS catch the parameters passed to a controller to know what to diplay? For example, in this case, i want to override what the controller does when the addproduct parametr arrives to adminproducts, but don't know how. The url is prestaUrl/adminsite/index.php?controller=adminproducts&addproduct&token=18028b94776533b5ae711fdc37a9e23a. Thanks in davance to anyone Link to comment Share on other sites More sharing options...
bellini13 Posted January 9, 2013 Share Posted January 9, 2013 This is going to depend on what you are trying to change. In v1.5, the back office uses tpl files now, so if you are looking to alter the display of information, then you need to locate the proper tpl file that contains the information, and change it. If you are looking to alter how the information is saved, then there are functions processAdd and processUpdate in AdminProductsController.php. 1 Link to comment Share on other sites More sharing options...
jmpeduto Posted January 9, 2013 Author Share Posted January 9, 2013 Thanks very much for your quick response bellini! I finally could find how prestashop use the parameters passed to the AdminProductsController to turn them into actions, the solution is in AdminController, at initContent method.. It was thanks to Xdebug, without it wouldn't be possible, debugging AdminProductsController class was the key. Link to comment Share on other sites More sharing options...
Cristrinity Posted March 14, 2013 Share Posted March 14, 2013 Thanks very much for your quick response bellini! I finally could find how prestashop use the parameters passed to the AdminProductsController to turn them into actions, the solution is in AdminController, at initContent method.. It was thanks to Xdebug, without it wouldn't be possible, debugging AdminProductsController class was the key. Hi jmpeduto!..could you explain what did you change please?..thankss Link to comment Share on other sites More sharing options...
jmpeduto Posted March 25, 2013 Author Share Posted March 25, 2013 Cristrinity, hi, sorry by the delay in answering.. what I did was to override the method processAdProduct in AdminProductsController to manage the product add method. In prestashop when you send and action to a controller, like addProduct, the action is prepend with the "process" word. If you need more help ask me! 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