Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    7
    Plugin Contributions
    0

    red flag [done 1.3.7] default_filter.php bug

    Hello,

    This is not a question but a answer on a query error.

    I have solved, after long searching, a query error in the de default_filter.php.
    In de left join (▒ row 41) there where also a table presentation (TABLE_PRODUCTS_TO_CATEGORIES p2c) witch not should be done there.

    The correct piece is:

    // We show them all
    $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, 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 from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.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 . "'";

    With kindley regards,

    Cees Stoltenkamp

  2. #2
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: default_filter.php BUG

    what version of Zen Cart are you suggesting this applies to?
    and what problem are you suggesting this fixes ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  3. #3
    Join Date
    Jan 2007
    Posts
    7
    Plugin Contributions
    0

    Have a Drink Re: default_filter.php bug

    Hello

    It does not matter, from 1.3.0.* till the most recent version.
    In all of them thereis made the same mistake.

    The reason for this problem is a newer version of MySQL
    Server versie: 5.0.24a-community-nt

    This version is somehow stricter then previeus versions in using the JOIN statements, jou can find comments about that on the Internet.

    But overall, I think, its a fault.

    left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . //til here it's Ok (dont forget to remove the ",")
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    But this last part, belong somewhere else, so I put it where I think it belongs, in the FROM part of the SQL statement.


    Greetings Cees

  4. #4
    Join Date
    Jan 2007
    Posts
    7
    Plugin Contributions
    0

    Have a Drink Re: default_filter.php bug

    Sorry

    Forget to say the MySQL error message you then get.

    Message:
    1054 Unknown column 'p.products_id' in 'on clause'

    When I use the newer defaul_filter.php in Zencart 1.3.0.*
    Message:
    Illegal Access

    Cees

  5. #5
    Join Date
    Jan 2007
    Posts
    7
    Plugin Contributions
    0

    help question Re: default_filter.php bug

    Hello

    After a meeting we decide that the problem not suffisient is solved, there has to be done something with that second part of the LEFT JOIN or it should work.

    We now still searching the MySQL for fixing this problem, if there is some other solution let us know

    Ok, ok, I get now the solution
    The second JOIN uses a wrong id-field
    p.products_id = s.products_id must be?
    p2c.products_id = s.products_id

    This solutions is one we can accept, and we will stop searching now.

    But still it is wrong in all versions after 1.3.0.*, we don't understands that it was not a problem before.

    Or is the problem NOT solved, in our case it works fine now.

    I hope someone can give us the answer about that.

    Cees

  6. #6
    Join Date
    Jan 2007
    Posts
    7
    Plugin Contributions
    0

    Default Re: default_filter.php bug

    Sorry,

    This is realy the last time.
    In the latest version the problem IS solved as we suggested.

    Problem is solved for Zencart > 1.3.0.*.

    Cees

  7. #7
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: default_filter.php bug

    Cees,
    Thank you for confirming that this is not a problem in v1.3.7+
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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. Replies: 1
    Last Post: 29 Aug 2013, 05:57 AM
  2. [Done v1.3.9e] Bug in function_email.php
    By Zippovich in forum Bug Reports
    Replies: 0
    Last Post: 14 Jul 2010, 12:21 PM
  3. Replies: 0
    Last Post: 19 Dec 2007, 05:20 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