first of all, thank you very much for this awesome plugin (VM IDnR Addon) that is perfect for our needs.
So my goal is to have on the Delivery note a barcode (C39) for a concatenation of the $a['order_id'] and $a['delivery_id'].
Because we already scan our shipping ID (TNT) but we also need to scan the Reference of the Delivery note to fill the field in our TNT dashboard.
So I've seen that the TCPDF barcode call was already here in plugins/phocapdf/virtuemart.php and I tweak it just a little bit, and managed to have a barcode on the footer.
Code: Select all
//$barcode = '4483-499';
// define barcode style
$style = array(
'text' => true,
'label' => $barcode,
'font' => 'helvetica',
'fontsize' => 8,
'stretchtext' => 3
);
if (!empty($barcode)) {
$this->Ln($line_width);
$barcode_width = round(($this->getPageWidth() - $ormargins['left'] - $ormargins['right'])/3);
$this->write1DBarcode($barcode, 'C39', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, $style, 'N');
}
in: plugins/phocapdf/virtuemart/virtuemartpdfoutput.php line399
Code: Select all
$a['orderdel_c39'] = $this->getBarC39( $a['orderdel_c39'] );
With this on line 233 of the virtuemart.php
Code: Select all
function getBarC39($bc) {
//$barcode = $this->getBarC39();
// define barcode style
$style = array(
'text' => true,
'label' => $bc,
'font' => 'helvetica',
'fontsize' => 8,
'stretchtext' => 3
);
if (!empty($bc)) {
$this->Ln($line_width);
$barcode_width = round(($this->getPageWidth() - $ormargins['left'] - $ormargins['right'])/3);
$this->write1DBarcode($bc, 'C39', $this->GetX(), $cur_y + $line_width, $barcode_width, (($this->getFooterMargin() / 3) - $line_width), 0.3, $style, 'N');
}
return $bc;
}
Could you please advice about the best method to use to get this work correctly please ?
I think I miss something....very simple, but I'm bit confused about which file is the king in this issue.
Thanks in advance.