Jump to content

Get product attributes from its id


prestashop_newuser

Recommended Posts

In Prestashop I want to get product's all attribute from its product id. Lets say I have a product with id as 3. Now from product id 3 I want to get all of its attribute like name, price, stock, category, product link.. etc.

So far I have tried

 

$product_id = $result['id_product'];
$id_product = (int)$product_id;
$product = new Product(Tools::getValue($id_product));
var_dump($product);

 

But its giving me an array with all attributes in blank. The array can be seen here

So can someone tell me how to get its all attribute from id? Any help and suggestions will be really appreciable. Thanks

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...