koopmanh Posted June 26, 2007 Share Posted June 26, 2007 (edited) Dear DJ Monkey, First of all I want to complement you with this great contrib with AJAX support. It works great!, However our shop has quite a number of products that are not easy to find based on name or productnumber. The best way for us is to start using a barcode scanner. Therefore I modified the products table and added a row products.barcode. Now I want to include in the search function searching within this field. Can you advise me where and which changes I should make? thxs in advance Hans Edited June 26, 2007 by koopmanh Quote Link to comment Share on other sites More sharing options...
Recidivist Posted June 26, 2007 Share Posted June 26, 2007 For the sort order issue, try this: This should prevent this problem from occurring on any orders that have not previously been edited with Order Editor. For the orders that have already been edited and have the wrong sort order, you will have to manually change the sort order in the database.[/quote] Hi DJMonkey, Going back to post 2003, does removing [code]$sort_order++; simply prevent the order editor from altering existing sort orders? I have removed it in mine as you suggest and still see the problem of sort order changing (seemingly randomly) whenever I edit an order. KB Quote Network Webcams - The IP Camera Specialists Link to comment Share on other sites More sharing options...
esearing Posted June 26, 2007 Share Posted June 26, 2007 Nice mod! This will definitely help my clients mange their orders. I have one wee problem. I use the products_discounts contrib which adds fields to my orders_products table that contains discounts. How can I adjust the product_price by the amount of the discount? Better yet can I use the discount logic to calculate new product prices as they are added? Or if then logic to compare the discounted price to the products_price and use the lower of the two. my subtotal initially displays the discounted price but as soon as I update the tax or shipping amounts it jumps to the full price. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 26, 2007 Share Posted June 26, 2007 Dear DJ Monkey, First of all I want to complement you with this great contrib with AJAX support. It works great!, However our shop has quite a number of products that are not easy to find based on name or productnumber. The best way for us is to start using a barcode scanner. Therefore I modified the products table and added a row products.barcode. Now I want to include in the search function searching within this field. Can you advise me where and which changes I should make? thxs in advance Hans I'm assuming you meant "products_barcode"; if not you will have to change the suggested code appropriately. In admin/search_suggest.php find $sql = "select pd.products_name, p.products_model, p.products_quantity, p.products_id FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS . " p ON pd.products_id = p.products_id WHERE p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "' AND (pd.products_name LIKE '%" . tep_db_input($_GET['search']) . "%' OR p.products_model LIKE '%" . tep_db_input($_GET['search']) . "%') LIMIT 25"; and change it to $sql = "select pd.products_name, p.products_model, p.products_quantity, p.products_barcode, p.products_id FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS . " p ON pd.products_id = p.products_id WHERE p.products_id = pd.products_id AND pd.language_id = '" . (int)$languages_id . "' AND (pd.products_name LIKE '%" . tep_db_input($_GET['search']) . "%' OR p.products_model LIKE '%" . tep_db_input($_GET['search']) . "%' OR p.products_barcode LIKE '%" . tep_db_input($_GET['search']) . "%') LIMIT 25"; Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 26, 2007 Share Posted June 26, 2007 Hi DJMonkey, Going back to post 2003, does removing $sort_order++; simply prevent the order editor from altering existing sort orders? I have removed it in mine as you suggest and still see the problem of sort order changing (seemingly randomly) whenever I edit an order. KB I'm not sure what would happen if you deleted each instance of $sort_order++;. There were two steps in my instructions: in the first step the first instance of $sort_order++; was deleted; in the second step the second instance of $sort_order++; was moved. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 26, 2007 Share Posted June 26, 2007 Nice mod! This will definitely help my clients mange their orders. I have one wee problem. I use the products_discounts contrib which adds fields to my orders_products table that contains discounts. How can I adjust the product_price by the amount of the discount? Better yet can I use the discount logic to calculate new product prices as they are added? Or if then logic to compare the discounted price to the products_price and use the lower of the two. my subtotal initially displays the discounted price but as soon as I update the tax or shipping amounts it jumps to the full price. You would have to modify Order Editor to show the discount field for each product and also take the discount amount into account when figuring out the totals. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
jan64 Posted June 27, 2007 Share Posted June 27, 2007 hello. i have installed order_editor_3_0_2_1. great simpel contri! but "New order confirmation" doesn't work. i'm no programmer so has anybody an idea? thanx Jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 28, 2007 Share Posted June 28, 2007 hello. i have installed order_editor_3_0_2_1. great simpel contri! but "New order confirmation" doesn't work. i'm no programmer so has anybody an idea? thanx Jan You check the box and hit "update" but the email never arrives? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
jan64 Posted June 28, 2007 Share Posted June 28, 2007 Yes thats the problem. he says that the mail was send but nothing arrives. in the original situation was it no problem. Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 28, 2007 Share Posted June 28, 2007 Yes thats the problem.he says that the mail was send but nothing arrives. in the original situation was it no problem. Check to make sure that the email address is valid. Check with your webhost to make sure there isn't some problem with the server. I've had problems when testing the script with delays of up to 1 day before receiving the emails (my webhost can be slow). Order Editor uses the native osC function tep_mail() to generate the email. If you have modified this function it is possible that the data is not being sent properly to the function. Check to see if comments and status updates can be sent (these are done in a separate email). Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
jan64 Posted June 28, 2007 Share Posted June 28, 2007 all the mail functions from the order editor are not working. where can i find the code? and can you tell me where i must edit the code? Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 29, 2007 Share Posted June 29, 2007 all the mail functions from the order editor are not working.where can i find the code? Check in admin/includes/functions/general.php for the function tep_mail. It should look something like this: function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce')); // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == 'true') { $message->add_html($email_text, $text); } else { $message->add_text($text); } // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
craxx Posted June 29, 2007 Share Posted June 29, 2007 Hy DJMonkey, is there a fix at the moment for QTpro? king regards Craxx;) Quote Link to comment Share on other sites More sharing options...
jan64 Posted June 29, 2007 Share Posted June 29, 2007 Hi DjM. the code you give is the same in my general.php. i must add you pice of code in general.php. is it possible that i must place it somewhere else in the file. in the install instructions is not told where you must place the code in general.php. regads, jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
jan64 Posted June 29, 2007 Share Posted June 29, 2007 Hi DjM. the code you give is the same in my general.php. i must add you pice of code in general.php. is it possible that i must place it somewhere else in the file. in the install instructions is not told where you must place the code in general.php. regads, jan is it possible that the problem is in this piece of code from \admin\edit_orders.php // 1.2 UPDATE STATUS HISTORY & SEND EMAIL TO CUSTOMER IF NECESSARY ##### $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'] != $_POST['status']) || (tep_not_null($_POST['comments']))) { tep_db_query("UPDATE " . TABLE_ORDERS . " SET orders_status = '" . tep_db_input($_POST['status']) . "', last_modified = now() WHERE orders_id = '" . (int)$oID . "'"); // Notify Customer ? $customer_notified = '0'; if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) { $notify_comments = ''; if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $_POST['comments']) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . (int)$oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE2); 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 ('" . tep_db_input($_GET['oID']) . "', '" . tep_db_input($_POST['status']) . "', now(), " . tep_db_input($customer_notified) . ", '" . tep_db_input($_POST['comments']) . "')"); } ////END Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
jan64 Posted June 29, 2007 Share Posted June 29, 2007 Hi djmonkey. i have looked in the general.php and they had add the code at bottom of the file. i had it somewhere in the middle. i placed at the bottom and now it's working :blink: with my php newbie knowledge is this not logical, i think ................ but it works. thanks for your help on this subject. have you seen my other problem about the "Manual Order Maker 1.4.1" -go to subject- the create button gives an empty page. nobody has solution, not in holland, and on the international forum. regards, jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 29, 2007 Share Posted June 29, 2007 Hy DJMonkey,is there a fix at the moment for QTpro? king regards Craxx;) Someone posted a patch for QtPro a while back: http://www.oscommerce.com/forums/index.php?s=&...st&p=900964 It's based on an older version of Order Editor but it should at least point you in the right direction. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 29, 2007 Share Posted June 29, 2007 (edited) Hi djmonkey. i have looked in the general.php and they had add the code at bottom of the file. i had it somewhere in the middle. i placed at the bottom and now it's working :blink: with my php newbie knowledge is this not logical, i think ................ but it works. thanks for your help on this subject. have you seen my other problem about the "Manual Order Maker 1.4.1" -go to subject- the create button gives an empty page. nobody has solution, not in holland, and on the international forum. regards, jan Have you tried a different manual order entry contribution such as Step-By-Step Manual Order Entry Manual Order Entry Attitude Simple Manual Order Entry MOECTOE Suite Public Beta Edited June 29, 2007 by djmonkey1 Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
jan64 Posted June 29, 2007 Share Posted June 29, 2007 No not yet, are that better contri's? Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 29, 2007 Share Posted June 29, 2007 No not yet, are that better contri's? I have no idea, I have never used any of them. Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
jan64 Posted June 29, 2007 Share Posted June 29, 2007 Ok thanx for your input. regards, jan Quote Dreams can come true, if you help them a littlebit Link to comment Share on other sites More sharing options...
yofresh Posted June 29, 2007 Share Posted June 29, 2007 I have a very special problem i havent read about in this forum yet. When trying to add a product i get the following error: CGIWrap Error: Execution of this script not permitted Script is not a regular file Somehow this error seems to belong to search_suggest.php Does anybody know how to help? Regards, Ralf Quote Link to comment Share on other sites More sharing options...
analli Posted June 30, 2007 Share Posted June 30, 2007 On a transaction yesterday I had some very unusual problems in my order editor. I'm also using KGT's Discount Coupon Codes contribution. When I look at the transaction details all the numbers are correct but when I went into the editor the discount was applied AFTER the tax rather than before the tax, therefore the tax amounts and total were different. The checkout process calculated everything correctly (subtotal - discount + tax = total). It was only in the editor that the numbers were skewed. Any ideas? Anthony Quote Link to comment Share on other sites More sharing options...
craxx Posted June 30, 2007 Share Posted June 30, 2007 (edited) Someone posted a patch for QtPro a while back:http://www.oscommerce.com/forums/index.php?s=&...st&p=900964 It's based on an older version of Order Editor but it should at least point you in the right direction. Hy DJMonkey, thanks a lot for your support, now i read this and tried with Ordereditor 3.0.2.1 (need some changes to do that with diff tool). But what a pitty it doesn´t work. What do you think, is it better to downgrade order Editro to 2.5 (2.51) or could you help for modifications, to work with 3.021? king regards Craxx;) Edited June 30, 2007 by craxx Quote Link to comment Share on other sites More sharing options...
craxx Posted June 30, 2007 Share Posted June 30, 2007 Hy DJMonkey, with Orderedito 2.51 it doesn´t work !!! Please, help. I need qtpro and an Ordereditor. Did anybody know a contrib that works? king regards Craxx;) 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.