PDA

View Full Version : Extra Product Fields 1.0



michael_s
08-01-2009, 03:16 PM
I discovered a problem in advanced search with extra text fields. When using advanced search on any extra field while leaving any extra text field entry empty the search would fail to find anything even though at least one product should match. The problem was that the generated sql search contained code like (extra_value1 like %%) for each empty extra text field when it should have had nothing written in it at all.

To fix the problem if you already have the contribution installed open advanced_search_result.php and find around line 333 the line that reads

if (isset($epf_value_keywords) && (sizeof($epf_value_keywords) > 0)) {

Change it to read as follows:

if (($value != '') && isset($epf_value_keywords) && (sizeof($epf_value_keywords) > 0)) {

The complete package is attached with corrected installation instructions for those who haven't used this contribution before.

More... (http://addons.oscommerce.com/info/6856)