Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default [Fixed v1.5.1] Product types Admin Access

    Apologies if this has been addressed elsewhere. I have had a look and can't find it.

    Do product types work with admin profiles?

    Here's what I did.

    1. Create a custom product type as normal.
    2. Realise that a user other than superuser can't edit that product type because product_custom.php is no registered as an admin page.
    3. So, I thought I'd just make an admin page for it ( as there is one for product.php)
    4. That was fine.
    5. But when I try and check/uncheck it in an admin profile it has no effect.
    6. When I enter the row into the admin_pages_to_profiles table then the user can use the custom product. So it all works fine except the checking and uncheckng of that particular page but relies on putting the row in by hand.

    However, I went back and see that the same thing happens if I use, for example, product_music.

    Once again is there something I am missing?

  2. #2
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Product types Admin Access

    This may be what you're looking for:

    http://www.zen-cart.com/forum/showthread.php?t=190594

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Product types Admin Access

    Thanks -- but that is a different issue. Which I know about now that Dr Byte enlightened me :- ) And that fix is already in place on the install that I am working on.

    The issue in that thread results in a return to the main page of admin. This results in a 'you do not have .....' error.

    This has to do with product types rather than registered admin pages.

    Basically the question is what the correct method of registering a page for a custom product type is. My way is to create a separate admin page for this custom product type. Is that the best way of doing it? And if so why I am I still seeing strangeness with the checkboxes even with that fix in place.

    The next question is whether, for instance, product_music works out of the box. By which I mean whether one can edit a product_music type product in a profile other than superuser in a default install.

    In my case I do not seem to be able to which is somewhat strange. But I have not tried this on a completely clean install yet. So....

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Product types Admin Access

    OK. Regarding the second issue.

    On a clean install:

    1. create a second admin profile and call it 'profile 2'

    2. create a new user and add them to profile 2

    3. log out

    4. log in as the new user

    That user cannot edit Product-Music type products. Or in fact any products that are not Product-General.

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Product types Admin Access

    Okay okay.. I admit it.. I'm stalking you niccol!! J/K..

    I have nothing to add only that I'll be following this as I have a membership management and event modules which use custom product types too, and I need to convert these mods to v1.5 too..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Product types Admin Access

    @Diva



    Perhaps you can say if you are seeing the same behaviour?

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Product types Admin Access

    Quote Originally Posted by niccol View Post
    @Diva



    Perhaps you can say if you are seeing the same behaviour?
    No where NEAR installing these on v1.5 to say what behavior I see yet.. Still going through the painstaking process of comparing the core files to v1.5 to make sure that I merge in all the changes.. Your post caught my eye because my mods have custom product types.. I am assuming that since you are seeing this behavior, that I will see the same as you since both of my mods use custom product types.Of course if I get to the point where I have something more substantive to say on the matter, I will indeed share..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Product types Admin Access

    well, I am supposing that the correct thing to do with custom product types is to create an admin page for them. but to be honest this seems a bit odd.

    And that lead me to experiment with the default product types and I had issues there too. So, I think there is something amiss and I will wait to hear from Kuroi or Dr. Byte probably.

    What you could do though is just try :

    On a cleanish install:

    1. create a second admin profile and call it 'profile 2'

    2. create a new user and add them to profile 2

    3. log out

    4. log in as the new user

    5. see if the new user can edit or create product music type products.

    that would at least prove that what I am seeing is not my madness.

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Product types Admin Access

    That I can totally do!!! Will let you know what I discover..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #10
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    bug Re: Product types Admin Access

    OK.

    well I think that this is definitely a bug.

    If I write a change to the security function check_page() then it works the way I think it should ( almost ).

    Basically, I have a query that returns all the product type handlers. Then if the variable $page is in that array I change the variable $page to 'product'. So, a 'product_music' page is verified by check_page() as if it was a 'product' page.

    Which means that if someone has access to editing one product type then they have access to editing them all. Which is a stop-gap solution for me. I am not really keen to post that code as messing around with core security functions doesn't strike me as a stroke of genius. But it does show me that what I believe is true. At the moment the current admin access functions do not deal with product types at all.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Product Access for Admin Profiles?
    By dannyd in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 3 Apr 2013, 06:27 AM
  2. v151 Why isn't Product - General one of the Admin Deniable Product Types?
    By lat9 in forum Customization from the Admin
    Replies: 0
    Last Post: 23 Dec 2012, 10:10 AM
  3. Admin/Catalog/Product Types
    By sewingzfun in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Apr 2011, 02:17 PM
  4. Admin area "easy" mode or product types?
    By bugboy in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Oct 2009, 04:15 PM
  5. error message when clicking 'admin/product types'
    By feolindo in forum Customization from the Admin
    Replies: 2
    Last Post: 24 Aug 2008, 07:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR