Jump to content
sickshot

[SOLVED] removing side tabs from admin product editor?

Recommended Posts

hello i'd like to remove some unnecessary tabs in admin product edit page. i want to remove customization, attachment, supplier tabs , but was unable to detect which file to edit. if anyone knows please help.

Thanks

Share this post


Link to post
Share on other sites

well, it's not good idea, but if you want, you should give us information about what prestashop version you use

Share this post


Link to post
Share on other sites

oh sorry i forgot. version is 1.5.3.1

 

I know this is not a good idea but i really need to remove them

Share this post


Link to post
Share on other sites

hello

 

in controllers / AdminProductsController.php near line ~97 you've got:

 

$this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14);
 if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP)
  $this->available_tabs = array_merge($this->available_tabs, array(
   'Informations' => 0,
   'Pack' => 7,
   'VirtualProduct' => 8,
   'Prices' => 1,
   'Seo' => 2,
   'Associations' => 3,
   'Images' => 9,
   'Shipping' => 4,
   'Combinations' => 5,
   'Features' => 10,
   'Customization' => 11,
   'Attachments' => 12,
   'Suppliers' => 13,
  ));

 

try to manage the array elements, you will see how it works ;)

  • Like 2

Share this post


Link to post
Share on other sites

this help me for updating my side tabs

 

hello

may i know what you changed?

i'm wondering if sickshot achieved what he expected,

it looks like my suggestions was alright

Share this post


Link to post
Share on other sites

yes dear you are correct and as i am new so am i love with codings and updation as i like its really a very good community here every one will help each other.

Share this post


Link to post
Share on other sites

thank you for you kind words about community. Im going to mark this topic as [solved]

im convinced that it is solved, mainly because i used this method in several ps installations.

 

with regards,

Milos

Share this post


Link to post
Share on other sites

I have done this in the past using css, for example:

 

#link-Suppliers {display:none;} to remove the suppliers tab I was not using.

If you need to do this for different admin access levels, then you need conditional PHP to test the employee profile.

Share this post


Link to post
Share on other sites

hello, sorry for late reply...

unfortunately I was unable to test this solution as the project was canceled. anyway Im sure me or someone else will find it usefull

Share this post


Link to post
Share on other sites

What about the main tabs, how can we remove some of them wich we don't use (shipping for example)?

I want to simplify the system for the novice users.

 

:) Was a silly question. Sorry.

Edited by boragursel (see edit history)

Share this post


Link to post
Share on other sites

hello

 

in controllers / AdminProductsController.php near line ~97 you've got:

 

$this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14);
  if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP)
   $this->available_tabs = array_merge($this->available_tabs, array(
    'Informations' => 0,
    'Pack' => 7,
    'VirtualProduct' => 8,
    'Prices' => 1,
    'Seo' => 2,
    'Associations' => 3,
    'Images' => 9,
    'Shipping' => 4,
    'Combinations' => 5,
    'Features' => 10,
    'Customization' => 11,
    'Attachments' => 12,
    'Suppliers' => 13,
   ));
try to manage the array elements, you will see how it works ;)

 

 

 

Just for the record, i commented out those i didnt need and worked like a charm.

 

Thank you all.

Share this post


Link to post
Share on other sites

anway it's worth to test product edit pages after that :-)

Share this post


Link to post
Share on other sites

Agreed!

 

i just noticed descriptions were not being saved properly :( Damnit!

How woud "hidding by css" work?

Thanks!

Edited by iAreku (see edit history)

Share this post


Link to post
Share on other sites

I've tried the same thing in Prestashop 1.6.0.6.

 

I've removed the following tabs that I don't use. By adding // in front of each tab name in controllers/admin  AdminProductsController.php

Suppliers.

Features

Attachments

Combinations

Shipping

 

I don't use any of these tabs in my store or any of their content, If you don't use the content of any of these tabs on any product in your store it should be safe to remove/hide, although it's not recommended.

I could not remove the "Customization" tab since I could not save the products due to "link rewrite" error. So I recommend keeping that tab even if you don't use it.

 

Did a basic test of product creations, copy, sale, front and back office and I see no problems.

 

        // @since 1.5 : translations for tabs
        $this->available_tabs_lang = array(
            'Informations' => $this->l('Information'),
            'Pack' => $this->l('Pack'),
            'VirtualProduct' => $this->l('Virtual Product'),
            'Prices' => $this->l('Prices'),
            'Seo' => $this->l('SEO'),
            'Images' => $this->l('Images'),
            'Associations' => $this->l('Associations'),
            // 'Shipping' => $this->l('Shipping'),
            // 'Combinations' => $this->l('Combinations'),
            // 'Features' => $this->l('Features'),
            'Customization' => $this->l('Customization'),
            // 'Attachments' => $this->l('Attachments'),
            'Quantities' => $this->l('Quantities'),
            // 'Suppliers' => $this->l('Suppliers'),
            'Warehouses' => $this->l('Warehouses'),
        );

        $this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14);
        if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP)
            $this->available_tabs = array_merge($this->available_tabs, array(
                'Informations' => 0,
                'Pack' => 7,
                'VirtualProduct' => 8,
                'Prices' => 1,
                'Seo' => 2,
                'Associations' => 3,
                'Images' => 9,
                //'Shipping' => 4,
                //'Combinations' => 5,
                //'Features' => 10,
                'Customization' => 11,
                //'Attachments' => 12,
                //'Suppliers' => 13,
            ));

Share this post


Link to post
Share on other sites

hello

 

in controllers / AdminProductsController.php near line ~97 you've got:

 

$this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14);
  if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP)
   $this->available_tabs = array_merge($this->available_tabs, array(
    'Informations' => 0,
    'Pack' => 7,
    'VirtualProduct' => 8,
    'Prices' => 1,
    'Seo' => 2,
    'Associations' => 3,
    'Images' => 9,
    'Shipping' => 4,
    'Combinations' => 5,
    'Features' => 10,
    'Customization' => 11,
    'Attachments' => 12,
    'Suppliers' => 13,
   ));

try to manage the array elements, you will see how it works wink.png

 

 

I LOVE YOU GUYS!!! It worked for me as well with commenting out thx =-)

 

Share this post


Link to post
Share on other sites

What about hidding assocciations tab? I know it is necessary but it takes 15-30 seconds to load every time i save the product. For example if i want to add an specific price i have to wait to associations tab to load.

 

What i want to do is to disable the associations function and create a custom product to category associations script apart from product edition. When creating a product it will be assigned to a custom/hidden category and then i will move it to the correct one. 

 

I have about 10k categories and i know this is the main problem but while we create another category tree and assign our more than 250k products to them i think the commented above could be a solution.

 

What do you think?

 

Thanks

Share this post


Link to post
Share on other sites

Hi,
We have purchase prestashop 1.7.1.2
Now the problem is i want to add new tab in the product edit page of backend. So i checked the package product  edit page code present in src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig

What is the right way to override this file?

Kindly suggest us.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More