Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36
  1. #11
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,694
    Plugin Contributions
    9

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by mikeel100 View Post
    ....
    What are the relevant files?
    oh my....

    if only it was 1 file...

    i think you are looking for a world of hurt here... and if i were to point you in the direction of which files are necessary, i would get caught up into more than i would like to chew right now...

    and then there is the potential wrist slap for directing people to use code not yet released....

    the difference in searching between 158a and 200 are vast, a new class file and the like (of which i am a fan)... but whether that class file is automatically loaded or you need some load config files to get that class loaded, i can not say... far too much work/time for me to dig into at the moment...

    perhaps someone else could help... the code is all out on github, but for me to help... well, this is a task for someone with more time and inclination...
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  2. #12
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Well $%^^...that puts a damper on my upgrade.

    I appreciate your honesty and insight.

    I'll dig in to the 1.5.8a files and see where it leads me.

    I built a good search engine for mass moving of products. Maybe I can adapt it for my purposes until 2.0 releases.

    Thanks.

  3. #13
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    I think I figured out why the pricing search isn't working.

    If you use 0 for the from price and 25 for the to price, it fails every time.

    But if you use 0.00 - 25.00, it returns products in that price range.

    So, something has to be put in the header_php.php to account for no decimals being used on the input page.

    I.E. if $pfrom or $pto do not contain a decimal, then put .00 on the end of them so everything will work.

    I'll be trying to figure out where that needs to happen, but, if anyone knows where to do it, I'd appreciate the info.

    I did verify this test on a fresh install with no modifications...as long as you use decimals, it works.

    Thanks.
    Last edited by mikeel100; 3 Feb 2024 at 04:18 AM. Reason: correction

  4. #14
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,694
    Plugin Contributions
    9

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by mikeel100 View Post
    ...
    I'll be trying to figure out where that needs to happen, but, if anyone knows where to do it, I'd appreciate the info.
    ...
    Thanks.
    mike eel!!
    you did the hard work, i'll do the easy part....

    try replacing this file with the version in this link.

    in my development suite, taking a v158a release and replacing that file gives the expected results.

    as to what else may be disturbed by that change, i will leave it to you to figure out...

    actually, in looking at the file, the only thing changed was the bug that you found that was addressed. and another addition for sanitizing sale_category.

    i think no problems...

    the change is on line 120, you need an added ?

    PHP Code:
    //from
    if (isset($_GET[$key]) && !preg_match('/^\d+(\.\d+)/'$_GET[$key])) {
    //to
    if (isset($_GET[$key]) && !preg_match('/^\d+(\.\d+)?/'$_GET[$key])) { 
    let us know if that works.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #15
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Thanks. I would have never figured that out since I am vaguely familiar with that coding.

    I'll plugin the change after breakfast.

  6. #16
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by carlwhat View Post
    mike eel!!
    you did the hard work, i'll do the easy part....

    try replacing this file with the version in this link.

    in my development suite, taking a v158a release and replacing that file gives the expected results.

    as to what else may be disturbed by that change, i will leave it to you to figure out...

    actually, in looking at the file, the only thing changed was the bug that you found that was addressed. and another addition for sanitizing sale_category.

    i think no problems...

    the change is on line 120, you need an added ?

    PHP Code:
    //from
    if (isset($_GET[$key]) && !preg_match('/^\d+(\.\d+)/'$_GET[$key])) {
    //to
    if (isset($_GET[$key]) && !preg_match('/^\d+(\.\d+)?/'$_GET[$key])) { 
    let us know if that works.

    best.
    The missing ? definitely fixed the issue in the unmodified install.

    It helps in my plugin, but, the pagination disappears when I go to the second page of the results.

    I'm not finished with merging all of my changes yet, so, I'll wait and see how it works after that is done.

    Thanks again.

  7. #17
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by mikeel100 View Post
    Search is not working properly in my fresh install of 1.5.8a. My installation specifics are at the end of this post.

    I downloaded a new copy on Jan 21 and I have 2 fresh installs...one with no mods and the other with zca_bootstrap. These are my fallback troubleshooting installs to make sure any changes I make to my plug-in are not what is causing any issues I run into.

    This search:

    Code:
    https://localhost/zencart-1.5.8a_unmodified/index.php?main_page=search_result&keyword=.+or+-&search_in_description=1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=100&pto=200&dfrom=&dto=

    #1 - returns every single product in the catalog...regardless of price.

    #2 - I had to put in a period or dash in the text box...leaving it blank is not allowed and putting a single space in makes it look like the search is empty. Being empty or allowing spaces should be allowed. If I want to do a price range search, I want it to return all products in that price range.

    #3 - Same issue if you select a single manufacturer...text box can't be blank or have a single space. What if I want to see all of that manufacturers products? I know, there are other tools for doing that but those tools disappear on mobile devices or smaller screens now.

    #4 - Same issue when selecting a category...


    Any further joy on this?

    I am also struggling with the search on 158a and am experiencing issues #1 and #2 as listed here.

    I've replaced the suggested files but am getting some odd results.

    My gripe is getting search by price range to work as it should.

    After replacing the files, in some instances it appears to work as it should.

    In another test though where I entered a price range, it only shows products with a '+' in the title!

  8. #18
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Further to this.

    I am specifically testing to find products on my site with a price of $48.

    With the init_sanitise fix in place I'm getting results like this -

    (In all these tests I have something in the keywords)-

    From $48 to $48 - I get all appropriately priced products with a '+' in the title
    From $40 to $48 - same result
    From $0 to $48 - it seems to work as it should.

  9. #19
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    383
    Plugin Contributions
    0

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by royaldave View Post
    Further to this.

    I am specifically testing to find products on my site with a price of $48.

    With the init_sanitise fix in place I'm getting results like this -

    (In all these tests I have something in the keywords)-

    From $48 to $48 - I get all appropriately priced products with a '+' in the title
    From $40 to $48 - same result
    From $0 to $48 - it seems to work as it should.
    Try putting 0.00 and 48.00 for the search.

    If it works, you are missing the aforementioned question mark in sanitize file.

    Mine started working after I updated the sanitize file.

    Good luck.

  10. #20
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Re: PHP 8.0 - Search function not working properly following upgrade to 1.5.8

    Quote Originally Posted by mikeel100 View Post
    Try putting 0.00 and 48.00 for the search.

    If it works, you are missing the aforementioned question mark in sanitize file.

    Mine started working after I updated the sanitize file.

    Good luck.
    I have tried that. Updating the sanitize makes it better, but it doesn't work 100%.

    As per my examples above, if I do 48 to 48 it only shows products with a '+' in the title (why?)
    Same for 46 to 48, and 47 to 48.

    However if I do 45 to 48 it works as it should! And also 0 to 48.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Search function not working properly (collation problem)
    By dennisysh in forum General Questions
    Replies: 9
    Last Post: 27 Apr 2010, 05:27 PM
  2. Search function no longer working after doing an upgrade...
    By accension in forum General Questions
    Replies: 5
    Last Post: 24 Jan 2008, 11:19 PM
  3. My search function does not work properly
    By idtags in forum General Questions
    Replies: 2
    Last Post: 1 Nov 2007, 05:40 PM
  4. Search function not working properly
    By THISclose in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 4 Mar 2007, 07:00 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