patrcolin Posted March 2, 2013 Share Posted March 2, 2013 on Prestashop 1.5, I try to get product->description in hookProductTab PHP module. - the module hookProductTab is called before ProductController function initContent(), so it seems impossible to get module description - what is the best way to get product->description even in ProductController the following code does not work $tplproducts = $smarty->tpl_vars['product']->value; $m1 = $tplproducts->description_short; Is there a solution to get product->description in hookProductTab PHP module ? Link to comment Share on other sites More sharing options...
patrcolin Posted March 3, 2013 Author Share Posted March 3, 2013 I have finaly solved my problem by reading the information (product->description) in the database in the table product_lang // Get descripyion from product_lang table. $sql = 'SELECT description FROM '._DB_PREFIX_.'product_lang WHERE id_product = '.$maproductid.' AND `id_shop` = '.(int)Context::getContext()->shop->id.' AND `id_lang` = '.(int)Context::getContext()->language->id.''; // echo "SQL =".$sql; $localdesc = Db::getInstance()->getValue($sql); This works fine. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now