0

In my project, I have a requirement where I need to filter simple products based on price.

In default Magento, the filtering of price is based on configurable products.

Some important points related to my project are:

  • The simple products in are associated with the configurable products.
  • Each configurable product has three types of simple products associated with it.

For example, if the configurable product is A, then the associated simple products are A1, A2 and A3.

PS: After failing to hold the grip even after digging deeper in Magento core files, I am asking here.

Please give some clear suggestions.

1 Answer 1

0

I was associating the simple products with configurable products using a user defined dropdown attribute, p_type, which holds three unique numbers which are identification to the associated simple products.

While filtering through price, I observed that the url is having a query string as ?price=3000-4999. I just added the p_type attribute to that query string to filter according to the simple products instead of configurable products.

For example,

http://mywebsite.com/categoryName/?price=3000-4999&p_type=126

This worked for me :)

and also in my case, the simple products were set as invisible as single product. So, I did some other changes too.

1
  • this is not work for me Commented Jul 3, 2017 at 9:15

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.