Hi,
I wanted to implement top rated products feature in my custom rating module. I get the correct product IDs from my module database, then I create product instance from it, but still I don't know how to get product name, image, etc.
I tried the following:
foreach($topProductIDs as $topProductID)
{
$topProduct = new Product($topProductID);
$name = $topProduct->getProductName();
$link = $topProduct->getLink();
$link_rewrite = $topProduct->link_rewrite;
...
}
but I got a lot of errors, including:
Missing argument 1 for ProductCore::getProductName()
and that link_rewrite is an array.
I am using Prestashop 1.5.3.1 if that matters.
What am I doing wrong? Maybe there is a better way to get product information from its ID?
Thanks in advance