Guest Posted October 30, 2008 Posted October 30, 2008 I am just curious if there is a way to get the ORDER NUMBER to print on the INVOICE when its printed out. Let me know Thanks
Guest Posted October 30, 2008 Posted October 30, 2008 In admin/invoice.php find <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> Just after that add <tr> <td class="main"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td> <td class="main"><?php echo $oID; ?></td> </tr> In admin/includes/languages/english/invoice.php and any other language you use, add this right befor the closing ?> at the bottom define('ENTRY_ORDER_NUMBER', 'Order#:');
Guest Posted October 30, 2008 Posted October 30, 2008 In admin/invoice.php find <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> Just after that add <tr> <td class="main"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td> <td class="main"><?php echo $oID; ?></td> </tr> In admin/includes/languages/english/invoice.php and any other language you use, add this right befor the closing ?> at the bottom define('ENTRY_ORDER_NUMBER', 'Order#:'); I cant find find that in admin/invoice.php here is all I have. ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="orderTableHeadingRow"> <td class="orderTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="orderTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" 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="orderTableRow">' . "\n" . ' <td class="orderTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="orderTableContent" 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="orderTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="orderTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="orderTableContent" 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="orderTableContent" 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="orderTableContent" 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="orderTableContent" 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="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="orderTableContent">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="orderTableContent">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Guest Posted October 30, 2008 Posted October 30, 2008 Look about 5 to 10 lines above that. If you still don't see it, then post your entire admin/invoice.php file.
Guest Posted October 30, 2008 Posted October 30, 2008 <?php /* $Id: invoice.php,v 1.6 2003/06/20 00:37:30 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/order_top.php'); ?> <!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> <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 //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php require('includes/order_header.php'); ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="orderTableHeadingRow"> <td class="orderTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="orderTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="orderTableHeadingContent" 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="orderTableRow">' . "\n" . ' <td class="orderTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="orderTableContent" 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="orderTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="orderTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="orderTableContent" 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="orderTableContent" 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="orderTableContent" 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="orderTableContent" 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="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="orderTableContent">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="orderTableContent">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Guest Posted October 30, 2008 Posted October 30, 2008 This isn't the stock osc. Maybe you already added a contrib for the invoice. Try looking in admin/includes/order_header.php.
Guest Posted October 30, 2008 Posted October 30, 2008 K looks like its, there, follow the same instructions? I didnt install this OSC setup, I just sort of took it over
Guest Posted October 30, 2008 Posted October 30, 2008 First thing you always do is backup. If What I posted above is in that file then yes, give it a try. If it doesn't work post the order_header.php file so I can see it.
Guest Posted October 30, 2008 Posted October 30, 2008 THat worked like a champ, thank you very much Also I redid the home page, and changed the file name. So when you click HOME, it goes to index.php instead of index.html like it needs to now. Where do I fix that? Thanks for your help
Guest Posted October 30, 2008 Posted October 30, 2008 Not sure what you are asking here. What are you trying to do?
Guest Posted October 30, 2008 Posted October 30, 2008 Not sure what you are asking here. What are you trying to do? Ok if you are here http://roseyspowdercoating.biz/osCommerce/catalog/ and click HOME at the top left, it takes you to http://roseyspowdercoating.biz/index.php I need it to take you to http://roseyspowdercoating.com/index.html
Guest Posted October 30, 2008 Posted October 30, 2008 This is just a shot in the dark. Look at your catalog/includes/configure.php. Does the top part look something like this? define('HTTP_SERVER', 'http://www.roseyspowdercoating.biz'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for productive servers define('HTTPS_SERVER', 'https://www.roseyspowdercoating.bizz'); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers define('ENABLE_SSL', 1); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.roseyspowdercoating.biz'); define('HTTPS_COOKIE_DOMAIN', 'www.roseyspowdercoating.biz'); define('HTTP_COOKIE_PATH', '/osCommerce/catalog/'); define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/'); define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/osCommerce/catalog/');
Guest Posted October 30, 2008 Posted October 30, 2008 This is just a shot in the dark. Look at your catalog/includes/configure.php. Does the top part look something like this? define('HTTP_SERVER', 'http://www.roseyspowdercoating.biz'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for productive servers define('HTTPS_SERVER', 'https://www.roseyspowdercoating.bizz'); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers define('ENABLE_SSL', 1); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.roseyspowdercoating.biz'); define('HTTPS_COOKIE_DOMAIN', 'www.roseyspowdercoating.biz'); define('HTTP_COOKIE_PATH', '/osCommerce/catalog/'); define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/'); define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/osCommerce/catalog/'); yes
Recommended Posts
Archived
This topic is now archived and is closed to further replies.