MakeOpen Posted November 3, 2008 Share Posted November 3, 2008 Bonjour à tous,Je cherche à modifier le tableau des produits des factures de Presta pour y ajouter le fabricant correspondant aux produits achetés par mes clients.J'ai trouvé dans classes/PDF.php à la ligne 438 ceci : $this->MultiCell($w[0], 5, Tools::iconv('utf-8', self::encoding(), $product['product_name']), 'B'); Ce que je cherche à faire, c'est quelque chose du genre : $this->MultiCell($w[0], 5, Tools::iconv('utf-8', self::encoding(), $product['manufacturer_name'].' '.$product['product_name']), 'B'); Le problème, c'est que cette clé de tableau n'existe pas.Savez vous si il existe un tableau contenant la valeur recherchée et si non, dans quel fichier le tableau $product[] est défini ?Merci pour votre aide. Link to comment Share on other sites More sharing options...
Nommam Posted November 3, 2008 Share Posted November 3, 2008 ca ne serait pas plustot :$manufacturer['name'] ? Link to comment Share on other sites More sharing options...
MakeOpen Posted November 3, 2008 Author Share Posted November 3, 2008 ca ne serait pas plustot :$manufacturer['name'] ? Non, cela ne retourne rien Link to comment Share on other sites More sharing options...
MakeOpen Posted November 5, 2008 Author Share Posted November 5, 2008 Réglé.Dans la version 1:Remplacez la ligne qui commence comme ceci : (~#438) $this->MultiCell($w[0]... par ces deux là : $fabricant = Db::getInstance()->ExecuteS(' SELECT id_manufacturer FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.intval($product['product_id'])); $this->MultiCell($w[0], 5, Tools::iconv('utf-8', self::encoding(), Manufacturer::getNameById($fabricant[0]['id_manufacturer']).' - '.$product['product_name']), 'B'); Link to comment Share on other sites More sharing options...
mehdi2405 Posted September 19, 2010 Share Posted September 19, 2010 bonjourpourrais tu me dire si cela marche en P 1.3.1 ?sinon aurais tu la solution ? j'aimerais rajouter la marque égalementmerci Link to comment Share on other sites More sharing options...
mehdi2405 Posted April 21, 2011 Share Posted April 21, 2011 upplease Link to comment Share on other sites More sharing options...
m_bastien Posted November 9, 2016 Share Posted November 9, 2016 Bonjour à tous, Je relance ce sujet car c'est exactement ce que je voudrais faire, simplement je suis sous Prestashop version 1.6.1.4. Sous cette version il n'existe plus de fichier classes/PDF.php. J'imagine pourtant qu'il doit bien y avoir une possibilité de faire autrement. Quelqu'un aurait-il la solution? Merci Link to comment Share on other sites More sharing options...
tuk66 Posted November 14, 2016 Share Posted November 14, 2016 Il y a plus d'options. Vous pouvez patcher le code de base ou utiliser un module. There are more options. You can patch the core code or use a module. 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