[Skip to main content](#vessel-content)

#   Direct link to filter messes up pagination

##

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#151400](#151400) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151400 "-- url of the page with the problem -- :...")* was created by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")*

-- url of the page with the problem -- : [ 209.59.173.183/mattresses/category.html?...filtered=1&amp;reseted=0](http://209.59.173.183/mattresses/category.html?filter_Price_Range=1&filter_Price_Range_values=599+-+20000&filter_Mattress_Firmness=&filter_Mattress_Firmness_values=1+-+6&filter_Mattress_Brand=+&filter_Mattress_Size=+&filter_Mattress_Type=+&return_url=%2Fmattresses%2Fcategory.html&filtered=1&reseted=0)
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.3
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi I have a problem where I want a direct link to a filter url. I need to have a page that lists all products $599 and more for the price. This link is linked from an image so I cannot use the actual filter that is why I have to have a direct link. The filter url I listed above works but it messes up the pagination on the results and the pagination just does not work at all. The pagination will not go past page 1. The only way to see all the products is to change the display to all. How can I fix this?

I am supposed to launch the store in 1 day. Any help would be greatly appreciated.

Thanks,

Josh

Last edit: 12 years 7 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 7 months ago [\#151539](#151539) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151539 "-- url of the page with the problem -- :...")*

Hello Josh,
I just tested it and it seems to be working fine :
[ ![he510bc9.jpg](/forum/attachment/16599) ](/forum/attachment/16599 "he510bc9.jpg")

- [ ![he510bc9.jpg](/forum/attachment/16599) ](/forum/attachment/16599 "he510bc9.jpg") [ ](/forum/attachment/16599?download=1 "he510bc9.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#151541](#151541) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151541 "-- url of the page with the problem -- :...")*

Hi thanks for the response but it is not working click on page 2, page 3 or page 4 it will not change pages it just reloads page 1 again. The pagination navigation just does not work at all when you use a direct filter link.

How do I get this to work?

Last edit: 12 years 7 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 7 months ago [\#151783](#151783) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151783 "-- url of the page with the problem -- :...")*

Hi,

The problem comes from the URL parameters.
The way that the Joomla pagination works, it use the current url and submit a form to say that you want to change the page.

So, it will reload the current page and ask to display the page 2. But in your parameters, you forced some filters which are applied and put you in the first page (because potentially, some filters have changed).
If you apply the filters using the button "Find your Mattress!", you will have a clean url and you will be able to change the pagination.

So I will recommend you for the moment to redirect the user to the "short" url when giving some filters parameters. At this moment the parameters won't be in the url when changing the pagination.

I will create a bug issue in our tracker to fix in HikaShop as soon as possible.
There are several possible solution for this problem and I don't know which one the team will prefer.
But we will fix it.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 7 months ago [\#151845](#151845) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151845 "-- url of the page with the problem -- :...")*

Thank you for the response please let me know when it is fixed. The problem with using the find your mattress is I have an image that says free shipping on orders 599 and over and it needs to have a direct link to a filter that lists all products 599 and over and this cannot be done by the short link because it is always the same url so there is no way to link to this.

Are you saying to actually create a link to this url but have the below url redirect to /mattresses/category.html which is the shorter url until yall get it fixed?
/mattresses/category.html?filter_Price_Range=1&amp;filter_Price_Range_values=599+-+20000&amp;filter_Mattress_Firmness=&amp;filter_Mattress_Firmness_values=1+-+6&amp;filter_Mattress_Brand=+&amp;filter_Mattress_Size=+&amp;filter_Mattress_Type=+&amp;return_url=%2Fmattresses%2Fcategory.html&amp;filtered=1&amp;reseted=0

Thanks,

Josh

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

12 years 7 months ago [\#151906](#151906) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#151906 "-- url of the page with the problem -- :...")*

Hi,

Change the line: Code:

if(!is_null($new_filter)){

to: Code:

$cid = JRequest::getInt("cid",'itemid_'.JRequest::getInt("Itemid",0)); $oldValue = $app-&gt;getUserState('com_hikashop.'.$cid.'_filter_'.$filter-&gt;filter_namekey, ''); if(!is_null($new_filter) &amp;&amp; $new_filter!=$oldValue){

in the file administrator/components/com_hikashop/classes/filter.php and that will allow the filtering system to not reset the pagination on each page when you set the filter via the URL instead of using the POST like we do with the default filters display.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#152134](#152134) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#152134 "-- url of the page with the problem -- :...")*

I am getting an Parse error: syntax error, unexpected T_STRING in line 1

Any ideas?

Thanks,

Josh

Last edit: 12 years 7 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#152141](#152141) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#152141 "-- url of the page with the problem -- :...")*

It is working now. It is something weird in how you paste the text into the file. Sometimes it gives a parse error. I am using notepad ++ so I am not sure why it is doing this. I just edited it in regular notepad and it worked fine now.

Thanks,

Josh

Last edit: 12 years 7 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 7 months ago -  12 years 7 months ago [\#152144](#152144) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Direct link to filter messes up pagination](/forum/45-filters-search/867295-direct-link-to-filter-messes-up-pagination#152144 "-- url of the page with the problem -- :...")*

Hi,

Glad to hear that it's ok now. And thanks to have given the solution to your problem.

Last edit: 12 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NzI5NS1kaXJlY3QtbGluay10by1maWx0ZXItbWVzc2VzLXVwLXBhZ2luYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.077 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
