beamer Posted February 24, 2014 Share Posted February 24, 2014 Prestashop vs 1.5.6 I am developing a shop that only sells virtual products and I have a rather unusual requirement. I would like to remove the add new button from the back office admin catalog products page. This would force the catalog administrator to add a new product by using the duplicate product function. This is desirable since all the virtual products have at least 6 customizations and I need every product to have the same customizations. I have tried to find the relevant file but without success, can anyone point me in the right direction as to which file I need to modify. I did try and set the permissions for a catalog administrator to remove" add" Products but unfortunately this removed both the ability to add a new product and duplicate a product. Any help would be gratefully appreciated. Graham Link to comment Share on other sites More sharing options...
El Patron Posted February 24, 2014 Share Posted February 24, 2014 this may prove useful, either modify or create a new profile and turn disable 'add' in products. note: i have not personally tried this but it might be something you could try http://screencast.com/t/LLRheuqd3z Link to comment Share on other sites More sharing options...
beamer Posted February 24, 2014 Author Share Posted February 24, 2014 Hi thanks for the quick response. As I said in my original post I did try this but it also disables the duplicate product capability. I think i either need to modify the admin product page or add a new feature to permissions that distinguishes between add and duplicate. If you can think of any other ways to achieve that would be great. Graham Link to comment Share on other sites More sharing options...
Om Developers Posted February 19, 2015 Share Posted February 19, 2015 -find below line in AdminProductsController.php: protected $tab_display_module; -and add below line after above line: protected $can_add_products = false; -find below lines: public function postProcess() { if (!$this->redirect_after) parent::postProcess(); and replace it with below: public function postProcess() { if (!$this->redirect_after) //parent::postProcess(); if (!$this->can_add_products && $this->display == 'add') $this->redirect_after = $this->context->link->getAdminLink('AdminProducts'); parent::postProcess(); } May be it works... Thanks 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