Ralf_Tech Posted January 28, 2015 Share Posted January 28, 2015 @@De Dokta Hello, I have version 2.3.4. installed on my live webshop (the same set-up in my testshop). I installed on my testshop the following 3 addon's: 1) dutchpack http://addons.oscommerce.com/info/7839 2) sppc http://addons.oscommerce.com/info/716 en 3)subtextcategories http://addons.oscommerce.com/info/7841 Al is working great. Now I want to installed my 4th addon: 8885 (Invoice Editor 1.0 http://addons.oscommerce.com/info/8885 ) I just installed this addon in my testshop. But when I installed the "new Tables.sql" in phpmyadmin I got this error message: ErrorThere seems to be a error in your SQL-query. ERROR: unknown punctuatiestring @ 340STR: ->SQL: SQL-query: MySQL meldt: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*NOTE: If you have yet added any additional columns to the tables 'orders','o' at line 1 When you read the install.txt of this invoice editor 1.0"addon they warn you for this: " NOTE: This function uses the column 'orders_date_finished' in the table 'orders', which already exists but normally is not in use. If any of your contribs uses this column, you have to create a new column: ALTER TABLE `orders` ADD `any_name` YEAR(4) NULL default NULL; Additionally you have to replace 'orders_date_finished' with 'any_name' at all sites in the two files "orders_message.php" and "invoice_num.php" ! IMPORTANT! - IMPORTANT! - IMPORTANT! - IMPORTANT! 3. Update the database using the enclosed invoice_en.sql and new_tables.sql files. NOTE: If you have yet added any additional columns to the tables 'orders', 'orders_products'. 'orders_products_attributes', 'orders_products_download' and 'orders_total', you should NOT run the new_tables.sql. Instead go to your phpmyadmin and create copies of the above tables (only structure / not data) using the prefix invoice_ (e.g. orders -> invoice_orders). If you ignore this warning the invoice editor will NOT work! I allready thought that my previous installed addon sppc http://addons.oscommerce.com/info/716 uses this table. But dont know for sure. But as it is a testshop I first tried to upload the new_tables.sql. QUESTON 1 : Does this 716 indeed uses this table allready? QUESTON 2: So because of the error message in myphpadmin I need to manually change something what the red warning text says in the install.txt. But I really don't know what I should manually change, I dont get this instruction. Can someone explain what I should do instead of importing the new_tables.sql? Quote Link to comment Share on other sites More sharing options...
MrPhil Posted January 28, 2015 Share Posted January 28, 2015 -> is not valid in SQL. Did you remember to strip off the instructions (with an editor) at the beginning of the SQL file, and leave the content starting with 'drop table'? Quote Link to comment Share on other sites More sharing options...
De Dokta Posted January 28, 2015 Share Posted January 28, 2015 (edited) Hi Ralf instead of the new_tables.sql simply use the following sql which bypasses all problems with changed order_ tables: drop table if exists invoice_orders; create table invoice_orders LIKE orders; drop table if exists invoice_orders_products; create table invoice_orders_products LIKE orders_products; drop table if exists invoice_orders_products_attributes; create table invoice_orders_products_attributes LIKE orders_products_attributes; drop table if exists invoice_orders_products_download; create table invoice_orders_products_download LIKE orders_products_download; drop table if exists invoice_orders_total; create table invoice_orders_total LIKE orders_total; J.J. NS. There's already a thread for Invoice Editor. It would be nice if you would use it for further questions on this tool. Edited January 28, 2015 by De Dokta Quote Link to comment Share on other sites More sharing options...
Ralf_Tech Posted January 29, 2015 Author Share Posted January 29, 2015 @@De Dokta Thx. That worked. I have 2 remaining questions left. I will ask them in the thread. Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 2, 2015 Share Posted June 2, 2015 (edited) @ De Dokta Thanks for the addon. In your installation, there are typo, missing files list (also missing files in the language folder?). It was set up as no public upload, so no way to upload the modified installation file in English for others, looks like need to open a new one and point it to your addon. It is a bit hard to read through because it is kind of mixing English and other language (which I have no clue at all). For example, In the admin/invoice.php file, there are pieces of code in different language, eg: <?php if(ZAHLUNGSFAELLIGKEIT != '') echo ENTRY_INVOICE_DATE_ZAHLBAR; ?> <?php if(ZAHLUNGSFAELLIGKEIT != '') echo tep_date_short_add($datum, 'day' , ZAHLUNGSFAELLIGKEIT) ; ?> if (KLEINUNTERNEHMER_RECHNUNG == 'nein') { if (KLEINUNTERNEHMER_RECHNUNG == 'ja') { <?php echo UST_FREI; ?> without understanding those pieces of code, it is really hard to modify if users had other addons installed, use my own example, I have fancier invoice and packing slip installed, and I just got stuck in this admin/invoice.php file what do them mean and what they do? thanks in advance. Edited June 2, 2015 by ce7 Quote Link to comment Share on other sites More sharing options...
De Dokta Posted June 2, 2015 Share Posted June 2, 2015 @@ce7 Hi, it's German. :D If you don't understand the meaning of any definition in the files look into invoice_en.sql where you'll find these definitions and their meaning in English. J.J. ce7 1 Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 2, 2015 Share Posted June 2, 2015 @@ce7 Hi, it's German. :D If you don't understand the meaning of any definition in the files look into invoice_en.sql where you'll find these definitions and their meaning in English. J.J. @@De Dokta Hi, Thank you for very quick respond. :thumbsup: Havent go through the SQL file yet, but will have a look, thanks for advise. Have modified the installation file in English version, after I install properly and test, I will send the installation file by PM, you can have a check and then upload to the addons, hope that will help others. ^_^ Thanks!!! Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 3, 2015 Share Posted June 3, 2015 @@De Dokta Hi, Thank you for very quick respond. :thumbsup: Havent go through the SQL file yet, but will have a look, thanks for advise. Have modified the installation file in English version, after I install properly and test, I will send the installation file by PM, you can have a check and then upload to the addons, hope that will help others. ^_^ Thanks!!! @@De Dokta I installed the addon, and there are questions list as below: Q1. Translation related questions: ANREDE_M gender M (where to find the referred file that declair this?) ANREDE_F gender F (where to find the referred file that declair this?) $datum = day ? (where to find the referred file that declair this?) ENTRY_INVOICE_DATE_ZAHLBAR = ENTRY_INVOICE_DATE_PURCHASED ? ENTRY_INVOICE_AUFTRAG_ID Hilfstabelle = table ? TABLE_HEADING_PRICE_INCLUDING_TAX_UST (where to find the referred file that declair this?) UST_FREI (where to find the referred file that declair this?) ja = yes neir = non Steuer_Nr.: = Tax Number: Logo alignment links = links (where to find the referred file that declair this? SQL, and where else?) rechts = ? (where to find the referred file that declair this? SQL, and where else) mitte = ? (where to find the referred file that declair this? SQL, and where else) Display message nein = no (where to find the referred file that declair this? SQL, and where else) Rechnung = ? (where to find the referred file that declair this? SQL, and where else) Lieferschein = ? (where to find the referred file that declair this? SQL, and where else) Bank Code: BLZ (where to find the referred file that declair this? Want to change it to bank code, so it doesn't show as BLZ on the invoice) Q2. On the admin backend, customer/order page, a new "edit invoice" button show up, i have both SQL files run, and the tables of invoice_orders invoice_orders_products invoice_orders_products_attributes invoice_orders_products_download invoice_orders_total are all in my database, made sure they are there via phpMyAdmin, however when I click on the button, the error message is as below: 1146 - Table 'TABLE_INVOICE_ORDERS' doesn't exist select count(*) as dbexists from TABLE_INVOICE_ORDERS [TEP STOP] Q3. If I want to change the layout design of the invoice and packing list, have to modified the admin/invoice.php and admin/packingslip.php the <table></table> part, right? thank you Quote Link to comment Share on other sites More sharing options...
De Dokta Posted June 3, 2015 Share Posted June 3, 2015 Hi 1. Definitions which you don't find in the Sqls you find in the appropriate language files - in this case admin/includes/your language/invoice.php and packingslip.php. 2. Have you entered the tables in admin/includes/database_tables.php? 3. Depends on what you want to change. But in principle correct! J.J. ce7 1 Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 5, 2015 Share Posted June 5, 2015 @De Dokta thanks for quick reply again. 1. Found most of them in the language file, still have some unclear but use the google translator to translate them, it is in the English installation, which I will post below seperately. 2. Yes, database_tables.php has some problem, fix, and new error occurs because I installed so many different addons, and the column number is different to the sql file you have. The solution of fixing the error also mentioned in the English Installation. 3. With the Fancier Invoice and Packingslip, it mentioned that the template can be saved and choise via configuration/e-mail Option, will you consider to develop new version that also can have the invoice template design? Each company has their own layout, it will be great if the shop owner be able to adjust the logo / company info / billing info / shipping info / product order details / comment / bank details, etc by themselve. Thank you for the great addon! Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 5, 2015 Share Posted June 5, 2015 This is the installation in English version. (I am not native English speaker, so welcome to modified and make it better and pass it to De Dokta, the original addon developer so he can post on his updated version.) by ce7/Lyn (5/6/2015) http://addons.oscommerce.com/info/8885Invoice Editor v 1.3 for osC 2.3.3.4by De DoktaBased in parts on:Order Editor for 2.3 v1.1http://addons.oscommerce.com/info/7844andPDF invoice & packing slip with message field and automatic editable invoice nohttp://addons.oscommerce.com/info/8879Tested on osC 2.3.3.4Changes in v. 1.1:- supports UTF8 with so called german 'Umlauts' and special chars- added capability to display € symbol- some minor corrections and cleanings of the codechanges in v. 1.2:- added selectable option to automatically save PDF invoices using the invoice no. as filenameChanges in v. 1.3.- added logic to invoice editor and orders administration to check if an invoice for an order already exists. If so, you are prompted to confirm overwriting the existing invoice (if you change the order no. an existing invoice will not be overwrited)- existing invoices can now be recalled in the order administration- you can attach a pdf invoice when you notify your customer by mail that the orders status has changed New Installation=================1.0=================BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUP - BACKUPYou should make a backup of your entire site. This includes both your code and the database. =================2.0=================Upload Files/foldersNew files -= admin/fpdf/all files including listed as below: admin/fpdf/font/makefont/cp874.map admin/fpdf/font/makefont/cp1250.map admin/fpdf/font/makefont/cp1251.map admin/fpdf/font/makefont/cp1252.map admin/fpdf/font/makefont/cp1253.map admin/fpdf/font/makefont/cp1254.map admin/fpdf/font/makefont/cp1255.map admin/fpdf/font/makefont/cp1257.map admin/fpdf/font/makefont/cp1258.map admin/fpdf/font/makefont/iso-8859-1.map admin/fpdf/font/makefont/iso-8859-2.map admin/fpdf/font/makefont/iso-8859-4.map admin/fpdf/font/makefont/iso-8859-5.map admin/fpdf/font/makefont/iso-8859-7.map admin/fpdf/font/makefont/iso-8859-9.map admin/fpdf/font/makefont/iso-8859-11.map admin/fpdf/font/makefont/iso-8859-15.map admin/fpdf/font/makefont/iso-8859-16.map admin/fpdf/font/makefont/koi8-r.map admin/fpdf/font/makefont/koi8-u.map admin/fpdf/font/makefont/makefont.php admin/fpdf/font/courier.php admin/fpdf/font/courierb.php admin/fpdf/font/courierbi.php admin/fpdf/font/courieri.php admin/fpdf/font/helvetica.php admin/fpdf/font/helveticab.php admin/fpdf/font/helveticabi.php admin/fpdf/font/helveticai.php admin/fpdf/font/symbol.php admin/fpdf/font/times.php admin/fpdf/font/timesb.php admin/fpdf/font/timesbi.php admin/fpdf/font/timesi.php admin/fpdf/font/zapfdingbats.php = admin/invoice_editor/all files including listed as below: admin/images/arrow_down.gif admin/images/minus.gif admin/images/minus_grey.gif admin/images/plus.gif admin/images/plus_grey.gif admin/invoice_editor/cart.php admin/invoice_editor/functions.php admin/invoice_editor/javascript.php admin/invoice_editor/order.php admin/invoice_editor/order_total.php admin/invoice_editor/popup_pdf_check.php admin/invoice_editor/shipping.php= admin/edit_invoice.php= admin/edit_invoice_add_product.php= admin/edit_invoice_process.php= admin/invoice_editor.php ------------------->missing in the previous install instruction= admin/invoice_editor_pdf.php= admin/invoice_pdf.php ---------------------->missing in the previous install instruction= admin/packingslip_editor.php --------------->missing in the previous install instruction= admin/packingslip_editor_pdf.php= admin/packingslip_pdf.php ------------------>missing in the previous install instruction= admin/includes/languages/english/edit_invoice.php= admin/includes/languages/english/invoice.php.php= admin/includes/languages/english/invoice_pdf.php= admin/includes/languages/english/packingslip.php= admin/includes/languages/english/packingslip_pdf.php= admin/includes/functions/invoice_num.php---->mis-spelling in the previous install instruction Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 5, 2015 Share Posted June 5, 2015 =================3.0=================Existing files to be modifiedif you find the code is different, use the comparison application to comapre two files,or using the online compare tool by visiting http://diffnow.com************************************************3.1 = catalog/checkout_process.php***********************************************find the code: 'payment_method' => $order->info['payment_method'], 'cc_type' => $order->info['cc_type'], replace the code with: 'payment_method' => $order->info['payment_method'], 'shipping_module' => $shipping['id'], 'cc_type' => $order->info['cc_type'], *******************************3.2 = admin/orders.php*******************************---------------------------3.2.1 find the code:--------------------------- require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); after that, add : tep_session_unregister('edit_invoice_orders'); --------------------------3.2.2 find the code:-------------------------- $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); after that, add : $invoice_sent = tep_db_prepare_input($HTTP_POST_VARS['invoice_sent']); ---------------------------3.2.3 find the code:--------------------------- $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')"); $order_updated = true; } replace the code with: $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased, pdf_invoice from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; $invoice_sent = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); if(tep_not_null($check_status['pdf_invoice']) && isset($_POST['notify_invoice']) && ($_POST['notify_invoice'] == 'on')) { $file = SAVE_FOLDER . $check_status['pdf_invoice']; $filename = $check_status['pdf_invoice']; $filetype = 'application/pdf'; $invoice_sent = '1'; } tep_mail_pdf_attach($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $file, $filename, $filetype); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments, invoice_sent) values ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "', '" . tep_db_input($invoice_sent) . "')"); $order_updated = true; } --------------------------3.2.4 find the code:-------------------------- <td class="smallText" align="right"><?php echo tep_draw_button(IMAGE_ORDERS_INVOICE, 'document', tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_ORDERS_PACKINGSLIP, 'document', tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')))); ?></td> replace the code with: <td class="smallText"><?php echo tep_draw_button(IMAGE_EDIT_INVOICE, 'wrench', tep_href_link(FILENAME_INVOICE_EDIT_PROCESS, 'oID=' . $_GET['oID'])) . tep_draw_button(IMAGE_INVOICE, 'document', tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']), null, array('newwindow' => true));?></td> <td class="smallText"><?php echo (!tep_not_null($order->info['pdf_invoice'])) ? tep_draw_button(IMAGE_INVOICE_PDF, 'document', tep_href_link(FILENAME_INVOICE_PDF, 'oID=' . $_GET['oID']), null, array('newwindow' => true, 'reload' => true)) : '<a href="' . tep_href_link('invoice_editor/popup_pdf_check.php', 'oID=' . (int)$_GET['oID']) . '" target="_blank" onclick="$(\'#popupPDFCheck\').dialog(\'open\'); return false;">'. tep_draw_button(IMAGE_INVOICE_PDF, 'document', null) . '</a>';?></td> <td class="smallText"><?php echo tep_draw_button(IMAGE_PACKINGSLIP, 'document', tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_PACKINGSLIP_PDF, 'document', tep_href_link(FILENAME_PACKINGSLIP_PDF, 'oID=' . $_GET['oID']), null, array('newwindow' => true)) . tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))));?> </td> ---------------------------3.2.5 find the code:--------------------------- <tr> <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?></strong></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> after that, add: <tr> <td class="main"><strong><?php echo ORDER_ID; ?></strong></td> <td class="main"><?php echo $oID; ?></td> </tr> <tr> <td class="main"><strong><?php echo CUSTOMER_ID; ?></strong></td> <td class="main"><?php echo $order->customer['customers_id']; ?></td> </tr> <tr> <td class="main"><strong><?php echo INVOICE_NO; ?></strong></td> <td class="main"><strong><?php echo INVOICE_NO; ?></strong></td> <td class="main"><?php echo ($order->info['num_invoice'] != '0') ? (ENTRY_INVOICE_ORDER_ID_PREFIX . $order->info['num_invoice'] . ENTRY_INVOICE_ORDER_ID_SUFIX) : NO_NUMBER; ?></td> <td class="main"><?php echo tep_not_null($order->info['pdf_invoice']) ? tep_draw_separator('pixel_trans.gif', '10', '1') . tep_draw_button(IMAGE_VIEW_PDF, 'document', tep_href_link(SAVE_FOLDER . $order->info['pdf_invoice'], '', 'NONSSL', false), null, array('newwindow' => true)) : ''; ?></td> --------------------------3.2.6 find the code:-------------------------- <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td> after that, add: <td class="smallText" align="center"><strong><?php echo TABLE_HEADING_INVOICE; ?></strong></td><td class="smallText" align="center"><strong><?php echo TABLE_HEADING_INVOICE; ?></strong></td> --------------------------3.2.7 find the code:-------------------------- $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); replace the code with: $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments, invoice_sent from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); --------------------------3.2.8 find the code:-------------------------- while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . tep_datetime_short($orders_history['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history['customer_notified'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n" . ' <td class="smallText">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td>' . "\n" . ' </tr>' . "\n"; } } else { replace the code with: while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr>' . "\n" . ' <td class="smallText" align="center">' . tep_datetime_short($orders_history['date_added']) . '</td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history['customer_notified'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } echo ' <td class="smallText">' . $orders_status_array[$orders_history['orders_status_id']] . '</td>' . "\n" . ' <td class="smallText">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td>' . "\n" . ' <td class="smallText" align="center">'; if ($orders_history['invoice_sent'] == '1') { echo tep_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n"; } else { echo tep_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n"; } ' </tr>' . "\n"; } } else { --------------------------3.2.9 find the code:-------------------------- <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> after that, add: <?php if(tep_not_null($order->info['pdf_invoice'])) { ?> <td class="main"><strong><?php echo tep_draw_separator('pixel_trans.gif', '25', '1') . ENTRY_NOTIFY_INVOICE; ?></strong> <?php echo tep_draw_checkbox_field('notify_invoice', '', false); ?></td> <?php } ?> ----------------------------3.2.10 find the code:--------------------------- $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; replace the code with: $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.pdf_invoice, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.pdf_invoice, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, o.pdf_invoice, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } ----------------------------3.2.11 find the code:---------------------------- $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_ORDERS_INVOICE, 'document', tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true)) . tep_draw_button(IMAGE_ORDERS_PACKINGSLIP, 'document', tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id), null, array('newwindow' => true))); after that, add: $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT_INVOICE, 'wrench', tep_href_link(FILENAME_INVOICE_EDIT_PROCESS, 'oID=' . $oInfo->orders_id))); ----------------------------3.2.12 find the code:--------------------------- <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); before that, add: <div id="popupPDFCheck" title="<?php echo 'PDF-Check'; ?>"> <div id="popupContent"><?php include('invoice_editor/popup_pdf_check.php'); ?></div> </div> <script type="text/javascript"> function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } $('#popupPDFCheck').dialog({ autoOpen: false, width: 400, height: 150, buttons: { } }); </script> ***********************************************3.3 = admin/includes/filenames.php***********************************************before end of ?> add: define('FILENAME_INVOICE_EDIT', 'edit_invoice.php'); define('FILENAME_INVOICE_EDIT_ADD_PRODUCT', 'edit_invoice_add_product.php'); define('FILENAME_INVOICE_EDIT_PROCESS', 'edit_invoice_process.php'); define('FILENAME_INVOICE_EDITOR', 'invoice_editor.php'); define('FILENAME_INVOICE_EDITOR_PDF', 'invoice_editor_pdf.php'); define('FILENAME_INVOICE_PDF', 'invoice_pdf.php'); define('FILENAME_PACKINGSLIP_EDITOR', 'packingslip_editor.php'); define('FILENAME_PACKINGSLIP_EDITOR_PDF', 'packingslip_editor_pdf.php'); define('FILENAME_PACKINGSLIP_PDF', 'packingslip_pdf.php'); ********************************************************3.4 = admin/includes/database_tables.php*******************************************************before end of ?> add: define('TABLE_INVOICE_ORDERS', 'invoice_orders'); define('TABLE_INVOICE_ORDERS_PRODUCTS', 'invoice_orders_products'); define('TABLE_INVOICE_ORDERS_PRODUCTS_ATTRIBUTES', 'invoice_orders_products_attributes'); define('TABLE_INVOICE_ORDERS_PRODUCTS_DOWNLOAD', 'invoice_orders_products_download'); define('TABLE_INVOICE_ORDERS_TOTAL', 'invoice_orders_total'); *********************************************************3.5 = admin/includes/functions/general.php*********************************************************--------------------------3.5.1 find the code:------------------------- // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } after that, add: function tep_mail_pdf_attach($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $file, $filename, $filetype) { if (SEND_EMAILS != 'true') return false; $message = new email(array('X-Mailer: osCommerce')); $text = strip_tags($email_text); if (email_USE_HTML == 'true') { $message->add_html($text); } else { $message->add_text($text); } $attachment = fread(fopen($file, "r"), filesize($file)); $message->add_attachment($attachment, $filename, $filetype); $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } -------------------------------------------------------3.5.2 before end of the ?>, add the code:-------------------------------------------------------xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxImportant:If you have installed the Order Editor you, youmust do nothing - the code already exists!!!!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // Get list of all payment modules available function tep_cfg_pull_down_payment_methods() { global $language; $enabled_payment = array(); $module_directory = DIR_FS_CATALOG_MODULES . 'payment/'; $file_extension = '.php'; if ($dir = @[member='dir']($module_directory)) { while ($file = $dir->read()) { if (!is_dir( $module_directory . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $directory_array[] = $file; } } } sort($directory_array); $dir->close(); } // For each available payment module, check if enabled for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) { $file = $directory_array[$i]; include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/payment/' . $file); include($module_directory . $file); $class = substr($file, 0, strrpos($file, '.')); if (tep_class_exists($class)) { $module = new $class; if ($module->check() > 0) { // If module enabled create array of titles $enabled_payment[] = array('id' => $module->title, 'text' => $module->title); } } } $enabled_payment[] = array('id' => 'Other', 'text' => 'Other'); //draw the dropdown menu for payment methods and default to the order value return tep_draw_pull_down_menu('configuration_value', $enabled_payment, '', ''); } /////end payment method dropdown **************************************************************3.6 = admin/includes/functions/html_output.php**************************************************************find the code: if ( isset($params['newwindow']) ) { $button .= ' target="_blank"'; } after that, add: if ( isset($params['reload']) ) { $button .= ' onclick ="timedRefresh(500)"'; } ***********************************************************3.7 = admin/includes/languages/english.php***********************************************************before end of ?> insert the following lines: define('IMAGE_EDIT_INVOICE', 'Edit invoice'); define('IMAGE_CHANGE', 'Change'); define('IMAGE_INVOICE_PDF', 'Invoice PDF'); define('IMAGE_PACKINGSLIP_PDF', 'Packingslip PDF'); define('IMAGE_INVOICE', 'Invoice HTML'); define('IMAGE_PACKINGSLIP', 'Packingslip HTML'); define('IMAGE_VIEW_PDF', 'View Invoice'); define('IMAGE_INVOICE_NEW_PDF', 'New Invoice'); ********************************************************************3.8 = admin/includes/languages/english/orders.php********************************************************************before end of ?> insert the following lines: define('ORDER_ID', 'Order No.'); define('CUSTOMER_ID', 'Customers No.'); define('INVOICE_NO', 'Invoice No.'); define('TABLE_HEADING_INVOICE', 'Invoice added'); define('NO_NUMBER', 'No invoice no. assigned yet!'); define('ENTRY_NOTIFY_INVOICE', 'Attach invoice'); ************************************************3.9 = admin/includes/stylesheet.css************************************************at the end of the file, add: .hidden { position: absolute; left: -1500em; } *****************************************************3.10 = admin/includes/classes/order.php*****************************************************----------------------------3.10.1 find the code:---------------------------- $order_query = tep_db_query("select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); replace the code with: $order_query = tep_db_query("select customers_name, customers_id, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, num_invoice, pdf_invoice, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'"); ------------------------------3.10.2 find the code:------------------------------ 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified']); replace the code with: 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'num_invoice' => $order['num_invoice'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified'], 'pdf_invoice' => $order['pdf_invoice']); ----------------------------3.10.3 find the code:---------------------------- $this->customer = array('name' => $order['customers_name'], replace the code with: $this->customer = array('customers_id' => $order['customers_id'], 'name' => $order['customers_name'], **********************************3.11 = admin/invoice.php**********************************----------------------------3.11.1 find the code:---------------------------- require('includes/application_top.php'); after that, add: // BOF Invoice & Packingslip function tep_date_short_add($raw_date, $typ, $add) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; if ($typ == 'year') { $year = substr($raw_date, 0, 4); $year = $year + (int)$add; } else { $year = substr($raw_date, 0, 4); } if ($typ == 'month') { $month = (int)substr($raw_date, 5, 2); $month = $month + (int)add; } else { $month = (int)substr($raw_date, 5, 2); } if ($typ == 'day') { $day = (int)substr($raw_date, 8, 2); $day = $day + (int)$add; } else { $day = (int)substr($raw_date, 8, 2); } $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); if (@[member='date']('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year)); } else { return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); } } // EOF Invoice & Packingslip ----------------------------3.11.2 find the code:---------------------------- $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); replace them with: $oID = tep_db_prepare_input($_GET['oID']); require(DIR_WS_FUNCTIONS . 'invoice_num.php'); tep_set_num($oID); $orders_query = tep_db_query("select o.orders_id, o.customers_id, a.entry_gender from " . TABLE_ORDERS . " o, " . TABLE_ADDRESS_BOOK . " a where o.customers_id = a.customers_id and orders_id = '" . (int)$oID . "'"); $cust= tep_db_fetch_array($orders_query); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); $datum = date('Y-m-d H:i:s'); ----------------------------3.11.3 find the code:---------------------------- <body> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'store_logo.png', STORE_NAME); ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo ENTRY_SOLD_TO; ?></strong></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '<br />'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo ENTRY_SHIP_TO; ?></strong></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?></strong></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> replace them with: <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <?php if (EDIT_INVOICE_LOGO_ALIGN == 'rechts' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="right" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO_ALIGN == 'links' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="left" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO_ALIGN == 'mitte' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="center" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO == '') { ?> <td colspan="2" align="center" valign="top" class="pageHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '100'); ?></td> <?php } } } } ?> </tr> <tr> <td width="345" align="right" valign="top" class="pageHeading"> <table width="340" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2" class="main" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '1', '30'); ?></td> </tr> <tr> <td class="smallText" ><?php echo SHOPBETREIBER . ' • ' . SHOPSTRASSE . ' • ' . SHOPSTADT ; ?></td> </tr> <tr> <td class="main"><br/> <?php if($cust['entry_gender'] == "m") { echo ANREDE_M . '<br />'; }elseif ($cust['entry_gender'] == "f"){ echo ANREDE_F . '<br />'; }else{ } echo tep_address_format($order->billing['format_id'], $order->billing, '', '', '<br />'); ?></td> </tr> <tr> <td colspan="2" class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '40'); ?></td> </tr> </table></td> <td width="300" align="right" valign="top" class="main"> <table> <tr> <td width="100" align="right" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '20'); ?></td> </tr> <tr> <td class="main" align="right"> </td> </tr> </table></td> </tr> </table> <table width="645" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td align="left" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <?php if (EDIT_INFOICE_SHOW_ONR == 'ja') { ?> <tr> <td width="20%" class="main"><?php echo ENTRY_INVOICE_ORDER_ID; ?></td> <td class="main"> <?php echo ENTRY_INVOICE_ORDER_ID_PREFIX . sprintf("%02u",$order->info['num_invoice']) . ENTRY_INVOICE_ORDER_ID_SUFIX; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '200', '25'); ?></td> <?php } ?> <td class="main" align="right"><strong><?php echo ENTRY_INVOICE_DATE_PURCHASED; ?><br /><?php if(ZAHLUNGSFAELLIGKEIT != '') echo ENTRY_INVOICE_DATE_ZAHLBAR; ?></strong></td> <td class="main" align="right"> <?php echo tep_date_short($datum); ?><br /><?php if(ZAHLUNGSFAELLIGKEIT != '') echo tep_date_short_add($datum, 'day' , ZAHLUNGSFAELLIGKEIT) ; ?></td> </tr> </table> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="5" class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td colspan="5" class="main"><?php echo LEGAL_NOTICE; ?></td> </tr> <tr> <td colspan="5" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td colspan="5" class="main"> </td> </tr></table> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="main" colspan="2"><?php echo YOUR_ORDER_DATE . tep_date_short($order->info['date_purchased']) . ' (' .ENTRY_INVOICE_AUFTRAG_ID . ' ' . $oID . ')'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> <?php if (EDIT_INFOICE_SHOW_CNR == 'ja' && $cust['customers_id'] != '') { ?> <td class="main" align="right"><strong><?php echo ENTRY_INVOICE_COSTUMER_ID; ?></strong></td> <td class="main"> <?php echo $cust['customers_id']; ?></td> <?php } ?> </tr> </table></td> </tr> </table> <table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td valign=top colspan="2"> <hr> <?php if (KLEINUNTERNEHMER_RECHNUNG == 'nein') { ?> <!-- Beginn Hilfstabelle --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '280'); ?></td> -----------------------------3.11.4 find the code:----------------------------- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> delete it!----------------------------3.11.5 find the code:---------------------------- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> after that, add: <tr> <td colspan="8" ><hr></td> </tr> ----------------------------3.11.6 find the code:---------------------------- 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>'; comment the lines out!----------------------------3.11.7 find the code:---------------------------- ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . delete it!----------------------------3.11.8 find the code:---------------------------- <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> change the code to: <td align="right" colspan="8"><hr><table border="0" cellspacing="0" cellpadding="2"> ----------------------------3.11.9 find the code:---------------------------- <?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"; } ?> after that, add: </table><hr> </td> </tr> </table> </td> </tr> </table> <?php } if (KLEINUNTERNEHMER_RECHNUNG == 'ja') { ?> <!-- Beginn Hilfstabelle --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '200'); ?></td> <td> <table border="0" width="100%" height="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_PRICE_INCLUDING_TAX_UST; ?></td> <td class="dataTableHeadingContent" align="right" ><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX_UST; ?></td> </tr> <tr> <td colspan="5" ><hr></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"> '; ?> <?php if (BARCODE_PRODUCT == 'ja') { echo ' <img src="barcodegen.php?barcode= ' . $order->products[$i]['model'] . ' "><br /> '; } ?> <?php echo ' <left> ' . $order->products[$i]['model'] . '</center></td>' . "\n"; // echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . echo ' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><strong>' . $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']) . '</strong></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"><hr><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="dataTableContent">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="dataTableContent">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table><hr> </td> </tr> </table> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main"><strong><?php echo UST_FREI; ?></strong></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '40'); ?></td> </tr> </table> <?php } ?> </td> </tr> <?php if (EDIT_INFOICE_SHOW_PAYMENT == 'ja') { ?> <tr> <td class="main"><strong><?php echo ENTRY_PAYMENT_METHOD; ?> </strong><?php echo $order->info['payment_method']; ?> <?php if(stristr($order->info['payment_method'], 'Vorkasse') !== FALSE) { ?> <br /><?php echo tep_draw_separator('pixel_trans.gif', '107', '1') . ENTRY_THANKS_PAYMENT; }elseif((stristr($order->info['payment_method'], 'Rechnung') !== FALSE)){ ?> <br /><?php echo tep_draw_separator('pixel_trans.gif', '107', '1') . ENTRY_PAY_NOW; }?> </td> </tr> <?php } ?> <tr> <td colspan="2"><table width=100% cellpadding=1 cellspacing=2> <tr> <td colspan="4" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '50'). THANKS_FOR_BUY; ?></td> </tr> </td> </tr> <tr> <td colspan="2"><table width=100% cellpadding=1 cellspacing=2> <tr> <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '1', '25'); ?></td> </tr> <?php if(SEND_COMMENT != 'nein') { if((isset($order->info['message'])) && (SEND_COMMENT != 'Lieferschein')) { echo '<tr><td colspan="4" class="main"><i>' . $order->info['message'] . '</i></td></tr>'; } } ?> <tr> <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?><hr></td> </tr> <tr> <td class=smallText valign=top><?php echo SHOPBETREIBER . '<br />' . SHOPSTRASSE . '<br />' . SHOPSTADT . '<br />' . SHOPTELEFON . '<br />' . SHOPFAX . '<br />' . SHOPEMAIL ; ?></td> <?php if (SHOW_BANK_DATA == 'ja') { ?> <td class=smallText valign=top><?php echo OWNER_BANK_NAME . '<br />' . OWNER_BANK_ACCOUNT . '<br />' . TEXT_BANK_BLZ . ' ' . STORE_OWNER_BLZ . '<br />' . TEXT_BANK_KTO . ' ' . OWNER_BANK . '<br />' . OWNER_BANK_SWIFT . '<br />' . OWNER_BANK_IBAN; ?></td> <?php }else{ echo '<td class=smallText valign=top>'. tep_draw_separator('pixel_trans.gif', '150', '1') .'</td>'; } ?> <td class=smallText valign=top><?php echo OWNER_BANK_FA . '<br />' . OWNER_BANK_TAX_NUMBER . '<br />' . OWNER_BANK_UST_NUMBER; if (SHOW_GMBH_DATA == 'ja') { ?> <?php echo '<br /><br />HRB: ' . HRB . '<br />' . AMTSGERICHT . '<br /><br />' ; ?> <?php } ?> </td> </tr> ***************************************3.12 = admin/packingslip.php****************************** ******** ----------------------------- 3.12.1 find the code:----------------------------- $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); replace it with: $oID = tep_db_prepare_input($_GET['oID']); require(DIR_WS_FUNCTIONS . 'invoice_num.php'); tep_set_num($oID); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); $datum = date('Y-m-d'); $orders_query = tep_db_query("select o.orders_id, o.customers_id, o.message, o.num_invoice, a.entry_gender from " . TABLE_ORDERS . " o, " . TABLE_ADDRESS_BOOK . " a where o.customers_id = a.customers_id and orders_id = '" . (int)$oID . "'"); $cust= tep_db_fetch_array($orders_query); ------------------------------------------------------------------3.12.2 find code included within <bode>...</body>------------------------------------------------------------------replace the whole <body>...</body> with: <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <?php if (EDIT_INVOICE_LOGO_ALIGN == 'rechts' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="right" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO_ALIGN == 'links' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="left" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO_ALIGN == 'mitte' and EDIT_INVOICE_LOGO != '') { ?> <td colspan="2" align="center" valign="top" class="pageHeading"><?php echo tep_image(DIR_WS_IMAGES . EDIT_INVOICE_LOGO); ?></td> <?php } else { if (EDIT_INVOICE_LOGO == '') { ?> <td colspan="2" align="center" valign="top" class="pageHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '100'); ?></td> <?php } } } } ?> </tr> <tr> <td width="345" align="right" valign="top" class="pageHeading"> <table width="340" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2" class="main" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '1', '30'); ?></td> </tr> <tr> <td class="smallText" ><?php echo SHOPBETREIBER . ' • ' . SHOPSTRASSE . ' • ' . SHOPSTADT ; ?></td> </tr> <tr> <td class="main"><br/> <?php if($cust['entry_gender'] == "m") { echo ANREDE_M . '<br />'; }elseif ($cust['entry_gender'] == "f"){ echo ANREDE_F . '<br />'; }else{ } ?> <?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td> </tr> <tr> <td colspan="2" class="titleHeading"><?php echo tep_draw_separator('pixel_trans.gif', '1', '80'); ?></td> </tr> </table></td> <td width="300" align="right" valign="top" class="main"> <table> <tr> <td width="100" align="right" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '20'); ?></td> </tr> <tr> <td class="main" align="right"> </td> </tr> </table></td> </tr> </table> <table width="645" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td align="left" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <?php if (EDIT_INFOICE_SHOW_ONR == 'ja') { ?> <tr> <td width="20%" class="main"><strong><?php echo ENTRY_DELIVERY_ORDER_ID; ?></strong></td> <td class="main"> <?php echo ENTRY_INVOICE_ORDER_ID_PREFIX . sprintf("%02u", $order->info['num_invoice']) . ENTRY_INVOICE_ORDER_ID_SUFIX; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '230', '25'); ?></td> <?php } ?> <td class="main" align="right"><strong><?php echo ENTRY_INVOICE_DATE_PURCHASED; ?></strong></td> <td class="main" width="10%" align="right"> <?php echo tep_date_short($datum); ?></td> </tr> </table> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="main" colspan="2"><?php echo YOUR_ORDER_DATE . tep_date_short($order->info['date_purchased']) . ' (' .ENTRY_INVOICE_AUFTRAG_ID . ' ' . $oID . ')'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '250', '25'); ?></td> <?php if (EDIT_INFOICE_SHOW_CNR == 'ja' && $cust['customers_id'] !='') { ?> <td class="main" align="right"><strong><?php echo ENTRY_INVOICE_COSTUMER_ID; ?></strong></td> <td class="main"> <?php echo $cust['customers_id']; ?></td> <?php } ?> </tr> </table> <table width="645" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><hr></td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width="10%"><?php echo TABLE_HEADING_NUMBER; ?></td> <td class="dataTableHeadingContent" width="67%"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?> </td> </tr> <tr> <td colspan="3" ><hr></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" >' . $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>' . ' <td class="dataTableContent" valign="top"> '; ?> <?php if (BARCODE_PRODUCT == 'ja') { echo ' <img src="barcodegen.php?barcode= ' . $order->products[$i]['model'] . ' "><br />'; } ?> <?php echo '<center> ' . $order->products[$i]['model'] . '</center></td>' . "\n"; ' </tr>' . "\n"; } ?> </tr> <tr> <td colspan="3" ><hr><?php echo tep_draw_separator('pixel_trans.gif', '1', '100'); ?></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td><table border="0" width=100% cellpadding=1 cellspacing=2> <tr> <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <?php if(SEND_COMMENT != 'nein') { if((isset($cust['message'])) && (SEND_COMMENT != 'Rechnung')) { echo '<tr><td colspan="4" class="main"><i>' . $cust['message'] . '</i></td></tr>'; } } ?> </tr> <tr> <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '1', '25'); ?><hr></td> </tr> <tr> <td class=smallText valign=top><?php echo SHOPBETREIBER . '<br />' . SHOPSTRASSE . '<br />' . SHOPSTADT . '<br />' . SHOPTELEFON . '<br />' . SHOPFAX . '<br />' . SHOPEMAIL ; ?></td> <?php if (SHOW_BANK_DATA == 'ja') { ?> <td class=smallText valign=top><?php echo OWNER_BANK_NAME . '<br />' . OWNER_BANK_ACCOUNT . '<br />' . TEXT_BANK_BLZ . ' ' . STORE_OWNER_BLZ . '<br />' . TEXT_BANK_KTO . ' ' . OWNER_BANK . '<br />' . OWNER_BANK_SWIFT . '<br />' . OWNER_BANK_IBAN; ?></td> <?php }else{ echo '<td class=smallText valign=top>'. tep_draw_separator('pixel_trans.gif', '150', '1') .'</td>'; } ?> <td class=smallText valign=top><?php echo OWNER_BANK_FA . '<br />' . OWNER_BANK_TAX_NUMBER . '<br />' . OWNER_BANK_UST_NUMBER; if (SHOW_GMBH_DATA == 'ja') { ?> <?php echo '<br /><br />HRB: ' . HRB . '<br />' . AMTSGERICHT . '<br /><br />' ; ?> <?php } ?> </td> </tr> </table></td> </tr> </table> </table> </body> Quote Link to comment Share on other sites More sharing options...
ce7 Posted June 5, 2015 Share Posted June 5, 2015 =================4.0 ================= Create a new folder under admin (e.g. admin/invoices) and set the permission to chmod 777 or at least 755.This folder is used to automatically store your PDF-Invoices using the invoice no as file name.To save invoices, set in the Admin -> Configuration -> Invoice Editor ' Save invoices?' to true,and in storage directory' enter the location of your folder: a directory admin/invoicesyou would have for example to enter as: invoices/ (WITH backslash). =================5.0 =================Copy the logo for invoice / packingslip into the directory "admin / images /" In the later configurations simply specify the file name, without path! =================6.0 =================Update the database using the enclosed invoice_en.sql and new_tables.sql files. **************************6.1 invoice_en.sql************************** insert into configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('912','Invoice editor', 'Master data input and configuration settings for PDF and html invoice/packingslip', '99', '1'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop owner', 'SHOPBETREIBER', 'Fristname Lastname', ' ', '912', '1', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop address: street', 'SHOPSTRASSE', ' ', 'Enter shop address: street', '912', '2', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop address: City', 'SHOPSTADT', ' ', 'Enter shop address: city', '912', '3', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop address: fon', 'SHOPTELEFON', 'Tel. + (0) 9999 999999', 'Enter shop address: fon', '912', '4', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop address: fax', 'SHOPFAX', 'FAX + (0) 9999 999998', 'Enter shop address: fax', '912', '5', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Shop address: email', 'SHOPEMAIL', ' ', 'Enter shop address: email', '912', '6', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Bank', 'OWNER_BANK_NAME', ' ', 'The name of your bank', '912', '7', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Account holder', 'OWNER_BANK_ACCOUNT', ' ', 'Account holder', '912', '8', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Bank code', 'STORE_OWNER_BLZ', ' ', 'Your bank code', '912', '9', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Account No.', 'OWNER_BANK', ' ', 'Your Account No.', '912', '10', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('International Bank Account Number (IBAN)', 'OWNER_BANK_IBAN', 'IBAN', 'International Bank Account Number', '912', '11', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('SWIFT Code', 'OWNER_BANK_SWIFT', 'SWIFT', 'Swift Code for international transfers', '912', '12', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Display of bank data', 'SHOW_BANK_DATA', 'ja', 'Do you want to display your banking information in the footer?', '912', '13', '', now(), '', 'tep_cfg_select_option(array(\'yes\',\'no\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Tax office', 'OWNER_BANK_FA', ' ', 'Name of your local tax office', '912', '14', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Tax number', 'OWNER_BANK_TAX_NUMBER', ' ', 'Your tax number', '912', '15', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Ust-Id-No.', 'OWNER_BANK_UST_NUMBER', ' ', 'Your Ust-Id-No. (if applicable)', '912', '16', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Commercial Register No.', 'HRB', ' ', 'Commercial Register No.', '912', '17', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Court of registry', 'AMTSGERICHT', ' ', 'Court of registry', '912', '18', '', now()); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Display the Ltd. Data', 'SHOW_GMBH_DATA', 'nein', 'Do you want to display the Ltd.data in the footer?', '912', '19', '', now(),NULL, 'tep_cfg_select_option(array(\'yes\',\'no\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Logo','EDIT_INVOICE_LOGO','','Here you can enter a logo for invoice - delivery note',912,20,'','now()','',''); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Logo alignment', 'EDIT_INVOICE_LOGO_ALIGN', 'rechts', 'Logo alignment', 912, 21, '', 'now()', NULL, 'tep_cfg_select_option(array(\'left\', \'right\', \'center\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Customer No.','EDIT_INFOICE_SHOW_CNR','ja','Display Customer No.?',912,22,'','now()', NULL,'tep_cfg_select_option(array(\'ja\', \'nein\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Invoice No.','EDIT_INFOICE_SHOW_ONR','ja','Display Invoice No.?',912,23,'','now()', NULL,'tep_cfg_select_option(array(\'ja\', \'nein\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Invoice number prefix','ENTRY_INVOICE_ORDER_ID_PREFIX','','Invoice number prefix',912,24,'','now()','',''); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Invoice number sufix','ENTRY_INVOICE_ORDER_ID_SUFIX','','Invoice number prefix',912,25,'','now()','',''); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Due date of the invoice', 'ZAHLUNGSFAELLIGKEIT', '', 'Input in days from the invoice date. (Leave field blank if nothing should be stated on the invoice)', 912, 27, '', 'now()', NULL, NULL); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Payment method','EDIT_INFOICE_SHOW_PAYMENT','ja','Display payment method?',912,29,'','now()', NULL,'tep_cfg_select_option(array(\'ja\', \'nein\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Display message','SEND_COMMENT','beide','Add a Message to invoice / delivery note?',912,30,'','now()', NULL,'tep_cfg_select_option(array(\'nein\', \'Rechnung\', \'Lieferschein\', \'beide\'), '); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Small business invoice','KLEINUNTERNEHMER_RECHNUNG','nein','Display Small business invoice?',912,31,'','now()', NULL,'tep_cfg_select_option(array(\'ja\', \'nein\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Display the Payment Method dropdown?', 'ORDER_EDITOR_PAYMENT_DROPDOWN', 'true', 'Based on this selection Order Editor will display the payment method as a dropdown menu (true) or as an input field (false).', '912', '32', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Use prices from Separate Pricing Per Customer?', 'ORDER_EDITOR_USE_SPPC', 'false', 'Leave this set to false unless SPPC is installed.', '912', '33', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Select your credit card payment method', 'ORDER_EDITOR_CREDIT_CARD', 'Credit Card', 'Order Editor will display the credit card fields when this payment method is selected.', '912', '34', now(), now(), NULL, 'tep_cfg_pull_down_payment_methods('); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Save invoices?', 'INV_SAVE', 'true', 'Save all invoices automatically using the invoice no. as file name.', '912', '35', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Storage Directory', 'SAVE_FOLDER', '', 'Enter the directory you want invoices save to. (e.g entry "invoices/" -> folder admin/invoices/)', '912', '36', '', now()); ALTER TABLE orders ADD message Text NULL; ALTER TABLE orders ADD num_invoice int(6) NULL default '0'; ALTER TABLE orders CHANGE orders_date_finished orders_date_finished YEAR(4) NULL DEFAULT NULL; ALTER TABLE orders ADD shipping_module VARCHAR(255) NULL ; ALTER TABLE orders ADD pdf_invoice Text; ALTER TABLE orders_status_history ADD invoice_sent int(1) default '0'; **************************6.2 new_tables.sql**************************for people who has different addons installed, if you run the new_tables.sqland found the error message similar as below 1136 - Column count doesn't match value count at row 1 insert into invoice_orders select * from orders where orders_id = '15' [TEP STOP] what you do is go to the phpMyAdmin, export the table "orders", thenopen the orders.sql file, find the line CREATE TABLE IF NOT EXISTS `orders` ( before that, add: drop table if exists invoice_orders; change orders to invoice_orders, so it become CREATE TABLE IF NOT EXISTS `invoice_orders` ( now copy the line from drop table, create table till you see something like )ENGINE=..., example as below drop table if exists invoice_orders; CREATE TABLE IF NOT EXISTS `invoice_orders` ( ... ... ... ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=24 ; the part you selected and copy is the structure from table "orders" and clone it to invoice_orders.go back to phpMyAdmin, select the right database, paste those code and run SQL, the error should be fixed now.==============================================7.0 Files to modified from German to English==============================================$datum = $dateHilfstabelle = auxiliary tableje = yesnein = no Logo alignmentlinks = left (not links:shifty: LOL)rechts = rightmitte = center Display messageRechnung = billLieferschein = delivery notebeide = boththose are the words in German that could be seen in configuration/invoice editor, which is run by invoice_en.sql / je, nein / involve quite a lot of files, need to check one by one to change them to English. *******************************************************************7.1 admin/includes/languages/english/invoice.php*******************************************************************find code: define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Sum (excl. VAT)'); define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Sum (incl. VAT)'); define('UST_FREI', 'According to §19(1) UStG this invoice is exempt from VAT.'); define('ENTRY_INVOICE_COSTUMER_FON', 'Fon:'); define('TEXT_BANK_BLZ','BLZ:'); define('TEXT_BIC_SWIFT','SWIFT/IBAN'); replace it with:change "VAT" to any tax abbreviation that been used in your own country, eg, "GST" in Australiachange "§19(1) UStG" to any tax office that been used in your own country, eg, "Australia Taxation Office" in Australiachange "Fon:" to "Tel:"change "BLZ" to any business tax abbreviation that been used in your own country, eg, "ABN" in Australia***********************************************************************7.2 admin/includes/languages/english/invoice_pdf.php***********************************************************************find code: define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Sum (excl. VAT)'); define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Sum (incl. VAT)'); define('UST_FREI', 'According to §19(1) UStG this invoice is exempt from VAT.'); define('TEXT_BANK_BLZ','BLZ:'); replace it with:change "VAT" to any tax abbreviation that been used in your own country, eg, "GST" in Australiachange "BLZ" to any business tax abbreviation that been used in your own country, eg, "ABN" in Australia****************************************************************************7.3 admin/includes/languages/english/packingslip_pdf.php****************************************************************************find code: define('TABLE_HEADING_TAX', 'VAT'); define('TABLE_HEADING_PRICE_INCLUDING_TAX_UST', 'Item Preis'); define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Summe (incl.)'); define('UST_FREI', 'This invoice is exempt from VAT according to § 19 (1) UStG.'); define('TABLE_HEADING_TAX', 'VAT'); define('ENTRY_TAX', 'VAT:'); define('TEXT_BANK_BLZ','BLZ: '); replace it with:change "Preis" to "Price"change "Summe" to "Total"change "§19(1) UStG" to any tax office that been used in your own country, eg, "Australia Taxation Office" in Australiachange "BLZ:" to any business tax abbreviation that been used in your own country, eg, "ABN: " in Australia==============================================================8. Missing files in admin/includes/languages/english/ foler?==============================================================Without these files, it seems still working.edit_invoice_add_product.phpedit_invoice_process.phpinvoice_editor.phpinvoice_editor_pdf.phppackingslip_editor.phppackingslip_editor_pdf.php======================9. Extra Information====================== ******************************************************9.1 Value added tax identification number******************************************************http://en.wikipedia.org/wiki/List_of_countries_by_tax_rateshttp://en.wikipedia.org/wiki/VAT_identification_numberhttp://www.kapsch.net/kbc/aboutus/basisofcontract/downloads/Value-20added-20tax-20identification-20number_EN-1***********************9.2 SWIFT/IBAN:***********************http://learn.nab.com.au/what-are-iban-and-swift/Done!!!related forum support for Invoice Editor 1.1 as below list: ================================================= http://www.oscommerce.com/forums/topic/396907-invoice-editor-10/http://www.oscommerce.com/forums/topic/399753-table-edit-instructions-addon-invoice-editor-10-8885/http://www.oscommerce.com/forums/topic/396950-invoice-editor-10-order-editor-v10/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.