Mort-lemur Posted July 2, 2010 Share Posted July 2, 2010 Hi, Has anyone got this to work with the Daily Specials contribution by Jack_MCS?? If so How? Thanks Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
bugnet Posted July 16, 2010 Share Posted July 16, 2010 (edited) Hi there all, I was doing some mods to Order Editor because on my shop some products have their stocks controlled, and others don't, so every product has an 'ignore_qtde' field that defines this on database wich is set on product edit as checkbox (on or off), I am trying to Order editor do not lower stock on this itens when added to an order and to not put back them in stock when deleting from order, but it still happend and I don't know where else to mess, I'm with AJAX activated and done modes on admin/edit_oders.php as follows: around line 190: if ($products_details['qty'] != $order_products['products_quantity']){ $quantity_difference = ($products_details['qty'] - $order_products['products_quantity']); if (STOCK_LIMITED == 'true'){ $productstock_query = tep_db_query("SELECT ignore_qtde FROM ". TABLE_PRODUCTS . " WHERE products_id = '" . (int)$orders_products_id . "'"); $productstock = tep_db_fetch_array($productstock_query); if($productstock['ignore_qtde'] != 'on') { tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity - " . $quantity_difference . ", products_ordered = products_ordered + " . $quantity_difference . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } } else { tep_db_query ("UPDATE " . TABLE_PRODUCTS . " SET products_ordered = products_ordered + " . $quantity_difference . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } } and around line 220 (about deleting product from an order): if (STOCK_LIMITED == 'true'){ $productstock_query = tep_db_query("SELECT ignore_qtde FROM ". TABLE_PRODUCTS . " WHERE products_id = '" . (int)$orders_products_id . "'"); $productstock = tep_db_fetch_array($productstock_query); if($productstock['ignore_qtde'] != 'on') { tep_db_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity = products_quantity + " . $products_details["qty"] . ", products_ordered = products_ordered - " . $products_details["qty"] . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } } else { tep_db_query ("UPDATE " . TABLE_PRODUCTS . " SET products_ordered = products_ordered - " . $products_details["qty"] . " WHERE products_id = '" . (int)$order_products['products_id'] . "'"); } but it still backing products where ignore_qtde is 'on' (checkbox on products edit page), any lights on this ? it happends when I delete a product on order editor, code seens to be correct. thanks, David Edited July 16, 2010 by bugnet Quote Link to comment Share on other sites More sharing options...
matc Posted July 16, 2010 Share Posted July 16, 2010 Hi all. Would appreciate any help with this. I've installed all new files, edited existing files and run the db query. Everything is installed, yet when I click to edit an order, it gives a 500 internal server error. I'm no expert at these things, but have installed loads of different contributions with no problems. I've gone back and checked what I have edited against what is in the download but still can't see anything wrong. My admin is secured by ssl (the customer pages) so I disabled this to check if this was an issue to no joy - can anyone think what might be wrong that has given this error message ? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Mort-lemur Posted July 16, 2010 Share Posted July 16, 2010 Hi all. Would appreciate any help with this. I've installed all new files, edited existing files and run the db query. Everything is installed, yet when I click to edit an order, it gives a 500 internal server error. I'm no expert at these things, but have installed loads of different contributions with no problems. I've gone back and checked what I have edited against what is in the download but still can't see anything wrong. My admin is secured by ssl (the customer pages) so I disabled this to check if this was an issue to no joy - can anyone think what might be wrong that has given this error message ? Thanks in advance Whats the exact wording of the error? Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
RusNN Posted July 20, 2010 Share Posted July 20, 2010 Hi there all, I was doing some mods to Order Editor because on my shop some products have their stocks controlled, and others don't, so every product has an 'ignore_qtde' field that defines this on database wich is set on product edit as checkbox (on or off), I am trying to Order editor do not lower stock on this itens when added to an order and to not put back them in stock when deleting from order, but it still happend and I don't know where else to mess, I'm with AJAX activated and done modes on admin/edit_oders.php as follows: around line 190: .............. but it still backing products where ignore_qtde is 'on' (checkbox on products edit page), any lights on this ? it happends when I delete a product on order editor, code seens to be correct. thanks, David Nice idea (the idea only)! This is a solution that I'm looking for! Thank you. About your issue. It need to see carefully. But I have only one question: do you have your setting STOCK_LIMITED set to true or not? If you use AJAX module you should modify edit_order_ajax.php also. In this file you found exactly the same code as in edit_order.php. Quote Link to comment Share on other sites More sharing options...
RusNN Posted July 20, 2010 Share Posted July 20, 2010 Hi, Has anyone got this to work with the Daily Specials contribution by Jack_MCS?? If so How? Thanks I'am working for this now. Hope the results are coming soon. Quote Link to comment Share on other sites More sharing options...
axioma Posted August 5, 2010 Share Posted August 5, 2010 (edited) Hi there, I get these warnings when I add a product to an order. And I cant seem to delete an item without adding a new one. Can you help? Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/hasaudio/public_html/admin/edit_orders.php on line 569 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/hasaudio/public_html/admin/edit_orders.php on line 569 Warning: Cannot modify header information - headers already sent by (output started at /home/hasaudio/public_html/admin/edit_orders.php:569) in /home/hasaudio/public_html/admin/includes/functions/general.php on line 22 that is a problem with arrays on new php 5.1 and upper... look for edit_orders.php on line 569 (do the same on edit_orders_ajax.php) //save ot_skippy from certain annihilation if ( (!in_array($ot_class, $written_ot_totals_array)) && (!in_array($ot_title, $written_ot_titles_array)) && (tep_not_null($ot_value)) && (tep_not_null($ot_title)) && ($ot_class != 'ot_tax') && ($ot_class != 'ot_loworderfee') ) { //7 //this is supposed to catch the oddball components that don't show up in $order_totals change by //save ot_skippy from certain annihilation if ( (!in_array((array)$ot_class, (array)$written_ot_totals_array)) && (!in_array((array)$ot_title, (array)$written_ot_titles_array)) && (tep_not_null($ot_value)) && (tep_not_null($ot_title)) && ($ot_class != 'ot_tax') && ($ot_class != 'ot_loworderfee') ) { //7 //this is supposed to catch the oddball components that don't show up in $order_totals check it let me know if works Edited August 5, 2010 by axioma Quote Link to comment Share on other sites More sharing options...
davistai Posted August 9, 2010 Share Posted August 9, 2010 This is really great Add-on, Thanks. We installed this one but we also need "Category Tree Quantity and Value Breaks Discount(ot_cat_qvb_discount)" install and use it in our site! So when edit and update the order its get wrong blank page?! When disable ot_cat_qvb_discount.php in order_total and then the edit order and update is worked and everything fine, Does any help or fix can help us to make "ot_cat_qvb_discount" work with "Edit order" ? Please help us! Please help us! Please help us! Thanks! Quote Link to comment Share on other sites More sharing options...
minghoo Posted August 13, 2010 Share Posted August 13, 2010 for those who have this problem: Fatal error: Call to undefined function tep_add_base_ref() in C:\wamp\www\admin\edit_orders_ajax.php on line 1144 add below code to admin/include/function/general.php before closing tag ?> function tep_add_base_ref($string) { $i = 0; $output = ''; $n=strlen($string); for ($i=0; $i<$n; $i++) { $char = substr($string, $i, 1); $char5 = substr($string, $i, 5); if ($char5 == 'src="' ) {$output .= 'src="' . HTTP_SERVER; $i = $i+4;} else { $output .= $char; } } return $output; } sean Quote My contributions: EZ new fields easy way add Qty box in your product_info.php Link to comment Share on other sites More sharing options...
multimixer Posted August 22, 2010 Share Posted August 22, 2010 (edited) Hi all If you have option types v2 installed and want to have the ability to set options to be calculated per unit or per item, also via the order editor, then here is the solution, posted in the option types v2 forum It works fine with Order editor version by surfalot (18.11.09), I don't know about the other versions And a question in file admin/order_editor/javascript.php and line about 703 we see if ((action != 'qty') && (action != 'price_incl')) { document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 4); } This says that the final price should not be updated when quantity changes. For the needs of my modification I changed that to if (action != 'price_incl') { // The (action != 'qty') condition taken out, so reaktion ok on qty changes document.getElementById("update_products[" + pid + "][price_incl]").value = doFormat(priceInclValue, 10); } Was there any particular reason, not to let the price(incl) change on quantity changes? Edited August 22, 2010 by multimixer Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
dakota259 Posted August 23, 2010 Share Posted August 23, 2010 Hi, when I click on "new order email" I get the following error: 1146 - Table 'spares.eorder_text' doesn't exist SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '4' [TEP STOP] Can somebody help me? Thx Quote Link to comment Share on other sites More sharing options...
feversam Posted September 3, 2010 Share Posted September 3, 2010 Can I change Send HTML Email contribution with Ultimate HTML Email contribution? If yes, how do I intergrate with this Order Editor? thanks Quote Link to comment Share on other sites More sharing options...
Collines Posted September 7, 2010 Share Posted September 7, 2010 Version 5.0.9 Custom order totals aren't getting updated, is there any way to fix this? The order totals are added by other add-ons (custom low order fees, or points and rewards; for example) Classes Affected ot_redemptions ot_residential For now, I've put a band-aid on edit_orders.php to rename both class fields to ot_custom* and this alleviates the conflict, but I'd love a more usable solution, as this is going to prove cumbersome when I add other order total addons in the future. For reference, here is the band-aid fix: At the top of admin/edit_orders.php: tep_db_query("UPDATE " . TABLE_ORDERS_TOTAL . " SET class = 'ot_custom9' WHERE orders_id = '" . $_GET['oID'] . "' && class ='ot_residential'"); tep_db_query("UPDATE " . TABLE_ORDERS_TOTAL . " SET class = 'ot_custom8' WHERE orders_id = '" . $_GET['oID'] . "' && class ='ot_redemptions'"); Has anyone been able to make custom order totals like ot_redemptions, ot_gv and ot_coupon work with edit_orders? The above solution seems to be in the right direction but for me it is adding the amount of the custom order total instead of deducting it. As a temporary fix, does anyone know how to make ot_custom be deducted instead of added? Quote Link to comment Share on other sites More sharing options...
RusNN Posted September 8, 2010 Share Posted September 8, 2010 There is no way to deduct ot_custom. Just because they are work as a hack. We may try to use solution by spectral quoted above, but there is a straight way to conflicts if we have many order totals and a lot of ot_custom or want our coupons and vouchers be applied on exactly sequence. There is possible to make some order totals work correct with deducted amount as they usually work in client side. For some it is very simple, eg. ot_easy_discount. I do that. But ot_gv and ot_coupon are interesting. I think it is possible to deduct amount for coupons which are already be applied by the customer himself, but I see no way to add a coupon in Order Editor by admin, yet. More interesting with ot_gv: * should we reduce customer's balance if voucher be applied or * should we take into account only the amount which customer applied himself or * should we reduce customer's balance only for a sum which customer want to be reduced or * too many questions, which must be answered differently in each case. But nothing possible. I have no spare time yet to think how to make this ot_coupon and ot_gv to work with OE. I don't know about ot_redemptions. Is it from Reward Point System? Quote Link to comment Share on other sites More sharing options...
Collines Posted September 8, 2010 Share Posted September 8, 2010 Yes ot_redemptions is from the points and rewards system. Quote Link to comment Share on other sites More sharing options...
RusNN Posted September 8, 2010 Share Posted September 8, 2010 I have never test Reward Points, but I need it in short time. And of cource I need a tool that can work with ot_gv, ot_coupon nad ot_redemptions by deducting amount. If I do some for Order Editor I'll probably post it here. But how soon it will be I can't say yet. Quote Link to comment Share on other sites More sharing options...
axioma Posted September 23, 2010 Share Posted September 23, 2010 When you add a product, order editor let you add a greater amount of products than you have on stock… Creating negative values on your stock For example: -3 units of MATROX 200 4MB Does any one fix this?. I tried this but does seem to work: In edit_orders_add_product.php: Find around line 370: $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options_name['products_options_name'] . ' - ' . $products_options['products_options_values_name']); Replace with: //BOF check quantity of attrtibutes QT PRO $stock_quantity_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_id = '" . (int)$add_product_products_id . "' and products_stock_attributes = '" . $products_options_name['products_options_id'] . "-" . $products_options['products_options_values_id'] . "'"); $stock_quantity = tep_db_fetch_array($stock_quantity_query); if ($stock_quantity['products_stock_quantity'] > '0') { //if QT Pro quantity is greater than 0 $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options_name['products_options_name'] . ' - ' . $products_options['products_options_values_name'] . ' (' . $stock_quantity['products_stock_quantity'] . ')'); } //EOF Check quantity of attributes QT Pro Quote Link to comment Share on other sites More sharing options...
sukumart Posted September 24, 2010 Share Posted September 24, 2010 I just recently installed the Order editor 5.0.9c package. When I edit order, able to delete the orders. When I click to add new products, new pop up comes and I am able to select the product and add to order. Then the main order edit page refreshes but goes to login page. After that new items I am adding doesnt add to the order. So ineffect only one line item I am able to add every time. Is there a way to correct. I am getting incorrect order total as after the firat item added thro order editor, additional items are not counted by the sub total but shows in the order. Thanks Quote Link to comment Share on other sites More sharing options...
sukumart Posted September 24, 2010 Share Posted September 24, 2010 I just recently installed the Order editor 5.0.9c package. When I edit order, able to delete the orders. When I click to add new products, new pop up comes and I am able to select the product and add to order. Then the main order edit page refreshes but goes to login page. After that new items I am adding doesnt add to the order. So ineffect only one line item I am able to add every time. Is there a way to correct. I am getting incorrect order total as after the firat item added thro order editor, additional items are not counted by the sub total but shows in the order. Thanks I am getting below response when i login again after the first items is added to order thro order editor " You have not selected an order to edit, or the order ID variable has not been set. " Quote Link to comment Share on other sites More sharing options...
SSN Posted September 30, 2010 Share Posted September 30, 2010 I am getting below response when i login again after the first items is added to order thro order editor " You have not selected an order to edit, or the order ID variable has not been set. " I installed 5.0.7 after I couldnt solve the problem. Same error continues as after first item is added to cart, the order edit pages goes to login as says error as I have mentioned above. I continue to add additional items to the cart which is seen in the order but the sub total doesnt add it. I login and go the order and edit. I get now a new dispay by default. "Please check on updare to save all changes" I click update and all items are added to sub total. I need to now solve the issue of the order edit page refreshes anc comes back to the same page and adds additional items with proper subtotal w/o me going in to this cumbersome process of updating the order. Quote Link to comment Share on other sites More sharing options...
RusNN Posted September 30, 2010 Share Posted September 30, 2010 I installed 5.0.7 after I couldnt solve the problem. Same error continues as after first item is added to cart, the order edit pages goes to login as says error as I have mentioned above. Which browser are you using? Did you try to off the AJAX of Order Editor. If yes, do still have the problem after adding product? Quote Link to comment Share on other sites More sharing options...
RusNN Posted September 30, 2010 Share Posted September 30, 2010 When you add a product, order editor let you add a greater amount of products than you have on stock… Nothing problemI think it is a great feature to use it like a preorder when you get orders with products that actually comes later. I don't understand the problem. Do you use QT Pro? If yes, the stock of your product will calculated right way, but the stock of attributes may down below zero. Do you have my fixes for QT Pro for version 5.0.7? Quote Link to comment Share on other sites More sharing options...
axioma Posted September 30, 2010 Share Posted September 30, 2010 Yes i tested.. exist a bug that send you to login page. i recreate the process. 1. open your browser (crome, firefox) 2. create new order (manual order) 3. add a product that has qtpro feature. (no bug when you add product without attributes) 4. you are redirected to log in page. 5. after you log in again, you can add more products without problem. Quote Link to comment Share on other sites More sharing options...
RusNN Posted September 30, 2010 Share Posted September 30, 2010 Yes i tested.. exist a bug that send you to login page. Clear. Thanks. Never test OE in browsers except InternetExplorer. My own shop works excelent with attributes and QT Pro. As far as I remember basic QT Pro functionality exists before I rework some code to improve work with attributes. So, I try to test it in Chrome. Unfortunatelly I test on copy of working shop. My current OE has some modification from contributed versions. I can't promise that I've done it quickly and fix be applicable to general OE. Quote Link to comment Share on other sites More sharing options...
SSN Posted October 1, 2010 Share Posted October 1, 2010 Which browser are you using? Did you try to off the AJAX of Order Editor. If yes, do still have the problem after adding product? I have my AJAX off and no QT pro installed. 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.
Note: Your post will require moderator approval before it will be visible.