Jump to content

Add order barcode to mailalert module..


ietax

Recommended Posts

Hi

I 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

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

  • 3 months later...
On 22/09/2017 at 4:02 PM, ietax said:

Hi

I 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

  • 3 weeks later...

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