You are here:  » The Sidebar filter does not change the pagination.

Support Forum



The Sidebar filter does not change the pagination.

Submitted by Romac39 on Sat, 2012-03-03 09:31 in

If I set the wordpress sidebar filter to find a certain result and the filtered search results are on more then one page, clicking the next button just links me to the second page of the unfiltered results. How can I overcome this?

Submitted by support on Sat, 2012-03-03 12:41

Hi Romac,

From page 1 of the results with a filter applied please could you copy the URLs of both the "1" and the "Next" page links and paste into a reply (i'll examplify before publishing your reply) and I'll check it out...

Cheers,
David.
--
PriceTapestry.com

Submitted by Romac39 on Sun, 2012-03-04 09:25

OK here goes

I click on category Curacao

{link saved}

Then in the filter I choose Appartments as accomodation and apply

{link saved}

Then Page 2 links to:

{link saved}

Cheers David

Submitted by support on Sun, 2012-03-04 13:58

Hello Robert,

I've spotted the problem and will correct this in the plugin distribution. In pto_search.php look for the following code at line 581:

      if ($pto_sort == "relevance")

This is the IF statement that determines whether clean or parameterised URLs are created for the next pages, and should be REPLACED with:

      if (
         ($pto_sort == "relevance")
         &&
         ($pto_minPrice == "")
         &&
         ($pto_maxPrice == "")
         &&
         ($pto_merchantFilter == "")
         &&
         ($pto_categoryPrice == "")
         &&
         ($pto_brandFilter == "")
         )

I know you've been adding custom filters to your plugin isntallation so don't forget to add the equivalent for these too in the above, also make sure that the variables are "globaled" in to the function e.g.

    global $pto_regionFilter;

Cheers,
David.
--
PriceTapestry.com

Submitted by Romac39 on Sun, 2012-03-04 14:16

Yes that did it.

Thanks David