Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 78
  1. #51
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Quote Originally Posted by carlwhat View Post
    ok. i'm going to go with i was wrong.... and you are too marton_1; you are not an idiot as you say! ;)

    this looks to be a bug in the code! especially since you loaded it without merging. in:

    \includes\modules\pages\advanced_search_result\header_php.php

    lines 425 -439:

    Code:
    //die('I SEE ' . $_GET['sort'] . ' - ' . PRODUCT_LISTING_DEFAULT_SORT_ORDER);
    if ((!isset($_GET['sort'])) || (!preg_match('/[1-8][ad]/', $_GET['sort'])) || (substr($_GET['sort'], 0 , 1) > sizeof($column_list))) {
      for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
        if ($column_list[$col] == 'PRODUCT_LIST_NAME') {
          $_GET['sort'] = $col+1 . 'a';
          $order_str = ' order by pd.products_name';
          break;
        } else {
          // sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER ia left blank
          // for reverse, descending order use:
          //       $listing_sql .= " order by p.products_sort_order desc, pd.products_name";
          $order_str .= " order by p.products_sort_order, pd.products_name";
          break;
        }
      }
    specifically, line 436. there is an extra period. try removing the period (in red above) to:

    Code:
     $order_str = " order by p.products_sort_order, pd.products_name";
    while i have not implemented this add-on, that period definitely looks wrong to me, and fits the description of your error.

    let us know if that solves it!

    best.
    I really appreciate your help :)

    The good news is that after deleting the period then I do not get the error message!

    The bad news is the sorter does not actually sort!

    The debugger shows for case "sort ascending"
    (includes/modules/pages/advanced_search_result/header_php.php line 366) $multi_sort= order by p.products_price_sorter
    (includes/modules/pages/advanced_search_result/header_php.php line 375) $order_str= order by p.products_price_sorter

    Tedious innit!

  2. #52
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Ok, I have revisited this and found I had done mods and never uploaded them...

    So, please use this new fileset and report back

    https://github.com/torvista/zen-cart...listing_sorter

    and note that regarding the issue with the extra dot or not, both statements should have the dot so it IS a bug in 1.55, fixed in 1.56.
    https://github.com/zencart/zencart/b...header_php.php

    I tested this in a ZC155f new installation.
    Last edited by torvista; 12 Sep 2018 at 06:57 PM.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  3. #53
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Quote Originally Posted by torvista View Post
    Ok, I have revisited this and found I had done mods and never uploaded them...

    So, please use this new fileset and report back

    https://github.com/torvista/zen-cart...listing_sorter

    and note that regarding the issue with the extra dot or not, both statements should have the dot so it IS a bug in 1.55, fixed in 1.56.
    https://github.com/zencart/zencart/b...header_php.php

    I tested this in a ZC155f new installation.
    Great, thanks.

    No more error messages and the various sort options all work fine.

    I just did a quick test by loading the files into my ZC155f test system without doing any of the required merging.
    All the folders named classic I renamed as "my-template".

    I will now withdraw my claim to be "the idiot"! :)

    Many thanks everyone, really, really appreciated :)

  4. #54
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    No more error messages and the various sort options all work fine.
    That's good to know, I could not face any more time staring at the ZC sorting code, it makes your head spin.

    If you are sure that ALL indeed works fine, I'll upload this version....
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  5. #55
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Quote Originally Posted by torvista View Post
    That's good to know, I could not face any more time staring at the ZC sorting code, it makes your head spin.

    If you are sure that ALL indeed works fine, I'll upload this version....
    I tried all the sort options and in each case the sort worked correctly.
    I have ZC155f, green classic template and my test system runs PHP 5.6.24

    Word of caution, I have not yet merged the the plug in with my own files. Need a clear head in the morning for that.

    That PHP code might as well be in Chinese for my understanding :)

    Thanks again

  6. #56
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Did the merges and it works OK.

    I have the SNAF addon for grid rows and columns and \includes\templates\YOUR_TEMPLATE\templates\tpl_index_product_list.php merge was a bit tricky but got there eventually; more luck than judgement :)

  7. #57
    Join Date
    Sep 2017
    Location
    White City
    Posts
    15
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    I am running ZC155f.
    I have a bit of a problem with the sorter drop-down plugin.
    I can get the sorter drop-down to work, but once it is installed. The sorter drop-down doesn't let my Dynamic Attribute filter I have installed function.
    I believe I have narrowed it down to the default_filter.php file that both plugins use. I don't know how to combine the two sets filter sets in the default_filter.php so that that both functions to not conflict with each other.

    Thanks again

  8. #58
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Dynamic Attribute filter
    You are using this
    https://www.zen-cart.com/downloads.php?do=file&id=1361
    the last version?

    I am too busy to look at it, as the whole sorting thing needs a calmer head than I have at the moment, maybe someone else can have a go.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  9. #59
    Join Date
    Sep 2017
    Location
    White City
    Posts
    15
    Plugin Contributions
    0

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Yes, that is the Dynamic Attribute filter that is pre-installed in my Marcus - Zen Cart theme I purchased for ZC155f.

    Her is the Dynamic Attribute filter code that looks to me that is conflicting with Product Listing Sorter Drop-Down code both are in the default_filter.php file.
    Only one or the other default_filter.php will work, not both pieces of codes in the same file. When files are combined the first code worked but not the second.

    Both Dynamic Attribute filter and Product Listing Sorter Drop-Down are the latest versions.

    Here is the Dynamic Attribute filter code from default_filter.php
    ############################################################################
    // bof dynamic filter 1 of 2
    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_DYNAMIC_FILTER));
    // eof dynamic filter 1 of 2

    if (!isset($select_column_list)) $select_column_list = "";
    // show the products of a specified manufacturer
    if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] != '' ) {

    // bof dynamic filter 2 of 2
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']) || isset($_GET[DYNAMIC_FILTER_PREFIX . $categoryGroup])) {
    // We are asked to show only a specific category
    $listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id,
    p.manufacturers_id, m.manufacturers_name, p.products_price, p.products_tax_class_id, pd.products_description,
    if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price,
    p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
    p.products_qty_box_status";

    $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
    " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
    " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
    " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
    " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
    ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
    (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

    $listing_sql .= " WHERE p.products_status = 1" .
    " AND m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
    " AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
    $filter .
    " GROUP BY p.products_id " .
    $having .
    $alpha_sort;
    } else {
    // We show them all
    $listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id,
    p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as
    specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price,
    p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status";

    $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
    " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
    " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
    " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
    ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
    (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

    $listing_sql .= " WHERE p.products_status = 1
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
    $filter .
    " GROUP BY p.products_id " .
    $having .
    $alpha_sort;
    }
    } else {
    // show the products in a given category
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']) || isset($_GET[DYNAMIC_FILTER_PREFIX . $manufacturerGroup])) {
    // We are asked to show only specific category
    $listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id,
    p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as
    specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price,
    p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status";

    $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
    " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
    " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
    " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
    " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
    ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
    (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

    $listing_sql .= " WHERE p.products_status = 1" .
    " and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
    " and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $filter .
    " GROUP BY p.products_id " .
    $having .
    $alpha_sort;
    } else {
    // We show them all
    $listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id,
    p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1,
    s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price,
    p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
    p.products_qty_box_status";

    $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
    " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
    " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
    " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
    ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
    " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
    (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

    $listing_sql .= " WHERE p.products_status = 1
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $filter .
    " GROUP BY p.products_id " .
    $having .
    $alpha_sort;
    }
    }
    // eof dynamic filter 2 of 2



    Here is the Product Listing Sorter Drop-Down code from default_filter.php
    #####################################################################

    //MOD Product Listing Sorter
    if (isset($_GET['product_listing_sorter_id']) && (int)$_GET['product_listing_sorter_id'] > 0) {
    $sorter_list_search = explode(';', '0:reset_placeholder;' . PRODUCT_LISTING_SORTER_LIST);//this constant is the drop-down-list text options

    for ($j = 0, $n = sizeof($sorter_list_search); $j < $n; $j++) {
    if ((int)$_GET['product_listing_sorter_id'] == $j) {//equate the id with the drop-down list to decide the sorting clause
    $elements_sorter_list = explode(':', $sorter_list_search[$j]);
    $pattern_multi = str_replace(',', '', $elements_sorter_list[1]);//@TODO steve eats commas
    $product_listing_sorter = " ORDER BY " . $pattern_multi;
    if ($debug) echo $debug_prefix . __LINE__ . ') ' . '$_GET[\'product_listing_sorter_id\']='.$_GET['product_listing_sorter_id'] . ': $product_listing_sorter=' . $product_listing_sorter . '<br />';
    break;
    }
    }
    } else {//default setting/no selection made/first page load
    $product_listing_sorter = '';
    if ($debug) echo $debug_prefix . __LINE__ . ') ' . 'no selection, $product_listing_sorter=\'\'<br>';
    }
    //eof PLS
    if (!isset($select_column_list)) $select_column_list = "";
    // show the products of a specified manufacturer
    if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] != '' ) {
    if ($debug) echo $debug_prefix.__LINE__.'<br />';//steve
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id'])) {
    if ($debug) echo $debug_prefix.__LINE__.'<br />';//steve
    // We are asked to show only a specific category
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id , " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_status = 1
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'" .
    $alpha_sort . $product_listing_sorter;
    } else {
    if ($debug) echo $debug_prefix.__LINE__.'<br />';//steve
    // We show them all
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m
    where p.products_status = 1
    and pd.products_id = p.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
    $alpha_sort . $product_listing_sorter;
    }
    } else {
    if ($debug) echo $debug_prefix.__LINE__.')<br />';//steve
    // show the products in a given category
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id'])) {
    if ($debug) echo $debug_prefix.__LINE__.'<br />';//steve
    // We are asked to show only specific category
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_status = 1
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['filter_id'] . "'
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $alpha_sort . $product_listing_sorter;//steve PLS mod
    if ($debug) echo $debug_prefix.__LINE__.') $listing_sql:<br />' . $listing_sql . '<br /><br />';//stevee
    } else {
    if ($debug) echo $debug_prefix.__LINE__.')<br />';//steve
    // We show them all
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p2c.products_id = s.products_id
    where p.products_status = 1
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $alpha_sort . $product_listing_sorter;//steve PLS mod
    }
    // }
    }

    // set the default sort order setting from the Admin when not defined by customer
    if (!isset($_GET['sort']) and PRODUCT_LISTING_DEFAULT_SORT_ORDER != '') {
    $_GET['sort'] = PRODUCT_LISTING_DEFAULT_SORT_ORDER;
    if ($debug) echo $debug_prefix.__LINE__.') '.'$_GET[\'sort\']='.$_GET['sort'].'<br />';//steve
    }
    if ($debug) echo $debug_prefix.__LINE__.')<br />';//steve
    if (isset($column_list) && (!isset($_GET['product_listing_sorter_id']) || $_GET['product_listing_sorter_id']==0)) {//are some columns defined? //MOD Product Listing Sorter
    if ($debug) echo $debug_prefix.__LINE__.')<br />';//steve
    if ((!isset($_GET['sort'])) || (isset($_GET['sort']) && !preg_match('/[1-8][ad]/', $_GET['sort'])) || (substr($_GET['sort'], 0, 1) > sizeof($column_list)) ) {
    for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
    if ($debug) echo $debug_prefix.__LINE__.') '.'$i='.$i.'<br />';//steve
    if (isset($column_list[$i]) && $column_list[$i] == 'PRODUCT_LIST_NAME') {//get the column with the PRODUCT_LIST_NAME in it and set the $_GET['sort'] to match its position
    $_GET['sort'] = $i+1 . 'a';
    if ($debug) echo $debug_prefix.__LINE__.') '.'$_GET[\'sort\']='.$_GET['sort'].'<br />';
    $listing_sql .= " order by p.products_sort_order, pd.products_name";
    break;//break out of the for loop when PRODUCT_LIST_NAME is found
    } else {
    if ($debug) echo $debug_prefix.__LINE__.') '.'$_GET[\'sort\']='.$_GET['sort'].'<br />';
    // sort by products_sort_order when PRODUCT_LISTING_DEFAULT_SORT_ORDER is left blank
    // for reverse, descending order use:
    // $listing_sql .= " order by p.products_sort_order desc, pd.products_name";
    $listing_sql .= " order by p.products_sort_order, pd.products_name";
    break;
    }
    }

  10. #60
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Product Listing Sorter Drop-Down [Support Thread]

    Current users should check theirs is still sorting correctly...I found mine was not.

    Note that modifications to this mod are only posted to the Github repository.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 6 of 8 FirstFirst ... 45678 LastLast

Similar Threads

  1. v155 Product Sorter [Support Thread]
    By balihr in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 19 May 2016, 04:35 AM
  2. Replies: 8
    Last Post: 21 Oct 2008, 09:27 PM
  3. remove product listing drop down
    By godt in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 18 Sep 2006, 06:19 AM
  4. Sort Drop Down in Product Listing?
    By Ryk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 29 May 2006, 07:03 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