Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    9
    Plugin Contributions
    0

    Default Sortorder in options_values_manager.php

    Is there a way to sort the data in options_values_manager.php by Attributname? At this point it looks like there is no sortorder at all.
    When I have to change a value it's hard to find the Attributname I need. There is also no search-option to find a Attributename.

    What I want is to sort the data by Attributename.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sortorder in options_values_manager.php

    They are grouped but the Option Name and then sorted on the Sort Order ...

    If you look around line 641 in the options_values_managers.php you will find the SELECT statement:
    PHP Code:
        $values "select pov.products_options_values_id, pov.products_options_values_name, pov2po.products_options_id, pov.products_options_values_sort_order from " TABLE_PRODUCTS_OPTIONS_VALUES " pov left join " TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS " pov2po on pov.products_options_values_id = pov2po.products_options_values_id     left join " TABLE_PRODUCTS_OPTIONS " po on pov2po.products_options_id = po.products_options_id where pov.language_id = '" . (int)$_SESSION['languages_id'] . "' and po.language_id = pov.language_id and pov2po.products_options_values_id !='" PRODUCTS_OPTIONS_VALUES_TEXT_ID "' order by  po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0'), pov.products_options_values_name"
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2006
    Posts
    9
    Plugin Contributions
    0

    Default Re: Sortorder in options_values_manager.php

    Quote Originally Posted by Ajeh View Post
    They are grouped but the Option Name and then sorted on the Sort Order ...

    If you look around line 641 in the options_values_managers.php you will find the SELECT statement:
    PHP Code:
        $values "select pov.products_options_values_id, pov.products_options_values_name, pov2po.products_options_id, pov.products_options_values_sort_order from " TABLE_PRODUCTS_OPTIONS_VALUES " pov left join " TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS " pov2po on pov.products_options_values_id = pov2po.products_options_values_id     left join " TABLE_PRODUCTS_OPTIONS " po on pov2po.products_options_id = po.products_options_id where pov.language_id = '" . (int)$_SESSION['languages_id'] . "' and po.language_id = pov.language_id and pov2po.products_options_values_id !='" PRODUCTS_OPTIONS_VALUES_TEXT_ID "' order by  po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0'), pov.products_options_values_name"
    Thanks for your answer, but what do I need to change? I want the tabel to sort just by Attributename.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sortorder in options_values_manager.php

    You can rearrange the order by and put the three in the order you want them ...

    currently it reads as ...
    Option Name - po.products_options_name
    Option Value Sort Order - LPAD(pov.products_options_values_sort_order,11,'0')
    Option Value Name - pov.products_options_values_name

    Code:
    "' order by  po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0'), pov.products_options_values_name"
    You can change those to a different order to alter the display ...

    However, as most assign a Sort Order to the Options Values, it is really handy to see them in that order to know how you have them sorted by default ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v154 application/x-httpd-php html_header.php PHP script text
    By Parafanaylya in forum General Questions
    Replies: 3
    Last Post: 29 Aug 2015, 03:06 PM
  2. Replies: 4
    Last Post: 17 Jul 2015, 04:44 AM
  3. Replies: 0
    Last Post: 6 Jan 2014, 03:38 PM
  4. Linking Page_2.php, Page_3.php, Page_4.php In Footer
    By gws76 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 May 2007, 10:59 PM

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