Zen Cart Logo
Forums / General Questions / Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

Views: 1,062

Results 1 to 4 of 4
17 Jun 2012, 3:36 PM
#1
bigdsign avatar

bigdsign

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

Tried using the code I had used to modify zen cart v1.3.8 but after two attempts it just reports back an error message in v1.5.0. Does anyone have the steps to accomplish this in zen cart v1.5.0? I looked around but only found the steps for v1.3.8

17 Jun 2012, 4:24 PM
#2
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Re: Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

can you post the code you tried plz ;)

17 Jun 2012, 4:33 PM
#3
bigdsign avatar

bigdsign

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

Re: Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

admin/invoice.php

(line 146)

  <tr  class="dataTableHeadingRow">

replace with

  <tr  class="dataTableHeadingRow">
<td width="120px"></td >

(line 156)

for ($i = 0, $n = sizeof ($order->products); $i < $n; $i++) {

replace with

for ($i = 0, $n = sizeof ($order->products); $i < $n; $i++) {
  $itemimage = $db->Execute("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$order->products[$i]['id'] . "'");
  $invoice_image = $itemimage->fields['products_image'];
  if(file_exists ("../images/invoice/" . $invoice_image)) // this part is optional
       {                                                 // this will look for the same filename in
         $invoice_image = "invoice/" . $invoice_image;   // /images/invoice and use that instead
       }                                                 // 

(line 164)

  echo '      <tr class="dataTableRow">' . "\n" .
       '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
       '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

replace with

 echo  '      <tr class="dataTableRow">' . "\n" . '<td class="dataTableContent"  valign="center">( ) <img width="100" src="/images/' . $invoice_image . '" /></td>' .
       '        <td class="dataTableContent" valign="top" align="right"> ' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
       '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
17 Jun 2012, 6:21 PM
#4
bigdsign avatar

bigdsign

New Zenner

Join Date:
Jun 2012
Posts:
9
Plugin Contributions:
0

Re: Adding thumbnail images to Packing Slips and Invoices, Zencart 1.5.0

Any recommendation anyone?