Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2009
    Location
    In a traffic jam
    Posts
    2,001
    Plugin Contributions
    1

    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
    Location
    In a traffic jam
    Posts
    2,001
    Plugin Contributions
    1

    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,655
    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;
    See and test drive Zen Cart's free templates at zencarttemplates.info

    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
    Location
    In a traffic jam
    Posts
    2,001
    Plugin Contributions
    1

    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,655
    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
    See and test drive Zen Cart's free templates at zencarttemplates.info

    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
    Location
    In a traffic jam
    Posts
    2,001
    Plugin Contributions
    1

    Default Re: Admin Pages again

    Thanks, Kuroi, for solving my confusion.

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,655
    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.

    See and test drive Zen Cart's free templates at zencarttemplates.info

    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
    60,253
    Blog Entries
    4
    Plugin Contributions
    139

    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!
    Donations always welcome: www.zen-cart.com/donate

    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 Pages Broken After Rename of Store Admin Folder
    By sarshmeh in forum Basic Configuration
    Replies: 4
    Last Post: 26 Mar 2010, 02:41 AM
  2. EZ-Pages not Displaying in Admin/Tools/EZ-Pages
    By fishface in forum Basic Configuration
    Replies: 1
    Last Post: 15 Jan 2010, 03:13 PM
  3. admin pages don't connect but store pages do
    By jandc in forum General Questions
    Replies: 7
    Last Post: 11 Nov 2008, 05:51 PM
  4. Firefox format stripped on cart pages and category pages of admin
    By GimpyMagoo in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 16 Aug 2008, 01:09 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
  •