Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Feb 2009
    Location
    Landrum SC
    Posts
    141
    Plugin Contributions
    0

    Default Option Names ... how do I sort by sort number?

    In v 1.3.9 I had 20 color variations with a sort number of 100
    5 size variations with a sort number of 200
    several numerical options with a sort order of 300

    The result was items are groups and always displayed alphabetically, even after adding new options.

    v1.5.4 only offers sort by Option ID and ID Name.


    How can I get v1.5.4 to sort by sort#?

    TIA

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Option Names ... how do I sort by sort number?

    had 20 color variations with a sort number of 100
    These should not all have the same sort order number
    Use something like
    100
    110
    120
    130
    etc
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2009
    Location
    Landrum SC
    Posts
    141
    Plugin Contributions
    0

    Default Re: Option Names ... how do I sort by sort number?

    Quote Originally Posted by kobra View Post
    These should not all have the same sort order number
    Use something like
    100
    110
    120
    130
    etc

    Why? Even if I did, the display does not sort by sort number, and that's what I want. 1.5.4 offers only two options, ID# and Name.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Option Names ... how do I sort by sort number?

    You can set order in the attributes controller
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Option Names ... how do I sort by sort number?

    Not that I can help....
    I think the OP might be talking about
    Admin
    Catalog
    Option Name Manager
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  6. #6
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Option Names ... how do I sort by sort number?

    When I go to product info on zc 1.5.4, there is the following option: Products Info - Products Option Name Sort Order
    Please make any necessary changes

    Products Info - Products Option Name Sort Order
    Sort order of Option Names for Products Info
    0= Sort Order, Option Name
    1= Option Name

    0
    1

    This allows sorting at least the option names by sort order, and if two or more option names have the same sort order then it is supposed to sort by name... As for the values, there is a sort order there as well...

    If they are not sorting by these values, there is always the store manager under the tools menu, which has a reset option for option names and values... That may restore the sorting that you seem to want for your product.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Feb 2009
    Location
    Landrum SC
    Posts
    141
    Plugin Contributions
    0

    Default Re: Option Names ... how do I sort by sort number?

    Quote Originally Posted by mc12345678 View Post
    When I go to product info on zc 1.5.4, there is the following option: Products Info - Products Option Name Sort Order
    Please make any necessary changes

    Products Info - Products Option Name Sort Order
    Sort order of Option Names for Products Info
    0= Sort Order, Option Name
    1= Option Name

    0
    1

    This allows sorting at least the option names by sort order, and if two or more option names have the same sort order then it is supposed to sort by name... As for the values, there is a sort order there as well...

    If they are not sorting by these values, there is always the store manager under the tools menu, which has a reset option for option names and values... That may restore the sorting that you seem to want for your product.
    I tried that. Products info is set @ 0
    Went to tools/store manager, that did no good either.
    Went to catalog/name sorter ... even changed sort#s. That screen sorted by sort number, but in
    /[admin]/options_name_manager.php, it will still not sort by sort#

  8. #8
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Option Names ... how do I sort by sort number?

    Quote Originally Posted by xcergy View Post
    I tried that. Products info is set @ 0
    Went to tools/store manager, that did no good either.
    Went to catalog/name sorter ... even changed sort#s. That screen sorted by sort number, but in
    /[admin]/options_name_manager.php, it will still not sort by sort#
    Ohhhh.. So the goal has been to display option names in sort order on the option_names_manager this entire time??? Ohh... Well, that can be done with:

    First add the language define file for the following addition:

    in admin/includes/languages/YOUR_LANGUAGE/options_name_manager.php
    add a define for sort order like this:
    Code:
    define('TEXT_OPTION_SORT_ORDER', 'Option Sort Order');
    find, this was around line 562 of admin/options_name_manager.php (line number was referenced from a file that has already been modified to support Stock-By-Attributes and therefore line number is likely off by a bit):
    Code:
                    <td valign="top" align="left"><form name="option_order_by" action="<?php echo zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, 'option_order_by=' . $option_order_by, 'NONSSL'); ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option></select></form></td>
    And "add"/replace with:
    Code:
                    <td valign="top" align="left"><form name="option_order_by" action="<?php echo zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, 'option_order_by=' . $option_order_by, 'NONSSL'); ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option><option value="products_options_sort_order"<?php if ($option_order_by == 'products_options_sort_order') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_SORT_ORDER; ?></option></select></form></td>
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Option Names ... how do I sort by sort number?

    Quote Originally Posted by mc12345678 View Post
    Ohhhh.. So the goal has been to display option names in sort order on the option_names_manager this entire time??? Ohh... Well, that can be done with:

    First add the language define file for the following addition:

    in admin/includes/languages/YOUR_LANGUAGE/options_name_manager.php
    add a define for sort order like this:
    Code:
    define('TEXT_OPTION_SORT_ORDER', 'Option Sort Order');
    find, this was around line 562 of admin/options_name_manager.php (line number was referenced from a file that has already been modified to support Stock-By-Attributes and therefore line number is likely off by a bit):
    Code:
                    <td valign="top" align="left"><form name="option_order_by" action="<?php echo zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, 'option_order_by=' . $option_order_by, 'NONSSL'); ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option></select></form></td>
    And "add"/replace with:
    Code:
                    <td valign="top" align="left"><form name="option_order_by" action="<?php echo zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, 'option_order_by=' . $option_order_by, 'NONSSL'); ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option><option value="products_options_sort_order"<?php if ($option_order_by == 'products_options_sort_order') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_SORT_ORDER; ?></option></select></form></td>
    If want an Ascending/Descending option, then:
    Code:
                    <td valign="top" align="left"><form  name="option_order_by" action="<?php echo  zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, 'option_order_by=' .  $option_order_by, 'NONSSL'); ?>"><select name="selected"  onChange="go_option()"><option value="products_options_id"<?php  if ($option_order_by == 'products_options_id') { echo ' SELECTED'; }  ?>><?php echo TEXT_OPTION_ID; ?></option><option  value="products_options_name"<?php if ($option_order_by ==  'products_options_name') { echo ' SELECTED'; } ?>><?php echo  TEXT_OPTION_NAME; ?></option><option  value="products_options_sort_order ASC"<?php if ($option_order_by ==  'products_options_sort_order ASC') { echo ' SELECTED'; } ?>><?php  echo TEXT_OPTION_SORT_ORDER_ASC; ?></option><option  value="products_options_sort_order DESC"<?php if ($option_order_by ==  'products_options_sort_order DESC') { echo ' SELECTED'; } ?>><?php  echo TEXT_OPTION_SORT_ORDER_DESC; ?></option></select></form></td>
    in admin/includes/languages/YOUR_LANGUAGE/options_name_manager.php
    add a define for sort order like this:
    Code:
    define('TEXT_OPTION_SORT_ORDER_ASC', 'Option Sort Order ASC');
    Code:
    define('TEXT_OPTION_SORT_ORDER_DESC', 'Option Sort Order DESC');
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Option Names ... how do I sort by sort number?

    @xcergy,

    Please in the future be more specific about the problem. Doesn't require a lot of words, or complete sentences, but if had known that the issue was at admin/options_name_manager.php then a solution could have been provided a lot sooner... Yes, my "last" post was a few hours after RixStix had offered a potential location to "fix" which was confirmed hours after that post, but I had begun my post many hours before that and had wanted to wait to respond until I had at least reviewed my post. Finally reviewed and considered acceptable for posting (though didn't confirm what had already been added to the thread).

    Anyways, my previous postings were with concern more about the store front part of operation. Yes I could have asked about where the issue was instead of offering "blind" advice... Please though, help everyone to be able to help you, give enought detail to reproduce the issue or to see where it is an issue (No, no one expects you to post your admin credentials).

    Hope that helped. BTW, for anyone else that stumbles upon this looking for the same type thing, the value that is in the option value="" part is used as the mysql sort order criteria...

    So if want to sort by other criteria or combinations of criteria, then can replace the pair of data with that new criteria and provide whatever "human readable" text represents that sort order in the language define...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Product Sort within Category - having problems changing the default sort order
    By Don Wagner in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Oct 2012, 03:03 AM
  2. Dealing with Options Names, sort orders, when product share similar names?
    By printchic in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 15 Jun 2009, 01:53 PM
  3. Product Listing Sort Error (sort by price ... doesn't)
    By Alex Clarke in forum General Questions
    Replies: 12
    Last Post: 18 Mar 2009, 12:02 AM
  4. How to sort option names and values?
    By helphelphelp in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Nov 2007, 01:05 PM
  5. two part quetions.. how to sort based on model number?
    By tony_sar in forum Basic Configuration
    Replies: 1
    Last Post: 3 Nov 2006, 07:17 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