Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Hiding Vendor Menu Items Rate Topic   - - - - -

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19780 posts

Posted 11 February 2019 - 05:43 AM #21

Try to add

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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • 12ka4
  • Senior Member
  • Trial users
  • Join Date: 21-Feb 18
  • 203 posts

Posted 13 February 2019 - 03:19 AM #22

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:

<?php

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



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 461 posts

Posted 13 February 2019 - 07:55 AM #23

 

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? :-)



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19780 posts

Posted 13 February 2019 - 01:32 PM #24

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

 

¯\_(ツ)_/¯ 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 13 February 2019 - 08:18 PM #25

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • mds_mds
  • Newbie
  • Trial users
  • Join Date: 18-Feb 19
  • 1 posts

Posted 18 February 2019 - 11:59 AM #26

How to set rights vendor only read Catalog?



 
  • MarkusBudz
  • Member
  • Trial users
  • Join Date: 08-Aug 18
  • 36 posts

Posted 14 March 2019 - 01:40 PM #27

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

 

 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 14 March 2019 - 05:55 PM #28

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19780 posts

Posted 15 March 2019 - 04:55 AM #29

 

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Adr
  • Advanced Member
  • Members
  • Join Date: 30-Jan 18
  • 55 posts

Posted 09 November 2019 - 11:21 AM #30

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-car...n-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



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 09 November 2019 - 06:05 PM #31

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Adr
  • Advanced Member
  • Members
  • Join Date: 30-Jan 18
  • 55 posts

Posted 10 November 2019 - 09:05 AM #32

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



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 10 November 2019 - 08:51 PM #33

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19780 posts

Posted 11 November 2019 - 05:44 AM #34

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}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Adr
  • Advanced Member
  • Members
  • Join Date: 30-Jan 18
  • 55 posts

Posted 11 November 2019 - 07:17 AM #35

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


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19780 posts

Posted 11 November 2019 - 01:16 PM #36

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Adr
  • Advanced Member
  • Members
  • Join Date: 30-Jan 18
  • 55 posts

Posted 11 November 2019 - 02:14 PM #37

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 ?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 11 November 2019 - 09:42 PM #38

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Adr
  • Advanced Member
  • Members
  • Join Date: 30-Jan 18
  • 55 posts

Posted 11 November 2019 - 09:56 PM #39

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



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 11 November 2019 - 10:04 PM #40

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


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.