Disabling Add-Ons Tab On Vendor Panel?

Does anyone know what file I must edit to disable add-ons tab in vendor panel (http://imgur.com/WkcAdmM)

Much appreciated in advance.

app/controllers/backend/products.php

replace:

Registry::set('navigation.tabs', array (
        'detailed' => array (
            'title' => __('general'),
            'js' => true
        ),
        'images' => array (
            'title' => __('images'),
            'js' => true
        ),
        'seo' => array(
            'title' => __('seo'),
            'js' => true
        ),
        'qty_discounts' => array (
            'title' => __('qty_discounts'),
            'js' => true
        ),
        'addons' => array (
            'title' => __('addons'),
            'js' => true
        ),
    ));

with

$tabs = array (
        'detailed' => array (
            'title' => __('general'),
            'js' => true
        ),
        'images' => array (
            'title' => __('images'),
            'js' => true
        ),
        'seo' => array(
            'title' => __('seo'),
            'js' => true
        ),
        'qty_discounts' => array (
            'title' => __('qty_discounts'),
            'js' => true
        ),
        'addons' => array (
            'title' => __('addons'),
            'js' => true
        ),
 );
 if (ACCOUNT_TYPE == 'vendor') {
     unset($tabs['addons']);
 }
 Registry::set('navigation.tabs', $tabs);

and replace:

    // [/Product tabs]
    Registry::set('navigation.tabs', $tabs);
    // [/Page sections]

with

    // [/Product tabs]
    if (ACCOUNT_TYPE == 'vendor') {
        unset($tabs['addons']);
    }
    Registry::set('navigation.tabs', $tabs);
    // [/Page sections]

(!) Not tested

Or you can do the same using a addons/my_changes/controllers/backend/products.post.php controller and do

if ($_SERVER["REQUEST_METHOD"] == 'GET' && $_SESSION['auth'][user_type'] == 'V') {
 $tabs = Registry::get('navigation.tabs');
  unset($tabs['addons']);
  Registry::set('navigation.tabs', $tabs);
}
return array(CONTROLLER_STATUS_OK);

This will survive a future upgrade and you won't be modifying a core file. It too is UNTESTED.

Thanks so much for the help guys.

My original question was regarding the add-ons tab on vendor profile page, not the product page.

Although, I do have need to disable add-on tab on product page as well. I tried both of the solutions above,

unfortunately neither of them worked for me in hiding add-ons on the vendor product page.

Albeit probably didn't work due to my products.php page being mangled to hell, - by some miracle it still works and hides most of the tabs I need it but is a disorganized mess..

If anyone can help, still looking how to disable add-ons tab on vendor panel profile, which you can be accessed on vendor panel by clicking vendor name (http://imgur.com/SHz40tq).

It is hard to say why it does not work for the product details page. For the Update vendor page please try

app/controllers/backend/companies.php

add

    if (ACCOUNT_TYPE == 'vendor') {
        unset($tabs['addons']);
    }

before

Registry::set('navigation.tabs', $tabs);

It is hard to say why it does not work for the product details page. For the Update vendor page please try

app/controllers/backend/companies.php

add

    if (ACCOUNT_TYPE == 'vendor') {
        unset($tabs['addons']);
    }

before

Registry::set('navigation.tabs', $tabs);

Your a wizard :mrgreen:

That did it!

Thanks!!!

You are welcome!

Actually I was looking for solution to this and tried your method but it didn't work.

Can someone guide me on how to disable following menus from vendor's admin when vendors are adding new product or editing product? I'm using CS Cart 4.7.3 MV.

Hi,

1. About the same problem, how can we hide layout tab of edit product page?

2. How to hide the "design" dropdown on header of vendor?

Because i dont want vendor to customize any design,

Thank you so much for your help