Jump to content

Problem to add table


Recommended Posts

Hi all ! :)

 

I have create a new table called "ps_product_avis" in my database to add a field of notation in my product.

 

In ProductController.php :

 public function initContent()
    {
        global $smarty;
$avis=Db::getInstance()->ExecuteS("select commentaire from "._DB_PREFIX_."product_avis");;
$smarty->assign('avis',$avis);

In product.tpl :

 <li>avis : {$avis}</li>

This method dosn't work. 

Someone could tell me how add the fields of my new table in my website please ?

 

I want create a list of opinions for each of my products.

 

Thanks a lot in advance.

post-1408978-0-23192700-1497271680_thumb.png

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