Jump to content

How to retrieve all product with a certain "feature" (not category)


Recommended Posts

hello all,
This is my first post here : I hope I post on the appropriate forum, I hope I'll make my questions clear and thank you for your kindness !

Here is my problem (with PS 1.7.4) :

In a .tpl, I need to retrieve a list of products based on a product’s «  Feature » (and not on a product’s category, nor brand).

  • In the administration, I have set up a feature called « collection », with various possible values, e.g. « Levis », etc. 
  • each product is tied to a collection’s value.

Then, how could I get the list of all the product with a certain « collection » value (e.g. all the products that are in the Levi’s collection) ?


In fact, I need something like the « ps_featuredproduct » module...
but that does not use product’s category,  but product’s "feature", to select the products.

 

My questions are :

  • Do you know a static method (that I could call from a smarty’s .tpl) that retrieves the list of products having a given « feature » set to a given feature’s value ?
  • or do you know a (free or paid) module that would fullfil this need ?

And finally :
If I develop my own module, by hacking for example into ps_featured product, how could I write in the module's PHP the appropriate database query, to select all the product having a given « feature » set to a given value ?

I hope my question is clear, and thank you A LOT in advance for your help,

Jérémy

Edited by jdo38
Tipo (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...