User Tools

Site Tools


tutorials:zencartmods:invnumbers.html

Make numbers bigger and redder to avoid confusion

This mod tweaks the invoice to make numbers larger/highlighed when the quantity is not 1. We had a bunch of orders where someone bought 2 of something and only one shipped and this helped avoid confusion

(This presupposes that you have already done the mods above.)

admin/invoice.php

Find (line 165)

          echo  '      <tr class="dataTableRow">' . "\n" . '<td class="dataTableContent"  valign="center">(&nbsp;)&nbsp;<img width="100" src="/images/' . $invoice_image . '" /></td>' .
            '        <td class="dataTableContent" valign="top" align="right">&nbsp;' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
            '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

and replace with

if ($order->products[$i]['qty']  > 1) {
              echo '<tr class="dataTableRow">' . "\n" . '<td class="dataTableContent"  valign="center">(&nbsp;)&nbsp;<img width="100" src="/images/' . $invoice_image . '" /></td>' .
           '        <td class="dataTableContent" valign="top" align="right">&nbsp;<b><font color="FF0000" size="4">' . $order->products[$i]['qty'] . '</font></b>&nbsp;x</td>' . "\n" .
           '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
         } else {
     echo '<tr class="dataTableRow">' . "\n" . '<td class="dataTableContent"  valign="center">(&nbsp;)&nbsp;<img width="100" src="/images/' . $invoice_image . '" /></td>' .
           '        <td class="dataTableContent" valign="top" align="right">&nbsp;' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
           '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
        }
/home/ladyada/public_html/wiki/data/pages/tutorials/zencartmods/invnumbers.html.txt · Last modified: 2016/01/28 18:05 (external edit)