Jump to content

[PS 1.7] Get product id by feature


Tintai
 Share

Recommended Posts

Ok so far I've done this.

I have an array1 with some products with date such "$product->reference;".
And array2 with:

$get_feature_product = Db::getInstance()->executeS('SELECT id_feature_value, id_product FROM '._DB_PREFIX_.'feature_product ORDER BY id_product');

Now I want to check if every product in array1 have a id_feature_value = 90.

I tried something like "$product->id_feature_value;" but it returns NULL.
When I "var_dump($product);" I can see all this data but don't know how to extract it :P

Also I have tried to call function from Product.php, but with no luck.

include ('../../classes/Product.php');
var_dump(getFeaturesStatic($product->id);

Thanks
Tintai

Edited by Tintai (see edit history)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More