ietax Posted September 22, 2017 Share Posted September 22, 2017 HiI would like to take our internal reference number and add it to the mailalert as a Barcode.I can insert into PDF invoice, with this code by haylau <tr> <td style="width: 17%"></td> <td style="width: 83%"> {assign var=black value=[0,0,0]}{assign var=white value=[255,255,255]} {assign var=stuff value=['position'=>'S', 'border'=>false, 'padding'=>4, 'fgcolor'=>$black, 'bgcolor'=>$white, 'text'=>false, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4]} {assign var=params value=TCPDF::serializeTCPDFtagParameters(array($order->getUniqReference(), 'C39', '', '', 40, 15, 0.4, $stuff, 'N'))} <tcpdf method="write1DBarcode" params="{$params}" /> </td> </tr> but i'd like to insert inside order confirmation mails.thanks Link to comment Share on other sites More sharing options...
ietax Posted September 25, 2017 Author Share Posted September 25, 2017 I found solution for convert order number to BARCODE image with this script https://www.codeproject.com/Articles/146336/Creating-a-Code-39-Barcode-using-HTML-CSS-and-Java But i have problems to insert it inside a mail on Mailalert. I tried to insert script directly mail but probabily is should modifiy mailalert.php <script type="text/javascript" src="code39.js"></script> <style type="text/css"> #barcode {font-weight: normal; font-style: normal; line-height:normal; sans-serif; font-size: 12pt} </style> </head> <body> Input : {order_name}<br /> <div id="externalbox" style="width:5in"> <div id="inputdata" >{order_name}</div> </div> <br /> <script type="text/javascript"> /* <![CDATA[ */ function get_object(id) { var object = null; if (document.layers) { object = document.layers[id]; } else if (document.all) { object = document.all[id]; } else if (document.getElementById) { object = document.getElementById(id); } return object; } get_object("inputdata").innerHTML=DrawCode39Barcode(get_object("inputdata").innerHTML,0); /* ]]> */ </script> Can anyone help me please? thanks Link to comment Share on other sites More sharing options...
muhefranck Posted January 24, 2018 Share Posted January 24, 2018 On 22/09/2017 at 4:02 PM, ietax said: HiI would like to take our internal reference number and add it to the mailalert as a Barcode.I can insert into PDF invoice, with this code by haylau <tr> <td style="width: 17%"></td> <td style="width: 83%"> {assign var=black value=[0,0,0]}{assign var=white value=[255,255,255]} {assign var=stuff value=['position'=>'S', 'border'=>false, 'padding'=>4, 'fgcolor'=>$black, 'bgcolor'=>$white, 'text'=>false, 'font'=>'helvetica', 'fontsize'=>8, 'stretchtext'=>4]} {assign var=params value=TCPDF::serializeTCPDFtagParameters(array($order->getUniqReference(), 'C39', '', '', 40, 15, 0.4, $stuff, 'N'))} <tcpdf method="write1DBarcode" params="{$params}" /> </td> </tr> but i'd like to insert inside order confirmation mails.thanks Hi ietax, how are you? i'm trying your solution but it doesn't work. i'm on prestashop 1.7. I just want to insert the reference number into my pdf invoice. Can you help me please? Thank you Link to comment Share on other sites More sharing options...
ietax Posted January 25, 2018 Author Share Posted January 25, 2018 I found this https://www.prestashop.com/forums/topic/139784-add-barcode-to-pdf-delivery-slip-invoice/ and it works for invoice. if you have any questions.. write. ;-) Link to comment Share on other sites More sharing options...
muhefranck Posted February 12, 2018 Share Posted February 12, 2018 On 25/01/2018 at 12:08 PM, ietax said: I found this https://www.prestashop.com/forums/topic/139784-add-barcode-to-pdf-delivery-slip-invoice/ and it works for invoice. if you have any questions.. write. ;-) Hi Ietax, i tried your solution but it doesn't work. Do you have another one please for Prestashop 1.7.1? Thank you 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