Jump to content

Envoyer un PDF dans un nouveau mail en prestashop 1.5


Rdev

Recommended Posts

Bonjour,

 

je suis sur prestashop 1.5

j'ai créé un nouveau fichier controller, et j'ai créé un nouvel modèle du mail, et je veut envoyer un fichier PDF dans l'email

 

comment on peut utiliser la fonction PDF

 

 

j'ai mis ce code

$pdf = new PDF($var, PDF::TEMPLATE_INVOICE, $context->smarty);

mais j'ai ce message d'erreur

PHP Warning:  Missing argument 1 for PDFCore::__construct()

je ne sais pas qu'est qu'on mis dans la variable $var ?

pour le moment $var est vide

 

 

qui a une idée et merci à tous

Edited by Rdev (see edit history)
Link to comment
Share on other sites

Bonjour,

 

j'ai trouvé ce lien création du nouvelle template pdf

 

http://blog.belvg.com/pdf-in-prestashop.html

 

Comment on peut importer les données du fichiers controller dans la template du PDF

 

mon fichier controller ne contient pas les données du commande

j'ai ces messages d'erreur

[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 44
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 44
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 112
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 112
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 112
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 112
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 113
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 113
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 76
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 76
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 77
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 77
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 78
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 78
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: HTMLTemplateExchange::$order in /classes/pdf/HTMLTemplate.php on line 79
[28-Feb-2014 10:48:46] PHP Notice:  Trying to get property of non-object in /classes/pdf/HTMLTemplate.php on line 79
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$font_by_lang in /classes/pdf/PDFGenerator.php on line 126
[28-Feb-2014 10:48:46] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /classes/pdf/PDFGenerator.php on line 126
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$FontSizePt in /tools/tcpdf/tcpdf.php on line 5353
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$font_subsetting in /tools/tcpdf/tcpdf.php on line 5083
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$pdfa_mode in /tools/tcpdf/tcpdf.php on line 5085
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$isunicode in /tools/tcpdf/tcpdf.php on line 5106
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$pdfa_mode in tools/tcpdf/tcpdf.php on line 5112
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$CoreFonts in tools/tcpdf/tcpdf.php on line 5246
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$fontkeys in tools/tcpdf/tcpdf.php on line 25855
[28-Feb-2014 10:48:46] PHP Warning:  in_array() expects parameter 2 to be array, null given in /tools/tcpdf/tcpdf.php on line 25855
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$inxobj in /tools/tcpdf/tcpdf.php on line 5295
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$k in /tools/tcpdf/tcpdf.php on line 5378
[28-Feb-2014 10:48:46] PHP Warning:  Division by zero in /tools/tcpdf/tcpdf.php on line 5378
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$k in /tools/tcpdf/tcpdf.php on line 5401
[28-Feb-2014 10:48:46] PHP Warning:  Division by zero in /tools/tcpdf/tcpdf.php on line 5401
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$k in /tools/tcpdf/tcpdf.php on line 5402
[28-Feb-2014 10:48:46] PHP Warning:  Division by zero in /tools/tcpdf/tcpdf.php on line 5402
[28-Feb-2014 10:48:46] PHP Notice:  Undefined property: PDFGenerator::$page in /tools/tcpdf/tcpdf.php on line 5403

qui a une idée ? et merci

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