Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Modifying the "advanced_search_resu;t" page gives me weird results

    I'm not sure how I can go about fixing this problem. I modified my advanced_search_result header.php file to accomodate for a product type and searches against the data table where the information is. Here is the new modified form.



    After much and some scrambling, I managed to modify my advanced_search_results/header.php file so that is now searches the database and does a proper LEFT JOIN of the tables in question. I now get a proper set of results.



    However, what I noticed is that if you click on any of the navigation helpers (either the next button or page numbers) instead of returning this limited section of results, ZenCart returns the entire dump of the products table:



    Here's something else I noticed, here is the address bar of the first page of results:

    http://www.localhost.com/zencart/index.php?main_page=advanced_search_result&keyword=&search_in_description=1&cate gories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=mm%2Fdd%2Fyyyy&dto=m m%2Fdd%2Fyyyy&ufs_card_type_is=yes&ufs_card_type=&ufs_card_rarity_is=yes&ufs_car d_rarity=&ufs_resources_is=all&ufs_resources%5B%5D=evil&ufs_resources%5B%5D=orde r&ufs_comp_direction=eq&ufs_difficulty=&ufs_keyword_exact=any&ufs_block_mod=&ufs _block_level=&ufs_atk_speed=&ufs_atk_level=&ufs_atk_dmg=&x=43&y=22

    Now here's the page in the address bar when I try to go to the next page:
    http://www.localhost.com/zencart/index.php?main_page=advanced_search_result&search_in_description=1&inc_subcat=1& dfrom=mm%2Fdd%2Fyyyy&dto=mm%2Fdd%2Fyyyy&ufs_card_type_is=yes&ufs_card_rarity_is= yes&ufs_resources_is=all&ufs_comp_direction=eq&ufs_keyword_exact=any&sort=20a&pa ge=2

    So I'm thinking the problem is, where's the rest of my search? Could it be because I included two sets of [] of array builders in the get request that ZenCart sanitized the URL and disabled them? (I used the ufs_resources[] method to build an array of checked of indexes. If anyone else has an idea about how to about this, I'm all ears.)

    Can anyone figure out how do I go about fixing this?

  2. #2
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Re: Modifying the "advanced_search_resu;t" page gives me weird results

    Quote Originally Posted by retched View Post
    Here's something else I noticed, here is the address bar of the first page of results:

    http://www.localhost.com/zencart/index.php?main_page=advanced_search_result&keyword=&search_in_description=1&cate gories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=mm%2Fdd%2Fyyyy&dto=m m%2Fdd%2Fyyyy&ufs_card_type_is=yes&ufs_card_type=&ufs_card_rarity_is=yes&ufs_car d_rarity=&ufs_resources_is=all&ufs_resources%5B%5D=evil&ufs_resources%5B%5D=orde r&ufs_comp_direction=eq&ufs_difficulty=&ufs_keyword_exact=any&ufs_block_mod=&ufs _block_level=&ufs_atk_speed=&ufs_atk_level=&ufs_atk_dmg=&x=43&y=22

    Now here's the page in the address bar when I try to go to the next page:
    http://www.localhost.com/zencart/index.php?main_page=advanced_search_result&search_in_description=1&inc_subcat=1& dfrom=mm%2Fdd%2Fyyyy&dto=mm%2Fdd%2Fyyyy&ufs_card_type_is=yes&ufs_card_rarity_is= yes&ufs_resources_is=all&ufs_comp_direction=eq&ufs_keyword_exact=any&sort=20a&pa ge=2
    Evidently this "problem" was fixed in ZenCart 1.5.3. zen_get_all_get_params will now retrieve the arrays that were being built in the first place. My main problem, I've since come up with a work around making bitfields to "correct" this situation. Now I need to get rid of those [] in the value. So far I tried to add the field with and without the [] at the end of it but they still are output to the screen. Any one with any suggestions on how I should get rid of them? Granted they don't mess with the code since it ignores it but I'd at least like them gone.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 19 Mar 2013, 03:54 PM
  2. Replies: 0
    Last Post: 27 Jul 2012, 06:17 AM
  3. Replacing "Filter Results by ABC" with "Sort by: Price, Date added"
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Aug 2010, 09:18 AM
  4. "Go to Checkout" gives 404 Page Not Found Error
    By MehYourFace in forum Managing Customers and Orders
    Replies: 16
    Last Post: 11 Jul 2010, 05:22 AM
  5. Modifying the "New Product" page
    By jeffdc in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 May 2009, 01:32 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