Forums / Bug Reports / [Done v1.6.0] Advanced Search Result alpha_filter_id included twice in GET parameters

[Done v1.6.0] Advanced Search Result alpha_filter_id included twice in GET parameters

Views: 3,380

Results 1 to 2 of 2
23 Aug 2013, 7:37 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

[Done v1.6.0] Advanced Search Result alpha_filter_id included twice in GET parameters

  1. Search for DVD.
    Address is:

.../zc151/index.php?main_page=advanced_search_result&search_in_description=1&keyword=dvd

  1. Select the alpha sort for A.
    Address is:

.../zc151/index.php?main_page=advanced_search_result&search_in_description=1&keyword=dvd&inc_subcat=0&sort=21a&alpha_filter_id=65

  1. Select the alpha sort for B.

.../zc151/index.php?main_page=advanced_search_result&search_in_description=1&keyword=dvd&inc_subcat=0&sort=21a&alpha_filter_id=65&alpha_filter_id=66

  1. Select the alpha sort for C.

.../zc151/index.php?main_page=advanced_search_result&search_in_description=1&keyword=dvd&inc_subcat=0&sort=21a&alpha_filter_id=66&alpha_filter_id=67

I think in header.php,
change

 if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {

to

 if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') && ($key != 'alpha_filter_id') ) {

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

29 Aug 2013, 3:46 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: [Done v1.6.0] Advanced Search Result alpha_filter_id included twice in GET parameters

Actually, the code change you suggested is not in header_php at all, but rather in the template file. So, for v1.5.1 and older, your fix could be applied to tpl_advanced_search_result_default.php.

But, the better fix is actually broader and is incorporated in the following commit to v1.6.0:
https://github.com/zencart/zencart/commit/0b217e697255fd8e70d1a7047bf1824b37892ef6

and these subsequent tweaks:
https://github.com/zencart/zencart/commit/3791bbede7b38650ef278e07fbac53d483426a2e
https://github.com/zencart/zencart/commit/71aa00a98818a4e965ba2a90ec4cb9862fdf95c4
https://github.com/zencart/zencart/commit/01a3db6035baa9357c9697e559db9b1957134d44

.
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.