Discussions

Create a view of Similar priced products

Hi, I'm trying to make a block view that display similar priced items to the current product (for similar priced I mean that the other products price should be between 20% higher and 20% lower. For example I'm viewing product A which cost $100, the block view should display product B that cost $85 and C $110 but not D at $130.

Maybe somebody can point me in the correct direction? Thank you and best regards,

Ignacio

Posted: Feb 25, 2012

Comments

andrewappleseed on March 6, 2012

In Drupal 7.
1. Create a view that display your products.example: myproducts
2. Create a Contextual Filter: Price.
3. Add a Filter Criteria: Price
4. Test the view in Preview with contextual filters: myproducts/100

This will list all the products that cost 100.

You could also edit the Query to create a "between", by example: between 100-20 and 100+20.