Results 1 to 10 of 78

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    568
    Plugin Contributions
    0

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

    Quote Originally Posted by carlwhat View Post
    in the read me for this add-on:

    \includes\modules\pages\advanced_search_result\header_php.php - CORE file overwrite, merge differences (creates "order by" sql clause)

    i would suggest that you possibly made an error in the merge differences.

    i would carefully review what you did there. again you have two order by clauses.... it should not be too hard to figure it out. you can also turn debug on, to see when your sql statement goes adrift.

    the odds are strong that the problem resides in your merge as opposed to the package.
    Good suggestion, unfortunately when I use the vanilla original file header_php.php I get the same error message.

    I downloaded the file new from the plugin section of the forum and loaded it into my test site without any merging.

  2. #2
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    568
    Plugin Contributions
    0

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

    Quote Originally Posted by marton_1 View Post
    Good suggestion, unfortunately when I use the vanilla original file header_php.php I get the same error message.

    I downloaded the file new from the plugin section of the forum and loaded it into my test site without any merging.
    I tried downloading the whole plug in and loaded it into my test site without any merging but still get the same error message.

    Even though when I run the debug header_php.php is the only one shown as running.

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,915
    Plugin Contributions
    13

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

    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.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    568
    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!

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,835
    Plugin Contributions
    31

    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: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  6. #6
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    568
    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 :)

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,835
    Plugin Contributions
    31

    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: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. v155 Product Sorter [Support Thread]
    By balihr in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 30 Mar 2026, 08:33 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

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