Re: Admin Profiles Support Thread
Hello
I decided to append the ability of choosing allowed product Categories. My aim is to create the restriction for admin, so he could see, manage and easyly add products and categories only in his own category, like moderators on forums. If anybody is being interested in such contribution, I will gladly post it to site when finish.
I added table "admin_allowed_categories" with columns "categories_id" & "admin_id" to the database and added similar with the native ones functions check_category and category_allowed. I also added row Categories with id 21 to "admin_menu_headers" table.
The first thing i've done was disabling disallowed Categories to show in Categories listing in Admin. That was done by verifing category id in the loop if it was allowed for current admin.
The question is: Am I on the right way, and how it could be done easier? Because there are many "selects" of products and categories in the admin files.
Re: Admin Profiles Support Thread
anafor
this is what I had coded, I needed to be able to restrict any admin to a manufacture and their associated categories.
took some time and money but it does work perfectly so far
Re: Admin Profiles Support Thread
AndyII, thank you for the reply.
Could you post it?
Or, at least give me some good advice how to do it myself?
I would be very appreciate to you.:smile:
Re: Admin Profiles Support Thread
Hello
I just want to announce, that i've finished coding the ability to add permissions for categories. It seems to work fine. If you are interested in it, I think you can get it soon throught download section. If not - mail me.)
Re: Admin Profiles Support Thread
anafor,
Thanks for sharing this as there is a select group of Zenners that have been wanting for something like this
Re: Admin Profiles Support Thread
Re: Admin Profiles Support Thread
I'm glad of making some contribution to the community:smile:
Re: Admin Profiles Support Thread
The latest version in the downloads section is 1.0.7
http://www.zen-cart.com/index.php?ma...products_id=86
1 Attachment(s)
Re: Admin Profiles Support Thread
The contribution has to be checked by administrator first. It is being done twice a week, as ZenCart team tells.
I'd better post it here too.
NOTE: This archive differs from that I've posted to the download section. This one has not critical bug fix.
Re: Admin Profiles Support Thread
:huh:
Code:
#
# Create table structure for table `admin_allowed_categories`
#
DROP TABLE IF EXISTS `admin_allowed_categories`;
CREATE TABLE `admin_allowed_pages` (
`categories_id` int(11) NOT NULL default '0',
`admin_id` int(11) NOT NULL default '0'
) TYPE=MyISAM;