Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Admin Pages again

    Sorry, another question about admin pages and registration.

    Unusually, I am trying to slot a admin page into the original sort order. Normally of course it should appear at the bottom. In this case I am trying to put it under 'featured'. In the past I have just used the same sort order as 'featured'.

    When I try that now here are the results I get.

    First of all as an example

    table admin_pages
    page_parameters - gID=79
    sort_order = 22

    table configuration group
    configuration_group_id = 79
    sort_order = 22

    When I create those setting manually in phpMyAdmin everything works except that the item appears one line lower than expected. Below All Listing which has a sort order of 23. Which is kind of strange.

    If I create those settings programatically then the page is accessible and in the same place in the menu. However the menu items on that page to not show. (If I then edit the sort orders manually they appear which suggests that everything in table configuration is right)

    So questions:

    Is it possible to put an item directly under an existing item? To explain, I have a mod that creates options for the specials page and it kind of makes sense to put it here as a Specials Listing menu Item.

    What does the sort_order in the configuration_group actually do?

    It is not a big deal. I'll go back to putting it all at the bottom of the list for the time being but it would be nice to now if it is possible.

    Thanks for the help
    Last edited by niccol; 6 Jan 2012 at 11:56 AM. Reason: I wrote fartured instead of featured

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

    Default Re: Admin Pages again

    If I create those settings programatically then the page is accessible and in the same place in the menu. However the menu items on that page to not show. (If I then edit the sort orders manually they appear which suggests that everything in table configuration is right)
    OK. that bit of the issue was due to stupidity on my part.

    However, I still have an issue witht he sort order and the item appearing one lower than I would expect.

    And would appreciate advice about whether this is just a bad thing to do.

  3. #3
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Admin Pages again

    I recommend double checking the sort orders. By default the All listing has a gID of 23, but its sort order is 22. So by putting your new page in with the same sort order, which comes first is a bit random.

    Well maybe not completely random, I'd expect the all to come out first most of the time as it appears earlier in the table than the new entry, but sometimes things may get switched around depending upon how mysql builds a particular query internally.

    To ensure that the new entry comes where you want you need to shuffle the other sort orders up to make space.

    Something like this would do it:

    Code:
    UPDATE admin_pages SET sort_order = sort_order + 1 WHERE menu_key = "configuration" AND sort_order >= 22;
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

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

    Default Re: Admin Pages again

    Yes.

    I had thought of shuffling the order as described but to be honest as long as it appears in the ballpark (somewhere in all, featured, new listings) it is not a big deal about the random(ish) mysql factor.

    So, does the sort order in configuration_group do anything in 1.5? Or is that redundant?

    Thanks for your time , Kuroi. Much appreciated.

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Admin Pages again

    Ah good point. Penny drops. I believe that the configuration group table sort order settings have been superceded by the admin page table's version, making the former redundant (i.e. I can't think of anywhere that would use that now).
    Last edited by kuroi; 6 Jan 2012 at 02:19 PM. Reason: Correction
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

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

    Default Re: Admin Pages again

    Thanks, Kuroi, for solving my confusion.

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Admin Pages again

    I think the confusion is in the code (I forgot about the old sort order) - you've helped provide clarity.

    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Admin Pages again

    Quote Originally Posted by niccol View Post
    What does the sort_order in the configuration_group actually do?
    The sort_order in the configuration_group TABLE is no longer used as of v1.5.0
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. admin disappeared AGAIN
    By magzaloo in forum General Questions
    Replies: 2
    Last Post: 31 Oct 2012, 06:01 PM
  2. Here We Go Again, Admin Images
    By Turtleman in forum Basic Configuration
    Replies: 2
    Last Post: 9 Oct 2007, 08:39 PM

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