jd440 Posted June 8, 2013 Share Posted June 8, 2013 (edited) Bonjour à tous. J'ai besoin d'une nouvelle caractérisitque sur les produits. J'ai donc ajouté un champs dans la table ps_product_lang. Puis j'ai rajouté un override/classe/product. En ajoutant public $img_rewrite; public static $definition = array( 'table' => 'product', 'primary' => 'id_product', 'multilang' => true, 'multilang_shop' => true, 'fields' => array( // Classic fields 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), [...] 'img_rewrite' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), Ce qui me permet de l'appeler sur la ficht produit par: <hr>{$product->img_rewrite}<hr> mais je n'arrive pas à l appeler depuis product-list.tpl par exemple j ;ai essayer: <hr>{$product.img_rewrite}<hr> <hr>{$product->img_rewrite}<hr> ce qui me donne: Notice: Undefined index: img_rewrite in /var/www/html/prestashop/cache/smarty/compile/[...].file.product-list.tpl.php on line 63Notice: Trying to get property of non-object in /var/www/html/prestashop/cache/smarty/compile/[....file.product-list.tpl.php on line 65 Quelqu'un pourrais t il m'aider? SOLUTION: ovverride de la classe category. Edited June 8, 2013 by jd440 (see edit history) Link to comment Share on other sites More sharing options...
pouc Posted April 9, 2014 Share Posted April 9, 2014 Et qu'est ce que vous avez rédigé dans l'override de category? Baptiste 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