Jump to content
PopTheTop

Fancier Invoice & Packingslip v1.0

Recommended Posts

Is there a way to change the text for "TAX" to "VAT" on the invoice. This would be handy for UK sites.

 

BTW thanks for this great contribution!

 

Please ignore, I edited invoice.php in /admin/includes/languages/english and replaced VAT with TAX in two lines and it now shows correctly.

Share this post


Link to post
Share on other sites
Is there a way to change the text for "TAX" to "VAT" on the invoice. This would be handy for UK sites.

 

BTW thanks for this great contribution!

 

Sure, just update it in Admin and change the language file.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

1146 - Table 'bodyboar.table_invoice' doesn't exist

 

select date_invoice from table_invoice where substring(date_invoice,7) < '2005'

 

[TEP STOP]

 

Can someone help me resolve this?? Sorry for being so "dumb:..

 

I have other issues with the invoice, but want to try and solve this one first.

 

Thank you in advance..

 

Keith

Share this post


Link to post
Share on other sites

That is because you did not install the SQL as instructed to do.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
That is because you did not install the SQL as instructed to do.

 

 

Sorry for another bad question.. I have the text doc in the sql file. What do I do with it?? I actually opened it in Dreamweaver, called it tables_invoice.php and istalled it with the other files. Is this wrong??

 

Again, thank you in advance for your support.

 

Keith

Share this post


Link to post
Share on other sites
Sorry for another bad question.. I have the text doc in the sql file. What do I do with it?? I actually opened it in Dreamweaver, called it tables_invoice.php and istalled it with the other files. Is this wrong??

 

Again, thank you in advance for your support.

 

Keith

 

 

Hmmm, where did you read it telling you to rename it?

 

Anyway, my last post to you was incorrect. I was thinking that you were referring to my Admin Notes MOD.... Sorry.

 

I can not help you on this one. I really do not know. It looks as if it can not find the table invoice in your database. But this contribution does not use that table, nor should your database have it either, unless you have added another contribution that installed that table into your database and this contribution is conflicting with it.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

This may of maynot have been covered but I couldnt read all the pages as my eyes hurt from trying to fix this... I have installed this and from the get go with original files the order totals area is being centered somehow... I have tried and tried until my eyes are crossed to fix it.. I know it has to be something simple but what gives!!! here is the screenie

 

http://www.dragonmodz.net/~twiz_files/invoice1.jpg

 

Please help....

Share this post


Link to post
Share on other sites

That is because you do not have your HTML tables set correctly in the invoice.php file.

 

Look somewhere in the file for:

   	 <tr>
     <td align="right" colspan="5">
   <table border="0" cellspacing="0" cellpadding="2">
<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
   echo '       	 <tr>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
        '       	 </tr>' . "\n";
 }
?>
       </table>
   </td>
    	 </tr>


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

