Sorry! Here you go. My store is in French and English, so I needed to specify UTF-8 in order for the French characters to show up correctly. I am sure there must be a better way to specify the default charset for the whole pdf file, but this was the only way I knew how to do it.
These were the changes I made in admin/includes/functions/extra_functions/lcsd_merged_packing_slips.php
I have made a LOT of changes to this file, so line numbers are approximate.
Around line 242:
Code:
$orderText .= utf8_decode( ' ' . $order->products[$i]['qty'] . 'x ' . $order->products[$i]['name'] . '/' . $order->products[$i]['model'] . $attribText);
Around line 345:
Code:
function draw_packing_slip_customer($order, &$pdf){
$billTo = utf8_decode(zen_address_format($order->customer['format_id'], $order->billing, 0, '', "\n"));
if($order->billing['street_address'] == ''){
$billTo = utf8_decode(zen_address_format($order->customer['format_id'], $order->customer, 0, '', "\n"));
}
$shipTo = utf8_decode(zen_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n"));
if($order->delivery['street_address'] == ''){
$shipTo = utf8_decode(zen_address_format($order->customer['format_id'], $order->customer, 0, '', "\n"));
}
Around line 426:
Code:
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
$prod_name = utf8_decode($order->products[$i]['name']);
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
$prod_name .= utf8_decode(' ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
}
Around line 493:
Code:
if ($orders_history->RecordCount() > 0) {
while (!$orders_history->EOF) {
if ($orders_history->fields['comments'] != '' && strpos($orders_history->fields['comments'], 'PayPal status:') === false){
$count_comments++;
$pdf->Cell(120, 14, zen_datetime_short($orders_history->fields['date_added']));
$pdf->MultiCell(456, 14, utf8_decode($orders_status_array[$orders_history->fields['orders_status_id']]));
$pdf->Cell(27, 14, '', 0, 0, '', 1);
$pdf->MultiCell(549, 14, (utf8_decode(zen_db_output($orders_history->fields['comments']))), 'B');
$pdf->SetLineWidth(.5);
$pdf->Line(18,$pdf->GetY(),594,$pdf->GetY());
}
Also, to get rid of hardcoded text and use the define text for multi-language you will need to define ENTRY_PHONE, ENTRY_EMAIL and ENTRY_ORDER_STATUS in admin/includes/languages/YOUR_LANGUAGE/super_batch_forms.php
Then, in admin/includes/functions/extra_functions/lcsd_merged_packing_slips.php
Around 359:
Code:
$pdf->SetFont('Arial','', 9);
$billToY = $pdf->GetY();
$pdf->MultiCell(220, 13, ENTRY_SOLD_TO . "\n\n" . $billTo);
$pdf->Ln(8);
$pdf->MultiCell(220, 13, ENTRY_PHONE . ' : ' . $customerPhone);
$pdf->MultiCell(220, 13, ENTRY_EMAIL . ' : ' . $customerEmail);
$pdf->Ln(6);
$EndY = $pdf->GetY();
$pdf->SetXY(306, $billToY);
$pdf->SetFont('Arial','B', 12);
$pdf->MultiCell(220, 13, ENTRY_SHIP_TO . "\n\n" . $shipTo);
$pdf->SetXY(18, $EndY);
}
And around line 479:
Code:
if (ORDER_COMMENTS_PACKING_SLIP > 0) {
$pdf->Ln();
$pdf->SetFillColor(180,180,180);
$pdf->SetFont('Arial','B', 10);
$pdf->MultiCell(576, 14, ENTRY_ORDER_STATUS . ' ', 'B');
$pdf->SetFont('Arial','', 8);
$pdf->SetFillColor(256,256,256);
Bookmarks