Forums / General Questions / Duplicates in advanced search results by price

Duplicates in advanced search results by price

Views: 1,646

Results 1 to 11 of 11
2 May 2012, 9:24 PM
#1
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Duplicates in advanced search results by price

New install of V1.5
Template = Bloom Blue Theme

Changes - all products use the product_music type to be entered in admin
(ie) music_genre = Ocassion
(ie) record_company = Recipent

If you look at the site and the drop downs to do a search by Ocassion or Receipent they all work fine (not showing duplicates)
http://wickerwarehouse.co.uk/lladro/index.php?main_page=index&typefilter=music_genre&music_genre_id=13
http://wickerwarehouse.co.uk/lladro/index.php?main_page=index&typefilter=record_company&record_company_id=2

HOWEVER if you do the search by price
http://wickerwarehouse.co.uk/lladro/index.php?main_page=advanced_search - or
http://wickerwarehouse.co.uk/lladro/index.php?main_page=advanced_search_result&keyword=Search+for...&search_in_description=1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=51&pto=100&dfrom=&dto=&x=22&y=16

It brings up DUPLICATES. There are no duplicate products in admin, it is not showing any linked products in admin and have checked the database.

I have re-checked the tpl_advanced_search_default and tpl_advanced_search_results and these files have NOT been changed at all - still the origional ones.

I am stumped. Site is not live yet as still trying to fix this issue. Any help or suggestions would be appreciated.:huh:

8 May 2012, 12:40 PM
#2
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Duplicates in advanced search results by price

Anyone willing to help me with this please, I am at a loss as to what to check next :( and I have been trying to read alot of other posts but maybe I am not understanding what I need to change.

8 May 2012, 5:52 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Duplicates in advanced search results by price

Could you make sure that the files:
/includes/modules/pages/advanced_search/header_php.php
/includes/modules/pages/advanced_search_results/header_php.php
/includes/index_filters/music_genre_filter.php
/includes/index_filters/default_filter.php

are current and match the clean files from Zen Cart v1.5 ...

What happens if you switch to the Classic Template?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 May 2012, 6:49 PM
#4
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Duplicates in advanced search results by price

Thank you so much for replying - see my notes below next to yours.

Ajeh:

Could you make sure that the files:
/includes/modules/pages/advanced_search/header_php.php (current & match clean file from v1.5) - used Winmerge
/includes/modules/pages/advanced_search_results/header_php.php (current & matches clean file from v1.5)
/includes/index_filters/music_genre_filter.php (current & matches clean file from v1.5)
/includes/index_filters/default_filter.php (different - see code difference below)

are current and match the clean files from Zen Cart v1.5 ...

What happens if you switch to the Classic Template?
Interesting - it returns the result as "There is no product that matches the search criteria." This is when I do a search by from - to price. (i.e. 51 to 100)

In the file default_filter.php I have the following differences:
Line 3 - * SNAF version 1.0
All other code is the same, except for this section added in from line 143 to 161
//=========== bof SNAF (add order by to listing sql)
if(isset($_GET['disp_order']) and $_GET['disp_order']!='')
{
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
// strip off any existing order by just in case
$listing_temp = explode('order by',$listing_sql);
$listing_sql = $listing_temp[0].$order_by;
}
//=========== eof SNAF (add order by to listing sql)

//=========== bof SNAF (use filter or not)
if(zen_get_configuration_key_value('USE_PRODUCT_LISTING_FILTER_FOR_PRODUCT_LISTING')=='True')
{
$show_product_listing_filter = true;
}else{
$show_product_listing_filter = false;
}

//=========== bof SNAF (use filter or not)

8 May 2012, 6:53 PM
#5
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Duplicates in advanced search results by price

PS: If I replace that file with the origional default_filter.php file I still get the same problem? (duplicates in the search) this is if I use my saved drop down searches or even if I start a new advanced search and put in a from and to price.

8 May 2012, 9:30 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Duplicates in advanced search results by price

I cannot reproduce this issue ...

I do not know if it is your add on or not ...

What happens if you replaces that file with the original file?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 May 2012, 10:33 PM
#7
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Duplicates in advanced search results by price

Ajeh:

I cannot reproduce this issue ...

I do not know if it is your add on or not ...

What happens if you replaces that file with the original file?

I have replaced the file with the origional and it still does the exact same thing - duplicates the results. Have a look at
http://wickerwarehouse.co.uk/lladro/index.php?main_page=advanced_search_result&keyword=Search+for...&search_in_description=1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=51&pto=100&dfrom=&dto=&x=22&y=16

Or go to advanced search (just click on the word search at the top) and do a search by from and to price only. The results would say (Displaying 1 to 4 (of 4 products)

however there are 8 products on the current page - 4 of which are duplicated. :unsure:

8 May 2012, 10:41 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Duplicates in advanced search results by price

Maybe someone who uses that add on can jump in to help you ...

I cannot reproduce this in a clean v1.5 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 May 2012, 11:11 PM
#9
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Duplicates in advanced search results by price

Thank you. I have reposted it into the SNAF thread. Thanks for all your time in trying to help me - greatly appreciated

9 May 2012, 2:45 PM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Duplicates in advanced search results by price

gandalfsmith:

Thank you. I have reposted it into the SNAF thread. Thanks for all your time in trying to help me - greatly appreciated
Gonna re-post what I posted on the SNAF support thread here.. seems like this discussion should be continued here since it is likely a problem with your template.. (Is it a Pixemus or 12Leaves template??)

Don't think it's SNAF.. Just tried it and I can't replicate this issue on my client's site.. no matter what I try I don't get duplicate products the way your site does..

Another quick test you could try is to see if your template has an override file for the advanced search page.. This seems like a logical place to start to look for an issue.. This might narrow things down a bit..

Also you might want to contact the provider of your template and see if they can help troubleshoot.. I should think they would want to fix the issue if it is an issue with their template (which seems most likely..)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

18 May 2012, 4:27 PM
#11
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Duplicates in advanced search results by price

Just thought I would add my thoughts as I am responsible for SNAF.

I kind of agree with Diva in that it starts to look like an issue with the template. But am happy to look at it more. If it is with Snaf then I want to find it.

As usual the thing to do is to switch to classic template briefly and see what results you are getting. Then possibly install SNAF into the classic template too and see what results you are getting.

As far as the edits in default_filter.php go. I can't see how they would create the results that you are describing but I am most definitely not infallible :-) Basically all they do is strip off any existing ORDER BY and add a new ORDER BY for the dropdown filters in SNAF. If you revert to the default zen version of this file you say that the problem remains so you can be pretty sure it is not the changes in SNAF that cause the issue.

Keep me in touch with how you get on

gandalfsmith:

Thank you. I have reposted it into the SNAF thread. Thanks for all your time in trying to help me - greatly appreciated

Nick
iszent.com