not sure what I am looking for... because ... The code you quote is exactly the same as mine... I have not edited the code around there at all.. and its the same in the latest release I downloaded from the contrib area.... here is the code from the file itself.. beginning to finish (this is the one I have only slightly modified....

 

<?php
/*
 $Id: invoice.php,v 2.0 2005/03/12 00:37:30 PopTheTop Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

 $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
 $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

 include(DIR_WS_CLASSES . 'order.php');
 $order = new order($oID);
 $date = date('M d, Y');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo STORE_NAME; ?> <?php echo INVOICE_TEXT_INVOICE; ?> <?php echo INVOICE_TEXT_NUMBER_SIGN; ?><?php echo INVOICE_TEXT_CURRENT_YEAR; ?><?php echo INVOICE_TEXT_DASH; ?><?php echo $oID; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<!-- body_text //-->
<center>
<table border="0" width="98%" cellspacing="0" cellpadding="2" style="background-image: url(/admin/images/neo_2_BG.jpg); background-repeat: no-repeat; background-position: 50% 50%">
<tr>
  <td align="left"><!--<img src="/images/neo_2.jpg" border="0" width="206" height="200" alt=""> //--><span class="pageHeadingSM"><FONT FACE="Verdana" SIZE="3" COLOR="#000000"><strong><?php echo nl2br(STORE_NAME_ADDRESS); ?></strong></font></span></td>
  <TD ALIGN="right" VALIGN="top"><FONT FACE="Verdana" SIZE="2" COLOR="#000000"><strong><?php echo INVOICE_TEXT_INVOICE; ?> <?php echo INVOICE_TEXT_NUMBER_SIGN; ?> <?php echo INVOICE_TEXT_CURRENT_YEAR; ?><?php echo INVOICE_TEXT_DASH; ?> <?php echo $oID; ?><BR><?php echo $date; ?></strong></font></TD>
</tr>
<tr>
   <td colspan="2">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
  	 <TD ALIGN="right" COLSPAN="2"> </TD>
	 </tr>
	 <tr>
   <TD>
   <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
     <td colspan="4">
     <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td width="10%"><hr size="2"></td>
            <td align="center" class="pageHeading"><em><b><?php echo INVOICE_TEXT_INVOICE; ?></b></em></td>
            <td width="100%"><hr size="2"></td>
          </tr>
         </table>
         </td>
      </tr>
      <tr>
       <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '100', '5'); ?></td>
      </tr>
        <tr>
             <td width="3"> </td>
         <td valign="top">
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="../images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                 <td background="../images/borders/maingrey_02.gif"><img src="../images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                 <td width="19"><img src="../images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="../images/borders/maingrey_04.gif"><img src="../images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                 <td align="center">
      	 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="main">
                     <tr>
                       <td align="left" valign="top"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo $order->customer['telephone']; ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo $order->customer['email_address']; ?></td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '7'); ?></td>
                     </tr>
                   </table>
       </td>
                 <td background="../images/borders/maingrey_06.gif"><img src="../images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="../images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
                 <td background="../images/borders/maingrey_08.gif"><img src="../images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="../images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
               </tr>
           </table>
           </td>
             <td width="45"> </td>
           <td valign="top">
             <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="../images/borders/mainwhite_01.gif" width="11" height="16" alt=""></td>
                 <td background="../images/borders/mainwhite_02.gif"><img src="../images/borders/mainwhite_02.gif" width="24" height="16" alt=""></td>
                 <td width="19"><img src="../images/borders/mainwhite_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="../images/borders/mainwhite_04.gif"><img src="../images/borders/mainwhite_04.gif" width="11" height="21" alt=""></td>
                 <td align="center">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
                     <tr>
                       <td align="left" valign="top"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td>    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td>    </td>
                     </tr>
                     <tr>
                       <td>    </td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '7'); ?></td>
                     </tr>
        </table>
       </td>
                 <td background="../images/borders/mainwhite_06.gif"><img src="../images/borders/mainwhite_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="../images/borders/mainwhite_07.gif" width="11" height="18" alt=""></td>
                 <td background="../images/borders/mainwhite_08.gif"><img src="../images/borders/mainwhite_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="../images/borders/mainwhite_09.gif" width="19" height="18" alt=""></td>
               </tr>
             </table>
           </td>
        </tr>
      </table>
    </TD>
   </tr>
   <tr>
   <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '100', '15'); ?></td>
   </tr>
   <tr>
   <TD COLSPAN="2">
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td width="9"> </td>
               <td>
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="11"><img src="../images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                <td background="../images/borders/maingrey_02.gif"><img src="../images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                <td width="19"><img src="../images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
            </tr>
            <tr>
                <td background="../images/borders/maingrey_04.gif"><img src="../images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                <td align="center">
    	 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
      	 <tr>
                <td width="33%"> <b><?php echo INVOICE_TEXT_ORDER; ?> <?php echo INVOICE_TEXT_NUMBER_SIGN; ?><?php echo INVOICE_TEXT_COLON; ?></b> <?php echo tep_db_input($oID); ?></td>
                <td width="33%"> <b><?php echo INVOICE_TEXT_DATE_OF_ORDER; ?><?php echo INVOICE_TEXT_COLON; ?> </b><?php echo tep_date_short($order->info['date_purchased']); ?></td>
                <td> <b><?php echo ENTRY_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?></td>
             </tr>
               <tr>
              	 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '7'); ?></td>
               </tr>
    	 </table>
    	 </td>
             <td background="../images/borders/maingrey_06.gif"><img src="../images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
            </tr>
            <tr>
             <td><img src="../images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
             <td background="../images/borders/maingrey_08.gif"><img src="../images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
             <td><img src="../images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
            </tr>
         </table>
               </td>
           </tr>
           </table>
   </td>
   </tr>
   <tr>
   <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '15'); ?></td>
   </tr>
   <tr>
    	 <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
     </tr>
     <tr>
    	 <TD COLSPAN="2">
     <table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr class="dataTableHeadingRow">
          <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
          <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
          <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td>
          <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td>
          <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td>
          <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td>
          <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
         </tr>
<?php
  for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
   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'];

     if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
       for ($j = 0; $j < $k; $j++) {
         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
         if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
         echo '</i></small></nobr>';
       }
     }

     echo '           </td>' . "\n" .
          '           <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
     echo '           <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
          '           <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
          '           <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
          '           <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
          '           <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
     echo '          </tr>' . "\n";
  }
?>

    	 <tr>
      <td align="right" colspan="5">
    <table border="0" cellspacing="0" cellpadding="2">
 <?php
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    echo '         <tr>' . "\n" .
         '          <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
         '          <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
         '         </tr>' . "\n";
  }
 ?>
        </table>
    </td>
     </tr>
     </table></td>
</tr>
</table>
<!-- ORDER COMMENTS CODE STARTS HERE //-->
<?php
$orders_status_history_query = tep_db_query("select * from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added");
if (tep_db_num_rows($orders_status_history_query)) {
   $has_comments = false;
    echo '      <br><br>';
    echo '      <table width="100%" border="0" cellpadding="0" cellspacing="0">';
    echo '     	 <tr>';
    echo '        <td width="9"> </td>';
    echo '        <td>';
    echo '        <table width="100%" border="0" cellpadding="0" cellspacing="0">';
    echo '       	 <tr>';
    echo '          <td width="11"><img src="../images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>';
    echo '          <td background="../images/borders/maingrey_02.gif"><img src="../images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>';
    echo '          <td width="19"><img src="../images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>';
    echo '       	 </tr>';
    echo '       	 <tr>';
    echo '          <td background="../images/borders/maingrey_04.gif"><img src="../images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>';
    echo '          <td align="center">';
    echo '          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">';
    echo '         	 <tr>';
    echo '            <td width="95%"> <b>' . TABLE_HEADING_COMMENTS . '</b><br><br></td>';
    echo '         	 </tr>';

    while ($orders_comments = tep_db_fetch_array($orders_status_history_query)) {
      if (tep_not_null($orders_comments['comments'])) {
      $has_comments = true; // Not Null = Has Comments
      if (tep_not_null($orders_comments['comments'])) {
          $sInfo = new objectInfo($orders_comments);
          echo '         	 <tr>';
          echo '            <td align="center" width="95%">';
          echo '            <table width="95%" border="0" cellpadding="0" cellspacing="0">';
          echo '           	 <tr>';
          echo '              <td width="95%" class="smallText">';
          echo '              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">';
          echo '             	 <tr>';
          echo '                <td width="150" align="left" valign="top" class="smallText"><strong><u>' . TABLE_HEADING_DATE_ADDED . '</u></strong></td>';
          echo '                <td align="left" valign="top" class="smallText"><strong><u>' . TABLE_HEADING_COMMENT_LEFT . '</u></strong></td>';
          echo '             	 </tr>';
          echo '              </table>';
          echo '              </td>';
          echo '           	 </tr>';
          echo '            </table>';
          echo '            </td>';
          echo '         	 </tr>';
          echo '         	 <tr>';
          echo '            <td align="center" width="95%">';
          echo '            <table width="95%" border="0" cellpadding="0" cellspacing="0">';
          echo '           	 <tr>';
          echo '              <td width="95%" class="smallText">';
          echo '              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">';
          echo '             	 <tr>';
          echo '                <td width="150" align="left" valign="top" class="smallText">' . tep_date_short($sInfo->date_added) . '</td>';
          echo '                <td align="left" valign="top" class="smallText">' . nl2br(tep_db_output($orders_comments['comments'])) . '<br><br></td>';
    echo '             	 </tr>';
    echo '              </table>';
          echo '              </td>';
    echo '           	 </tr>';
          echo '            </table>';
          echo '            </td>';
          echo '         	 </tr>';
      }
      }
    }
    if ($has_comments == false) {
  echo '           <tr>';
  echo '            <td align="center" width="95%">';
  echo '            <table width="95%" border="0" cellpadding="0" cellspacing="0">';
  echo '             <tr>';
  echo '              <td width="95%" class="smallText">';
  echo '              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">';
  echo '               <tr>';
  echo '                <td width="100%" align="left" valign="top" class="smallText">' . INVOICE_TEXT_NO_COMMENT . '</td>';
  echo '               </tr>';
  echo '              </table>';
  echo '              </td>';
  echo '             </tr>';
  echo '            </table>';
  echo '            </td>';
  echo '           </tr>';
    }
  echo '         	 <tr>';
  echo '            <td>' . tep_draw_separator('pixel_trans.gif', '1', '7') . '</td>';
  echo '         	 </tr>';
  echo '          </table>';
  echo '          </td>';
  echo '          <td background="../images/borders/maingrey_06.gif"><img src="../images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>';
  echo '       	 </tr>';
  echo '       	 <tr>';
  echo '          <td><img src="../images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>';
  echo '          <td background="../images/borders/maingrey_08.gif"><img src="../images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>';
  echo '          <td><img src="../images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>';
  echo '       	 </tr>';
  echo '        </table>';
  echo '        </td>';
  echo '     	 </tr>';
  echo '      </table>';
}
?>
<!-- ORDER COMMENTS CODE ENDS HERE //-->
<br><br>
<CENTER><span class="smallText"><FONT FACE="Verdana" COLOR="#000000"><strong>Thank you for shopping at<BR>DragonModz.net<BR>http://www.dragonmodz.net</strong></font></span></CENTER>
<br><br>
<!-- body_text_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites
not sure what I am looking for... because ... The code you quote is exactly the same as mine... I have not edited the code around there at all.. and its the same in the latest release I downloaded from the contrib area.... here is the code from the file itself.. beginning to finish (this is the one I have only slightly modified....

 

 

 

Try this section of code, your table data's colspans were incorrect.

Notice the <td align="right" colspan="8"> below

      <tr>
     <td align="right" colspan="8">
   <table border="0" cellspacing="0" cellpadding="2">
<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
   echo '         <tr>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
        '         </tr>' . "\n";
 }
?>
       </table>
   </td>
    </tr>


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Ok, as promised...

 

I'm sorry this has taken so long. I have been busy trying to get CCGV installed and all its bugs worked out so this is why I have put this off until now.

 

As promised, I have been working on a new version of account_history_info.php where a customer goes to view their order details.

 

This will resemble the look and feel of Fancier Admin Order Invoices / Packing Slips. You will also have a Print Invoice option at the bottom to print that order invoice.

 

Using JavaScript, when they click on the Print Invoice button, a small message box will pop up telling the customer to turn on the option for printing background images in their web browser print settings. Then a new window will open with the printer friendly invoice and it will print to the customer's default printer automatically.

 

I have it 70% complete right now and should have it going within the next few hours. Until then...


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Very nice work... I like the fact that your still maintaining your work and striving to improve upon it... I dont see how I missed that... but I did... it worked... I tried everything last night.. nesting tables within tables lol... nothing worked... but... thank you.. :) here is my take on this contrib and how I modified it to suit my taste.....

Share this post


Link to post
Share on other sites

No problem and thanks...

 

Well, here is an update after about 6 hours of coding!

 

Changes so far:

Updated catalog/stylesheet.css

Updated catalog/account_history_info.php

Updated catalog/includes/modules/downloads.php

 

catalog/account_history_info.php

--> This should be finished now all except for not using any language defines, I hard coded everything into this file. It is up to you if you want to move it all into the language file for now.

 

--> The print button may not work unless you have the print order receipt contribution installed. I will get that added in as soon as I design the new print_order.php tonight or tomorrow sometime.

 

catalog/includes/modules/downloads.php

--> Updated catalog/includes/modules/downloads.php to reflect the new design.

 

catalog/stylesheet.css

--> Added new code to the end of catalog/stylesheet.css to reflect the new design.

 

 

 

You should be able to just copy over your existing catalog/account_history_info.php and catalog/includes/modules/downloads.php files unless you have other modifications to them from other contributions. In that case, just use a comparing program like Compare Beyond or WinMerge to compare the 2 files with yours.

 

 

 

Here is the updated catalog/account_history_info.php

<?php
/*
 $Id: account_history_info.php,v 1.100 2003/06/09 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// BEGIN Fancier Invoice and Packingslip

 require('includes/application_top.php');

 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) {
   tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 }
 
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
 $customer_info = tep_db_fetch_array($customer_info_query);
 if ($customer_info['customers_id'] != $customer_id) {
   tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
 $breadcrumb->add(sprintf(NAVBAR_TITLE_3, $HTTP_GET_VARS['order_id']), tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'));

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order($HTTP_GET_VARS['order_id']);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript">
<!--
function popupPrintReceipt(url) {
 window.open(url,'popupPrintReceipt','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=750')
}
//-->
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
  <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <TD ALIGN="right" VALIGN="top" class="order_history_top">Order # <?php echo $HTTP_GET_VARS['order_id']; ?><BR><?php echo tep_date_long($order->info['date_purchased']); ?></TD>
</tr>
<tr>
   <td VALIGN="top">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
   <TD>
   <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
     <td colspan="4">
     <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td width="10%"><hr size="2"></td>
            <td align="center" class="pageHeading" NOWRAP><em><b>ORDER DETAILS</b></em></td>
            <td width="100%"><hr size="2"></td>
          </tr>
         </table>
         </td>
      </tr>
      <tr>
       <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '100', '5'); ?></td>
      </tr>
        <tr>
         <td valign="top">
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                 <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                 <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                 <td align="center" bgcolor="#F2F2F2">
      	 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="main">
                     <tr>
                       <td align="left" valign="top" class="order_infobox_heading"><b>BILLING ADDRESS:</b></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo $order->customer['telephone']; ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo $order->customer['email_address']; ?></td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
                     </tr>
                   </table>
       </td>
                 <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
                 <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
               </tr>
           </table>
           </td>
             <td width="15"> </td>
           <td valign="top">
             <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td width="11"><img src="images/borders/mainwhite_01.gif" width="11" height="16" alt=""></td>
                 <td background="images/borders/mainwhite_02.gif"><img src="images/borders/mainwhite_02.gif" width="24" height="16" alt=""></td>
                 <td width="19"><img src="images/borders/mainwhite_03.gif" width="19" height="16" alt=""></td>
               </tr>
               <tr>
                 <td background="images/borders/mainwhite_04.gif"><img src="images/borders/mainwhite_04.gif" width="11" height="21" alt=""></td>
                 <td align="center" bgcolor="#FFFFFF">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
                     <tr>
                       <td align="left" valign="top" class="order_infobox_heading"><b>SHIPPING ADDRESS:</b></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>    '); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    <?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    </td>
                     </tr>
                     <tr>
                       <td class="order_infobox_data">    </td>
                     </tr>
                     <tr>
                       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
                     </tr>
        </table>
       </td>
                 <td background="images/borders/mainwhite_06.gif"><img src="images/borders/mainwhite_06.gif" width="19" height="21" alt=""></td>
               </tr>
               <tr>
                 <td><img src="images/borders/mainwhite_07.gif" width="11" height="18" alt=""></td>
                 <td background="images/borders/mainwhite_08.gif"><img src="images/borders/mainwhite_08.gif" width="24" height="18" alt=""></td>
                 <td><img src="images/borders/mainwhite_09.gif" width="19" height="18" alt=""></td>
               </tr>
             </table>
           </td>
        </tr>
      </table>
    </TD>
   </tr>
   <tr>
   <TD><?php echo tep_draw_separator('pixel_trans.gif', '100', '15'); ?></td>
   </tr>
   <tr>
   <TD>
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td width="2"> </td>
               <td>
           <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
                <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
                <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
            </tr>
            <tr>
                <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
                <td align="center" bgcolor="#F2F2F2">
    	 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
      	 <tr>
                <td width="28%" class="order_infobox_data"> <b>Order #:</b> <?php echo $HTTP_GET_VARS['order_id']; ?><br><?php echo tep_draw_separator('pixel_trans.gif', '100%', '6'); ?><br> <b>Date of Order:</b> <?php echo tep_date_short($order->info['date_purchased']); ?></td>
                <td align="right" class="order_infobox_data"> <b>Payment Method:</b> <?php echo $order->info['payment_method']; ?> </td>
             </tr>
               <tr>
              	 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
               </tr>
    	 </table>
    	 </td>
             <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
            </tr>
            <tr>
             <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
             <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
             <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
            </tr>
         </table>
               </td>
           </tr>
           </table>
   </td>
   </tr>
   <tr>
   <TD><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td>
   </tr>
     <tr>
   <td align="center">
   <table border="0" width="99%" cellspacing="0" cellpadding="2">
      	 <tr class="product_infobox_heading_row">
           <td class="product_infobox_heading" colspan="2"> <font color="#000000">Products</font></td>
           <td WIDTH="80" class="product_infobox_heading"><font color="#000000">SKU</font></td>
           <td WIDTH="80" class="product_infobox_heading" align="right"><font color="#000000">Unit</font></td>
           <TD WIDTH="80" ALIGN="right" CLASS="product_infobox_heading"><font color="#000000">Total</font> </TD>
      	 </tr>
<?php
   for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
 echo '      <tr class="product_infobox_data_row">' . "\n" .
      '        <td class="product_infobox_data" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
      '        <td class="product_infobox_data" valign="top">' . $order->products[$i]['name'];

     if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
       for ($j = 0; $j < $k; $j++) {
         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
         if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
         echo '</i></small></nobr>';
       }
     }

     echo '          </td>' . "\n" .
          '          <td WIDTH="80" class="product_infobox_data" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
     echo '          <td WIDTH="80" class="product_infobox_data" align="right" valign="top">' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
          '          <td WIDTH="80" class="product_infobox_data" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ' </b></td>' . "\n";
     echo '       	 </tr>' . "\n";
   }
?>
  	 <tr>
     <td align="right" colspan="5">
   <table border="0" cellspacing="0" cellpadding="2">
<?php
 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
   echo '       	 <tr>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
        '          <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
        '       	 </tr>' . "\n";
 }
?>
       </table>
   </td>
    	 </tr>
     </table></td>
</tr>


<?php
 if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php');
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '18'); ?></td>
     </tr>
     <tr>
    	 <TD>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
  	 <td width="2"> </td>
              <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
                <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
              <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
              <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
          </tr>
          <tr>
              <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
              <td align="center" bgcolor="#F2F2F2">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
               <tr>
                    <td colspan="3" align="left" valign="top" class="order_infobox_heading"><b>ORDER STATUS:</b></td>
               </tr>
<?php
 $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");
 while ($statuses = tep_db_fetch_array($statuses_query)) {
     echo '                <tr>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data" width="114"><br>    <strong>' . tep_date_short($statuses['date_added']) . '</strong></td>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data" width="85"><br>' . $statuses['orders_status_name'] . '</td>' . "\n";
     echo '                     <td valign="top" class="product_infobox_data"><br>' . (empty($statuses['comments']) ? ' ' : nl2br(tep_output_string_protected($statuses['comments']))) . '</td>' . "\n";
     echo '                </tr>' . "\n";
 }
?>
               <tr>
                    <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
               </tr>
      </table>
      </td>
      <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
          </tr>
          <tr>
            <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
            <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
            <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
          </tr>
          </table>
          </td>
   </tr>
  </table></td>
</tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             <td><div style="float:left"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></div><div style=float:right>'; ?><a href="javascript:popupPrintReceipt('<?php echo tep_href_link(FILENAME_ORDERS_PRINTABLE, tep_get_all_get_params(array('order_id')) . 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'); ?>')"><?php echo tep_image_button('button_print_order.gif', IMAGE_BUTTON_PRINT_ORDER) . '</a>'; ?></div></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
</td>
 </tr>
</table><!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<?php
// END Fancier Invoice and Packingslip
?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

 

 

 

 

Here is the updated catalog/includes/modules/downloads.php

<?php
/*
 $Id: downloads.php,v 1.3 2003/06/09 22:49:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- downloads //-->
<?php
// BEGIN Fancier Invoice and Packingslip
 if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {
// Get last order id for checkout_success
   $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by orders_id desc limit 1");
   $orders = tep_db_fetch_array($orders_query);
   $last_order = $orders['orders_id'];
 } else {
   $last_order = $HTTP_GET_VARS['order_id'];
 }

// Now get all downloadable products in that order
 $downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = '" . (int)$last_order . "' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ''");
 if (tep_db_num_rows($downloads_query) > 0) {
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td>
     </tr>
     <tr>
    	 <TD>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
  	 <td width="2"> </td>
              <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
                <td width="11"><img src="images/borders/maingrey_01.gif" width="11" height="16" alt=""></td>
              <td background="images/borders/maingrey_02.gif"><img src="images/borders/maingrey_02.gif" width="24" height="16" alt="" ></td>
              <td width="19"><img src="images/borders/maingrey_03.gif" width="19" height="16" alt=""></td>
          </tr>
          <tr>
              <td background="images/borders/maingrey_04.gif"><img src="images/borders/maingrey_04.gif" width="11" height="21" alt=""></td>
              <td align="center" bgcolor="#F2F2F2">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="main">
               <tr>
                    <td align="left" valign="top" class="order_infobox_heading"><b>AVAILABLE DOWNLOADS:</b></td>
               </tr>
                 <tr>
                    <td class="order_infobox_data"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
               </tr>
<!-- list of products -->
<?php
   while ($downloads = tep_db_fetch_array($downloads_query)) {
// MySQL 3.22 does not have INTERVAL
     list($dt_year, $dt_month, $dt_day) = explode('-', $downloads['date_purchased_day']);
     $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads['download_maxdays'], $dt_year);
     $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
?>
<!-- left box -->
<?php
// The link will appear only if:
// - Download remaining count is > 0, AND
// - The file is present in the DOWNLOAD directory, AND EITHER
// - No expiry date is enforced (maxdays == 0), OR
// - The expiry date is not reached
     if ( ($downloads['download_count'] > 0) && (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) && ( ($downloads['download_maxdays'] == 0) || ($download_timestamp > time())) ) {
       echo '                <tr>' . "\n";
       echo '                     <td class="order_infobox_data">    <strong><a href="' . tep_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads['orders_products_download_id']) . '">' . $downloads['products_name'] . '</a></strong></td>' . "\n";
       echo '                </tr>' . "\n";
     } else {
       echo '                <tr>' . "\n";
       echo '                     <td class="order_infobox_data">    <strong>' . $downloads['products_name'] . '</strong></td>' . "\n";
       echo '                </tr>' . "\n";
     }
?>
<!-- right box -->
<?php
     echo '                <tr>' . "\n";
     echo '                     <td class="order_infobox_data"><br>        <strong>Downloads Remaining:</strong> ' . $downloads['download_count'] . '</td>' . "\n";
     echo '                </tr>' . "\n";
     echo '                <tr>' . "\n";
     echo '                     <td class="order_infobox_data">        ' . TABLE_HEADING_DOWNLOAD_DATE . tep_date_long($download_expiry) . '</td>' . "\n";
     echo '                </tr>' . "\n";
   }
?>
<?php
   if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {
?>
               <tr>
              	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
               </tr>
               <tr>
              	 <td class="order_infobox_data">    <?php printf(FOOTER_DOWNLOAD, '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>'); ?></td>
               </tr>
<?php
   }
?>
               <tr>
                    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '7'); ?></td>
               </tr>
      </table>
      </td>
      <td background="images/borders/maingrey_06.gif"><img src="images/borders/maingrey_06.gif" width="19" height="21" alt=""></td>
          </tr>
          <tr>
            <td><img src="images/borders/maingrey_07.gif" width="11" height="18" alt=""></td>
            <td background="images/borders/maingrey_08.gif"><img src="images/borders/maingrey_08.gif" width="24" height="18" alt=""></td>
            <td><img src="images/borders/maingrey_09.gif" width="19" height="18" alt=""></td>
          </tr>
          </table>
          </td>
   </tr>
        </table>
        </td>
     </tr>
<!-- downloads_eof //-->
<?php
 }
// END Fancier Invoice and Packingslip
?>
<!-- downloads_eof //-->

 

 

 

 

 

 

Add this to the bottom of catalog/stylesheet.css

/* BEGIN Fancier Invoice and Packingslip */
.order_history_top { color : #006699; font-weight: bold; font-family: Verdana; font-size: 13px; }
.order_infobox_heading { color : #000000; font-weight: bold; font-family: Verdana; font-size: 12px; }
.order_infobox_data { color : #000000; font-family: Verdana; font-size: 12px; }
.product_infobox_heading_row { background-color: #C9C9C9; }
.product_infobox_heading { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ffffff; font-weight: bold; }
.product_infobox_data_row { background-color: #F0F1F1; }
.product_infobox_data { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }
/* END Fancier Invoice and Packingslip */

 

 

 

 

 

I will upload a complete update to this contribution when completed. But for now, you can use the above changes...


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Not sure if this is just my site (many customizations) but I think all MS2 sites have the definitions STORE_NAME and HTTP_SERVER, and so in invoice.php you can use the following at the end of the file (~line 360):

<center><span class="smallText"><font face="Verdana" color="#006699"><strong><?php echo 'Thank you for shopping at<br>' . STORE_NAME . '<br>' . HTTP_SERVER; ?></strong></font></span></center>

and in packingslip.php (line 242) you can use:

<center><font face="Verdana" size="2" color="#006699"><strong><?php echo STORE_NAME . '<br>' . HTTP_SERVER; ?></strong></font></center>

 

The install could be made easier by putting the image information into the language files, thus having only those files to edit. I added these lines to the lanuage files admin/includes/languages/english/[invoice.php & packingslip.php]:

// Image Info
define('INVOICE_IMAGE', '/images/ifd_logo.gif');
define('INVOICE_IMAGE_WIDTH', '150');
define('INVOICE_IMAGE_HEIGHT', '150');

and change line 39 in admin/[invoice.php & packingslip.php] to:

	<td align="left"><?php echo '<img src="' . INVOICE_IMAGE . '" border="0" width="' . INVOICE_IMAGE_WIDTH . '" height="' . INVOICE_IMAGE_HEIGHT . '" alt="">'; ?></td>

 

I also saw that the php in invoice.php line 40 could be simplified/optimized (and that doing the same thing in packingslip.php would fix the wrong year being displayed):

   <td align="right" valign="top"><?php echo '<font face="Verdana" size="2" color="#006699"><strong>' . INVOICE_TEXT_INVOICE .' ' . INVOICE_TEXT_NUMBER_SIGN . ' ' . INVOICE_TEXT_CURRENT_YEAR .' ' . INVOICE_TEXT_DASH .' ' . $oID . '<br>' . $date . '</strong></font>'; ?></td>

 

In order for this to work these invoice definitions

// Misc Invoice Info
define('INVOICE_TEXT_INVOICE', 'Invoice');
define('INVOICE_TEXT_CURRENT_YEAR', '05'); // Set this to the current year (2 digits only)
define('INVOICE_TEXT_NUMBER_SIGN', '#');
define('INVOICE_TEXT_DASH', '-');

need to be copied from the invoice.php language file to the packingslip.php language file.

 

Finally, in line 240 where the column span for the totals is set, I had to change this from 5 to 8 in my install in order for the totals to line up under the last column.

 

Anyway, thought that these few changes could make an already easy to install package that much easier to install/manage/update. :)

Share this post


Link to post
Share on other sites
Try this section of code, your table data's colspans were incorrect.

Notice the <td align="right" colspan="8">

 

Heh... I should have refreshed this page before I started installing (and before my reply) :)

 

Anyway, the colspan = "5" is part of the downloaded contribution; I figured out the change to 8 on my own, but you might want to check the download.

Share this post


Link to post
Share on other sites

It will be updated in the next release as soon as I finish the latest changes as described 3 posts above.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

I am working on the update to get it ready for upload now. Should be completed by tonight. I have to leave for a few hours and go to work. Should be back in about 3 hours and I will con't with the latest version of 3.0!!!!!!

 

This new version is going to be real nice so check back later!


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
Heh... I should have refreshed this page before I started installing (and before my reply) :)

 

Anyway, the colspan = "5" is part of the downloaded contribution; I figured out the change to 8 on my own, but you might want to check the download.

 

 

Thanks for pointing this out. I have made this update and credited it to you! You will see it in the new released version of 3.0!


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
I have made this update and credited it to you!

 

LoL....

What about little ol' me... :P

j/k.....

Edited by Twizted

Share this post


Link to post
Share on other sites
LoL....

What about little ol' me... :P

j/k.....

 

 

You were added too :thumbsup:


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Fancier Invoice & Packing Slip v3.0

 

This will replace your current boring invoice and packing slip with a much nicer, cleaner and fancier invoice and packing slip. I added a box around certain sections with a drop shadow. Also, I added a few other goodies as well as the order number to both.

 

On the catalog side, when a customer visits "My Account", then clicks to view an order in their order history, they will now see a much nice layout of the order details along with the order status history at the bottom AND have the option to print an invoice for that order. When they click on the Print Invoice button, it will send the invoice directly to their default printer automatically. This new invoice and order details age has the same basic layout as the invoices have on the Admin side.

 

 

Download it from: http://www.oscommerce.com/community/contributions,2861

 

 

History:

 

April 25, 2005 - v3.0 by PopTheTop

- Fixed a small bug in the install file - thanks to Lane Roathe (Lane)!

- Fixed a small bug in the order totals display - thanks to V. Gibson (Twizted)!

- Updated the install file to a much nicer HTML format

- Replaced the stock, boring Order Details page in customer's My Account

- Added a new Print Invoice option to the customer's Order Details page

- Moved all the packing slip text into its own language file

- Language files have been updated

- Now, the only modifications you should have to do will be found in the 2 language files

 

March 12, 2005 - v2.0 by PopTheTop

- Added code so that if there are no comments, it will state so

- Moved all the invoice text into its own language file

- Fixed a small bug for displaying the order comments in the invoices

 

March 1, 2005 - v1.2 by PopTheTop

- Updated the invoice to include the order comments with the comment entry date

 

January 25, 2005 - v1.1 by PopTheTop

- Updated the HTML tables to show stock product price info, including tax

 

January 25, 2005 - v1.0 by PopTheTop

- Original contribution release

 

 

Future Additions:

 

- I have not completed the new look for the customer's printed invoice yet. But everything else should be done.

 

- You may still install the optional steps below. But when a customer prints their invoice, it will print in the stock osC format until I get it finished.

 

 

 

 

Let me know what you think...

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Hya,

 

A while back i found a bug in this contribution, which also exist in the order edit one actually.

 

If you have a shop where you do not show VAT, but still have zone where VAT is added, the prices are not calculated correctly.

This is basically due to the tep_add_tax function which is buggy in general.php since the if (DISPLAY_RPICE_WITH_TAX == 'true') always stop the price being calculated with tax !!

 

I done a quick fix by just adding a new function :

 

// Add tax to the invoice products price

  function tep_add_invoice_tax($price, $tax) {

    global $currencies;

 

      return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + tep_calculate_tax($price, $tax);

  }

 

then in invoice.php I changed tep_add_tax to tep_add_invoice_tax

 

I realise that the bug is at an higher level but I did not want to start messing with a function which might be used in many different places !

 

I also found it logical to change the way around of the prince including and price excluding to show price including first. That way the last colom is Total Price Exc, which make a bit more sense since underneath starts the sub total calculations with Tax being added etc ... but this change is just my personal taste :)

 

In any case, thanx for the fanstastic job, those ivoice looks times better than the stock ones !

Share this post


Link to post
Share on other sites

2 others small mistake i just noticed

 

In invoice.php, the Thank you for shopping text is hardcoded and not using the language variable.

Same goes for SKU # in packing_slip.php, also at the bottom of the packing slip, the Thank you for shopping message is not included at all

Edited by Phocea

Share this post


Link to post
Share on other sites
Hya,

 

A while back i found a bug in this contribution, which also exist in the order edit one actually.

 

If you have a shop where you do not show VAT, but still have zone where VAT is added, the prices are not calculated correctly.

This is basically due to the tep_add_tax function which is buggy in general.php since the if (DISPLAY_RPICE_WITH_TAX == 'true') always stop the price being calculated with tax !!

 

I done a quick fix by just adding a new function :

then in invoice.php I changed tep_add_tax to  tep_add_invoice_tax

 

I realise that the bug is at an higher level but I did not want to start messing with a function which might be used in many different places !

 

I also found it logical to change the way around of the prince including and price excluding to show price including first. That way the last colom is Total Price Exc, which make a bit more sense since underneath starts the sub total calculations with Tax being added etc ... but this change is just my personal taste :)

 

In any case, thanx for the fanstastic job, those ivoice looks times better than the stock ones !

 

 

Sorry to say, but that is not a bug in this contribution. This contribution is only a new display design and has nothing to do with what you are stating.

 

Now, if your totals are not being displayed correctly, please post that info in another topic.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites
2 others small mistake i just noticed

 

In invoice.php, the Thank you for shopping text is hardcoded and not using the language variable.

Same goes for SKU # in packing_slip.php, also at the bottom of the packing slip, the Thank you for shopping message is not included at all

 

 

Thank you for pointing that out, I made the update...

 

As far as adding the thank you statement to the packing slip, why? It is a packing slip, not an invoice so there is no real need for it. If you want it in there, just add it in.

Edited by PopTheTop

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

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

×