Jump to content

How can i print(get) all the product details in my own prestashop module page


krishroman

Recommended Posts




In prestashop product_list.tpl file, i can print all the product details by using {print_r($products)}.


 


How can i get all the product details like product_list.tpl page in my custom prestashop module


 


Even i have tried below codes,


 


$products = new Product($row['id_product'], false, Context::getContext()->language->id);


 


but it will give only particular data,can't get(print) full data like product_list.tpl page.


 


I hope you understand my question.


 


Thanks in advance.



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

Hi ndiaga,

 

For example,

 

My module name is demomodule and i have registered HomepageTabContent hook within that module.

 

i.e

 

class DemoModule extends Module

{
.......
}
public function install()
{
......
if(!parent::install() || !$this->registerHook('displayHomeTabContent') || !$this->registerHook('displayTop')|| !$this->registerHook('displayHome'))
return false;
return true;
}
 
public function uninstall()
{
 
....
}
public function getContent()
{
...............
}
 
public function hookDisplayHomeTabContent($params)
{
 
Here i want get(print) the all the product details including final price,tax incl,tax exec,new product,specific prices,etc by using product id & pass this variable to the template file mentioned for this hook
}
Edited by krishroman (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...