Jump to content

Disabling adding new product


Recommended Posts

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 by veijari (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...