0

I am having difficulty setting magento price filter.

It seem to be showing the wrong url when selecting any price range

Wrong url: https://www.mysite.co.uk/pc-components/components?price%5B0%5D=0&price%5B1%5D=25

But when I change the url to https://www.mysite.co.uk/pc-components/components?price=0-25

It works fine

I have gone through all the settings and nothing seem to be wrong with it.

Can some one tell me how to fix this issue

1 Answer 1

0

It appears the url is being encoded when it is passed to the GET request. I'm thinking that's probably what is throwing it off. Can you try a urldecode on the parameter before you pass it into the logic to set the price range?

EDIT: As I look at the source I posted, I now see GET variables are decoded by default, so instead of looking to add a decode, you should check to see if the logic to pass the values into the url does some sort of encoding before passing it in. Any luck yet?

6
  • Hi why is coding on very first place? We havnt made any changes to our magento and it is a fresh installation of magento as well. We are using stock in the channel plugin. Can that interfere with urls?
    – shafiq
    Commented Jun 2, 2016 at 21:10
  • No luck with this code so far. Our site is computersdeal.co.uk for your reference
    – shafiq
    Commented Jun 2, 2016 at 21:11
  • Was this working before and suddenly stopped or has this never worked in the first place? I am looking into the plugin you mentioned now. Commented Jun 2, 2016 at 21:15
  • I can see your list items are pointing at the incorrect url via onclick="setLocation('computersdeal.co.uk/…)" I'd need to see the code that builds these list items to figure out why it is building out the setLocation url incorrectly. I would start there and try to figure out how it sets those links. Commented Jun 2, 2016 at 21:19
  • Hi Joshua, no we just installed the magento few days ago I just noticed that the price filter is not working. When you are saying list item pointing to wrong url what you mean by that? I can see everything is going on site computersdeal.co.uk
    – shafiq
    Commented Jun 2, 2016 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.