Hiding Vendor Menu Items

Try to add

$schema['controllers']['destinations']['modes']['manage']['permissions'] = false;

You can enable the My changes module and create the app/addons/my_changes/schemas/permissions/vendor_multivendor.post.php file with the following content:

$schema[‘controllers’][‘product_features’][‘modes’][‘manage’][‘permissions’] = false;
$schema[‘controllers’][‘product_filters’][‘modes’][‘manage’][‘permissions’] = false;
$schema[‘controllers’][‘profiles’][‘modes’][‘manage’][‘param_permissions’][‘user_type’][‘C’] = false;

return $schema;

Do not forget to clear cache before checking the result

Worked just fine...

I removed blog and pages for vendors as well using this:

$schema['controllers']['pages']['modes']['manage']['permissions'] = false;

Try to add

$schema['controllers']['destinations']['modes']['manage']['permissions'] = false;

Thank you! Interesting, why Locations are still not renamed to Destinations, according to the controller? :-)

Thank you! Interesting, why Locations are still not renamed to Destinations, according to the controller? :-)

¯\_(ツ)_/¯

Thank you! Interesting, why Locations are still not renamed to Destinations, according to the controller? :-)

Because locations may not always be destinations. A location could also be used as an origin or for other localization settings.

How to set rights vendor only read Catalog?

Hey guys,

we have the problem that our vendor administrators can write and edit reviews for products and stuff. Does anybody know how to restrict this possibility?

Greets

there are several ways.

1 - I belive some addons exist that allow you to select what a vendor sees and what they don't

2 - Upgrade to the expensive SimTech addon that give you system permissions and extends it to vendors

3 - Do small custom development to define and hide specific areas of the admin panel.

we have the problem that our vendor administrators can write and edit reviews for products and stuff. Does anybody know how to restrict this possibility?

At the moment you can set the "Administrator must approve posts submitted by" to "Any customer" and approve reviews manually

Hi there!

Thanks eLab for helping us here. Thanks to you I was able to hide some of vendors menu.

But also i wish to hide some tabs form product details , and that is - Seo tab, addons tab, options tab, and subscribers tab.

also in general tab of product details - option settings and all "extra" from the bottom of page.

And i wish that added product had invisible option from availability user groups -all- and -guest users-.

to disable tabs i did try editing app/controllers/backend/products.php and

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);

from this post : https://forum.cs-cart.com/topic/46943-disabling-add-ons-tab-on-vendor-panel/

but it didn't work.

It wold be great if someone could help to solve it with my changes addon for compatibility reasons in the future,

Thanks,

A

I don't think you want to qualify on GET but instead qualify on being in the context of a company..

I would be using:

if( Registry::get('runtime.company_id') && $_SESSION['auth']['user_type'] != 'A' )

And I wouldn't edit the standard controller but instead do it in: app/addons/my_changes/controllers/backend/init.post.php.

I don't think you want to qualify on GET but instead qualify on being in the context of a company..

I would be using:

if( Registry::get('runtime.company_id') && $_SESSION['auth']['user_type'] != 'A' )

And I wouldn't edit the standard controller but instead do it in: app/addons/my_changes/controllers/backend/init.post.php.

So the code in app/addons/my_changes/controllers/backend/init.post.php.

would be? :

if( Registry::get('runtime.company_id') && $_SESSION['auth']['user_type'] != 'A' ) {
$tabs = Registry::get('
navigation.tabs');
unset($tabs['
addons']);
Registry::set('
navigation.tabs', $tabs);
}
return array(CONTROLLER_STATUS_OK);

------------

['user_type'] != 'A'

this A stands for admin?

-------------

also in general tab of product details - option settings and all "extra" from the bottom of page.

And i wish that added product had ivisble option from availabilty user groups -all- and -guest users-.

thanks,

A

Yes to your code segment.

There are 3 user_types in cs-cart, A=admin, V=vendor, C=customer (not sure if supplier's can have their own but I think not).

There are 2 types of admin users. ROOT and non-ROOT.

Root admins can manage usergroups and assign other admins to usergroups, install/uninstall addons, etc.

Non-Root admins can't do the above.

The only way to modify whether an admin user is a root admin or not is via the DB (there is no UI). In the cscart-users table thre is a 'is_root' column which can be either 'Y' or 'N'.

You can use the same condition to alter other areas of the cart relative to vendors too.

Hope this clarifies.

also in general tab of product details - option settings and all "extra" from the bottom of page.

And i wish that added product had ivisble option from availabilty user groups -all- and -guest users-.

You can also add conditions to corresponding templates

{if $auth.user_type != 'V'}
    ....
{/if}

Thank you guys for those post

but it think i need more specyfic code.

i asked about admin becouse in the code provided (thats not wodking) was A instead of V- i dont want vendors to see some of thise tabs.

Would you be able to tell me what exactly shoudl i put in app/addons/my_changes/controllers/backend/init.post.php. ?

what wolud be the full code to hide :

- Seo tab, addons tab, options tab, and subscribers tab.

also in general tab of product details - option settings and all "extra" from the bottom of page.
And i wish that added product had invisible option from availability user groups -all- and -guest users-.
thank you vary much for help

Extra section cannot be removed with the init.post.php controller. So I provided you with the code for the corresponding template

Extra section cannot be removed with the init.post.php controller. So I provided you with the code for the corresponding template

Hi

so the code is?:

if({if $auth.user_type != 'V'}

{
$tabs = Registry::get('
navigation.tabs');
unset($tabs['addons
']);
Registry::set('
navigation.tabs', $tabs);
}
return array(CONTROLLER_STATUS_OK);

{/if}

and where should i place it ?

Look at your condition. If it's not working in init.post.php then you can try putting it in index.post.php

Some tabs are not defined in the init stage.

Look at your condition. If it's not working in init.post.php then you can try putting it in index.post.php

Some tabs are not defined in the init stage.

I placed

if({if $auth.user_type != 'V'}

{
$tabs = Registry::get('
navigation.tabs');
unset($tabs['addons
']);
Registry::set('
navigation.tabs', $tabs);
}
return array(CONTROLLER_STATUS_OK);

{/if}

to /app/addons/my_changes/controllers/backend/index.post.php

cleared cache

but i still see addons tab on product details page

And you are logged in as the vendor, not as your admin, right?