Jump to content

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

Hiding Vendor Menu Items Rate Topic   - - - - -

 
  • maverick1
  • Newbie
  • Members
  • Join Date: 09-Oct 17
  • 4 posts

Posted 09 October 2017 - 03:58 PM #1

Hi,

I'm trying to hide 3 menu items from the vendor admin panel. Specifically:

- Products > Features

- Products > Filters

- Customers > Customers

 

I know that the modifications need to be made in app/schemas/permissions/vendor_multivendor.php

 

But I'm not that great at PHP and I'm just not sure what or how to modify  :-(



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

Posted 10 October 2017 - 06:20 AM #2

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


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 руб.


 
  • maverick1
  • Newbie
  • Members
  • Join Date: 09-Oct 17
  • 4 posts

Posted 10 October 2017 - 03:48 PM #3

That worked perfectly!

 

Thanks so much.



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

Posted 11 October 2017 - 06:04 AM #4

You are welcome! :)


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 руб.


 
  • pepo1
  • Advanced Member
  • Members
  • Join Date: 23-Jun 17
  • 82 posts

Posted 04 November 2017 - 11:52 PM #5

What is the code for product categories? Vendors don't need to see those if they can't add or change them.



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

Posted 05 November 2017 - 09:08 PM #6

I think you have a problem with your configuration on your localhost that is causing confusion for redirects.    I.e. I would look at your "domain is mapped" configuration.


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
  • 17405 posts

Posted 06 November 2017 - 07:50 AM #7

What is the code for product categories? Vendors don't need to see those if they can't add or change them.

 

Use the same algorithm but for the "categories" controller and corresponding modes


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
  • 10607 posts

Posted 06 November 2017 - 05:42 PM #8

When the install script completes, it redirects to the usl with "/admin.php" applied.  It uses whatever protocol (http or https) was used to launch the install script.  From your earlier descriptions it seems you are either getting a permission issue on admin.php or your environment is not allowing the redirect.


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.


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

Posted 08 November 2017 - 08:28 PM #9

Not clear why install script would be doing anything with block_statuses and a SELECT would not be trying to SET any value.

Suggest you contact helpdesk.  It is not an error that I see nor have seen reported.  Hence it will take detailed review of yoru database and server environment. 


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.


 
  • Angeltown
  • Advanced Member
  • Members
  • Join Date: 05-Feb 15
  • 133 posts

Posted 15 November 2017 - 02:47 PM #10

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

 

THANK YOU for this. 

 

Question: Is it possible to do the same in admin for specific Administrators User Groups? We have several levels of support staff and we really need to do better in showing them only the content they need. 


CS-Cart 4.4.3 & CS-Cart Multi-Vendor 4.5.2


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

Posted 16 November 2017 - 05:21 AM #11

THANK YOU for this. 

 

Question: Is it possible to do the same in admin for specific Administrators User Groups? We have several levels of support staff and we really need to do better in showing them only the content they need. 

 

You can associate any controller or mode with permissions in the following schema

 

app/schemas/permissions/admin.php

 

It can be also extended with addons.


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 руб.


 
  • Angeltown
  • Advanced Member
  • Members
  • Join Date: 05-Feb 15
  • 133 posts

Posted 16 November 2017 - 07:52 AM #12

You can associate any controller or mode with permissions in the following schema

 

app/schemas/permissions/admin.php

 

It can be also extended with addons.

 

thank you!


CS-Cart 4.4.3 & CS-Cart Multi-Vendor 4.5.2


 
  • anatol22
  • Newbie
  • Trial users
  • Join Date: 02-Mar 18
  • 5 posts

Posted 05 March 2018 - 05:14 PM #13

That's 

 

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

 

This affects both admin and vendor's panel - no one can see the restricted area anymore. We need it only for vendor's panel, how to achieve that ?



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

Posted 06 March 2018 - 06:41 AM #14

This affects both admin and vendor's panel - no one can see the restricted area anymore. We need it only for vendor's panel, how to achieve that ?

 

Looks like vendor is selected at the top of the page in your case. Just switch to All vendors to see all menu items


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 руб.


 
  • anatol22
  • Newbie
  • Trial users
  • Join Date: 02-Mar 18
  • 5 posts

Posted 06 March 2018 - 07:43 AM #15

Looks like vendor is selected at the top of the page in your case. Just switch to All vendors to see all menu items

I don't really understand your question. What I want to achieve is to hide those menus from vendor's panel only while I need to see it as a store owner in admin area. 



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

Posted 06 March 2018 - 02:02 PM #16

I don't really understand your question. What I want to achieve is to hide those menus from vendor's panel only while I need to see it as a store owner in admin area. 

 

I understand. And the mentioned code hides menu items for vendors only. But if vendor is selected in the admin panel, menu items are also hidden


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 руб.


 
  • anatol22
  • Newbie
  • Trial users
  • Join Date: 02-Mar 18
  • 5 posts

Posted 06 March 2018 - 05:04 PM #17

I understand. And the mentioned code hides menu items for vendors only. But if vendor is selected in the admin panel, menu items are also hidden

Now I understand, thanks.



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

Posted 06 March 2018 - 06:50 PM #18

I don't really understand your question. What I want to achieve is to hide those menus from vendor's panel only while I need to see it as a store owner in admin area. 

Think of it this way....

 

When you select a vendor at the upper left in your admin panel, you ware essentially "acting on behalf of" that vendor as an admin.  I.e. any info or changes should be specific to that vendor only.


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.