I am working on Prestashop and I would like to retrieve the data from a table I created in my database. I've been on it for 2 days and nothing works, I'll go crazy.
Here is the code I put in my ProductController.php file:
private function GetAvailableAttributes($id_produit, $id_compte, $note)
{
global $smarty;
$sql = 'SELECT id_produit, id_compte, note
FROM `'.'ps_product_avis';
$ess=mysql_result($sql,0);
$smarty->assign('contact', $ess);
}
Here is the code put in the product.tpl file:
<li>test :{$contact}</li>
Here's the mistake it gives:
Could one of you save me and explain where the problem comes from please?
I thank you in advance.