veijari Posted April 15, 2020 Share Posted April 15, 2020 (edited) Hi, our customer uses another software where they import all the products in PS, they also want to use the same ID(force ID enabled) as in the other software, therefore we want to disable manual adding of a product in admin. This way we won't get duplicates. I've found a way to do this in /src/PrestaShopBundle/Controller/Admin/ProductController.php at line 353: $toolbarButtons['add'] = array( 'href' => $this->generateUrl('admin_product_new'), 'desc' => $this->trans('New product', 'Admin.Actions'), 'icon' => 'add_circle_outline', 'help' => $this->trans('Create a new product: CTRL+P', 'Admin.Catalog.Help'), ); So if I comment this out it works, but then when we update the PS this change will be gone. Is there a way to override this somehow, or manually hide it via css, or maybe with a hook? Any help would be appreciated. Edited April 15, 2020 by veijari (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted April 20, 2020 Share Posted April 20, 2020 Why not remove the user rights to add new products? Link to comment Share on other sites More sharing options...
veijari Posted April 29, 2020 Author Share Posted April 29, 2020 On 4/20/2020 at 4:32 PM, JBW said: Why not remove the user rights to add new products? @JBW That is a really good question! I have no idea why I did not come up with that easy solution.. Thank you for saving my time! 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