Irin Posted April 29, 2006 Share Posted April 29, 2006 Is this on initially opening the file, or is it after you edit something and the JavaScript recalculates everything? It's on initial opening. I don't even change anything. All orders miss that values. Weird. Thanks, Irin. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted April 29, 2006 Share Posted April 29, 2006 It's on initial opening. I don't even change anything. All orders miss that values. Weird. Thanks, Irin. One possible explanation is that's what is entered in the database for those values- check your orders_total table to be sure. Have you tried typing in one of the products price or qty box to see if the JavaScript calculator will figure out the correct price? How about hitting the update button? 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...
Irin Posted April 29, 2006 Share Posted April 29, 2006 (edited) One possible explanation is that's what is entered in the database for those values- check your orders_total table to be sure. Have you tried typing in one of the products price or qty box to see if the JavaScript calculator will figure out the correct price? How about hitting the update button? If I change qty, the JavaScript change the Total price and the Weight but values in Section 4 are still 0.00. Now, when I hit Update the values are still 0.00 but all titles in Section 4 double up in both edit_orders.php and orders.php. Here is what I have in admin/orders.php after I hit Update in edit_orders.php: Subtotal: $224.00 Subtotal: $0.00 Honorario De Direcci?n: $0.00 United States Postal Service (1 x 1.2lbs) (Global Express Mail (EMS) (3 - 5 Days)): $0.00 Honorario De Direcci?n: $5.00 Seguro Del Env?o: $0.00 United States Postal Service (1 x 1.2lbs) (Global Express Mail (EMS) (3 - 5 Days)): $35.55 Total: $0.00 Seguro Del Env?o: $4.20 Total: $268.75 And in edit_orders.php for the same order: Subtotal: 0.00Subtotal: 0.00 Honorario De Direcci?n: 0.00 United States Postal Service (1 x 1.2lbs) (Global Express Mail (EMS) (3 - 5 Days)): 0.00 Honorario De Direcci?n: 0.00 Seguro Del Env?o: 0.00 United States Postal Service (1 x 1.2lbs) (Global Express Mail (EMS) (3 - 5 Days)): 0.00 Total: 0.00 Seguro Del Env?o: 0.00 Total: 0.00 In the database in orders_total table for the same order, I have all values listed right and then they all listed again with all 0.00 just like it appears on orders.php. That's very weird. What can be wrong with the calculations? Thanks, Irin. Edited April 29, 2006 by Irin Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted April 29, 2006 Share Posted April 29, 2006 If I change qty, the JavaScript change the Total price and the Weight but values in Section 4 are still 0.00. Now, when I hit Update the values are still 0.00 but all titles in Section 4 double up in both edit_orders.php and orders.php. Here is what I have in admin/orders.php after I hit Update in edit_orders.php: And in edit_orders.php for the same order: In the database in orders_total table for the same order, I have all values listed right and then they all listed again with all 0.00 just like it appears on orders.php. That's very weird. What can be wrong with the calculations? Thanks, Irin. Can you show me what's in the database for an order before you do anything with Order Editor? Also, what happens for an order when you hit the update button more than once? Do the fields keep repeating? 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 April 29, 2006 Share Posted April 29, 2006 If I change qty, the JavaScript change the Total price and the Weight but values in Section 4 are still 0.00. Now, when I hit Update the values are still 0.00 but all titles in Section 4 double up in both edit_orders.php and orders.php. Here is what I have in admin/orders.php after I hit Update in edit_orders.php: And in edit_orders.php for the same order: In the database in orders_total table for the same order, I have all values listed right and then they all listed again with all 0.00 just like it appears on orders.php. That's very weird. What can be wrong with the calculations? Thanks, Irin. Find if($ot_total_id > 0) { // Already in database --> Update $Query = "UPDATE " . TABLE_ORDERS_TOTAL . " SET title = '" . $ot_title . "', text = '" . $ot_text . "', value = '" . $ot_value . "', sort_order = '" . $sort_order . "' WHERE orders_total_id = '". $ot_total_id . "'"; tep_db_query($Query); and change it to if($ot_total_id > 0) { // Already in database --> Update $Query = "UPDATE " . TABLE_ORDERS_TOTAL . " SET title = '" . $ot_title . "', text = '" . $ot_text . "', value = '" . $ot_value . "', sort_order = '" . $sort_order . "' WHERE orders_total_id = '". $ot_total_id . "' AND orders_id = '" . $oID . "'"; tep_db_query($Query); then find "<input name='" . $TotalDetails["Name"] . "' size='10' value='" . number_format($TotalDetails["Price"], '2', '.', '') . "' id='" . $id . "' readonly='readonly' />" . and change it to "<input name='" . $TotalDetails["Name"] . "' size='10' value='" . $TotalDetails["Price"] . "' id='" . $id . "' readonly='readonly' />" . These are both minor things that I've noticed while looking through the code trying to figure out what might be causing your problem. I think the issue may be with } else { // New Insert (ie ot_custom) $Query = "INSERT INTO " . TABLE_ORDERS_TOTAL . " SET orders_id = '" . $oID . "', title = '" . $ot_title . "', text = '" . $ot_text . "', value = '" . $ot_value . "', class = '" . $ot_class . "', sort_order = '" . $sort_order . "'"; tep_db_query($Query); } as you're actually seeing new fields being created, but I'd like to see what's in your orders_total table to try to understand how. 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 April 29, 2006 Share Posted April 29, 2006 If I change qty, the JavaScript change the Total price and the Weight but values in Section 4 are still 0.00. Now, when I hit Update the values are still 0.00 but all titles in Section 4 double up in both edit_orders.php and orders.php. Here is what I have in admin/orders.php after I hit Update in edit_orders.php: And in edit_orders.php for the same order: In the database in orders_total table for the same order, I have all values listed right and then they all listed again with all 0.00 just like it appears on orders.php. That's very weird. What can be wrong with the calculations? Thanks, Irin. Irin- While working on a fork for MVS, I saw this exact problem while using an unmodified admin/includes/classes/order.php. Go through that file with a fine tooth comb and make sure you have made all the changes (there are differences from previous version). Good luck Stew 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...
Irin Posted April 30, 2006 Share Posted April 30, 2006 Irin- While working on a fork for MVS, I saw this exact problem while using an unmodified admin/includes/classes/order.php. Go through that file with a fine tooth comb and make sure you have made all the changes (there are differences from previous version). Good luck Stew Thanks for all your help, Stew. I found what caused the problem. I keep telling myself that I need to be more careful when applying modifications to not miss anything. Although, it's all fixed now or almost all, except for JavaScript on the fly. When I change the qty, Total is calculated correctly but from Total in Section 4 $5 are missing somehow. Instead of $336.06 it shows $331.06. When I click Update, the Total is updated right, $336.06. All I can think of is that probably my Handling Fee which is $5 are not added to the Total on the fly. Is that the issue? Thanks, Irin. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted April 30, 2006 Share Posted April 30, 2006 Thanks for all your help, Stew. I found what caused the problem. I keep telling myself that I need to be more careful when applying modifications to not miss anything. Although, it's all fixed now or almost all, except for JavaScript on the fly. When I change the qty, Total is calculated correctly but from Total in Section 4 $5 are missing somehow. Instead of $336.06 it shows $331.06. When I click Update, the Total is updated right, $336.06. All I can think of is that probably my Handling Fee which is $5 are not added to the Total on the fly. Is that the issue? Thanks, Irin. Yes. If you can tell me what the class of the order total component is (something like ot_handling), I can tell you how to adjust the JavaScript to recognize it. You can find the class of each order total component stored in the orders_total table. 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...
Irin Posted April 30, 2006 Share Posted April 30, 2006 Yes. If you can tell me what the class of the order total component is (something like ot_handling), I can tell you how to adjust the JavaScript to recognize it. You can find the class of each order total component stored in the orders_total table. I have ot_handlingfee for Handling Fee, ot_insurance for Shipping Insurance and all others that are already in the script. I appreciate your help. Thanks, Irin. Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted April 30, 2006 Share Posted April 30, 2006 Must say that this seems to be a great contribution. Just installed it, the on-the-fly calculations is outstanding. Stock update that works with QTPro's attributes seems to be my only issue. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted April 30, 2006 Share Posted April 30, 2006 I have ot_handlingfee for Handling Fee, ot_insurance for Shipping Insurance and all others that are already in the script. I appreciate your help. Thanks, Irin. Find if (action =='total'){ //I cheat here- the grand total always includes the value of the various totals including tax of //each item, regardless of individual shop settings. So I take the various Total incls, all the //ot_customs, ot_loworderfees, and any ot_shipping value, and voila if ((pid == 'ot_custom') || (pid == defaultTaxName + 'ot_shipping') || (pid == 'p-total_incl') || (pid == 'ot_loworderfee')) { sum += Number(el[i].value); } and change it to if (action =='total'){ //I cheat here- the grand total always includes the value of the various totals including tax of //each item, regardless of individual shop settings. So I take the various Total incls, all the //ot_customs, ot_loworderfees, and any ot_shipping value, and voila if ( (pid == 'ot_custom') || (pid == defaultTaxName + 'ot_shipping') || (pid == 'p-total_incl') || (pid == 'ot_loworderfee') || (pid == 'ot_handlingfee') || (pid == 'ot_insurance') ) { sum += Number(el[i].value); } and you should be set. 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...
Irin Posted April 30, 2006 Share Posted April 30, 2006 Find if (action =='total'){ //I cheat here- the grand total always includes the value of the various totals including tax of //each item, regardless of individual shop settings. So I take the various Total incls, all the //ot_customs, ot_loworderfees, and any ot_shipping value, and voila if ((pid == 'ot_custom') || (pid == defaultTaxName + 'ot_shipping') || (pid == 'p-total_incl') || (pid == 'ot_loworderfee')) { sum += Number(el[i].value); } and change it to if (action =='total'){ //I cheat here- the grand total always includes the value of the various totals including tax of //each item, regardless of individual shop settings. So I take the various Total incls, all the //ot_customs, ot_loworderfees, and any ot_shipping value, and voila if ( (pid == 'ot_custom') || (pid == defaultTaxName + 'ot_shipping') || (pid == 'p-total_incl') || (pid == 'ot_loworderfee') || (pid == 'ot_handlingfee') || (pid == 'ot_insurance') ) { sum += Number(el[i].value); } and you should be set. Thanks Stew. Perfect now. :thumbsup: Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted May 1, 2006 Share Posted May 1, 2006 I installed version 2.2.1 about 1 month ago, are there any changes in the installation of 2.5 or I can just overwirte admin/edit_orders.php and that's it? TIA. Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
djmonkey1 Posted May 1, 2006 Share Posted May 1, 2006 I installed version 2.2.1 about 1 month ago, are there any changes in the installation of 2.5 or I can just overwirte admin/edit_orders.php and that's it? TIA. You would have to upload the new admin/edit_orders.php, admin/includes/javascript/overlib_mini.js, the language file admin/includes/languages/*/edit_orders.php, then update admin/includes/classes/order.php and admin/includes/functions/general.php. 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 May 1, 2006 Share Posted May 1, 2006 I installed version 2.2.1 about 1 month ago, are there any changes in the installation of 2.5 or I can just overwirte admin/edit_orders.php and that's it? TIA. There is also a database change that was introduced in v2.3. Best thing to do would be to use a file comparison tool such as Beyond Compare on the install instructions to find the differences between 2.2.1 and 2.5. 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...
dr_lucas Posted May 1, 2006 Share Posted May 1, 2006 Alright mate, will try that, thanks Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
jcorreia Posted May 2, 2006 Share Posted May 2, 2006 Hi, it seems that when we change the tax and hit update it looses the tax value entered. Is it only me or is this a bug ? Thanks :rolleyes: Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted May 2, 2006 Share Posted May 2, 2006 Hi, it seems that when we change the tax and hit update it looses the tax value entered.Is it only me or is this a bug ? Thanks :rolleyes: I haven't seen or heard of this. Are you talking about shipping tax or products tax? Is register_globals on or off on your server? 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...
jcorreia Posted May 3, 2006 Share Posted May 3, 2006 Thanks. I?m talking about product tax. I have by default vat at 21%, if I change it to 15% or anything else and hit update the tax is not saved. I have register globals off, but in my .htaccess I have the option 'php_value register_globals 1', so I guess it?s turned on for oscommerce. Quote Link to comment Share on other sites More sharing options...
jcorreia Posted May 3, 2006 Share Posted May 3, 2006 ok, I?ve found out that the values from point 3 to 4 aren?t passing wich makes me having a total of '0' in all my orders. Must be a bug of mine. I?m gonna try to find out. Thanks Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted May 3, 2006 Share Posted May 3, 2006 ok, I?ve found out that the values from point 3 to 4 aren?t passing wich makes me having a total of '0' in all my orders.Must be a bug of mine. I?m gonna try to find out. Thanks Make sure you got all of the changes in admin/includes/classes/order.php. 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...
jcorreia Posted May 3, 2006 Share Posted May 3, 2006 Thank you very much, it was exactly something missing there. Great work !! :) Quote Link to comment Share on other sites More sharing options...
jcorreia Posted May 3, 2006 Share Posted May 3, 2006 (edited) Ok, speaked to soon.. This is a diferent issue with product tax.. When I edit the tax or base price of some product in a existing order and hit update there?s a new line created in . " 4.Discount, Shipping and Total" named "tax". This is the value of my product tax, but it doesn?t have my tax description name which is "IVA". This happens with a new order also. In some other time it even duplicated my line "iva", with "tax", but i can?t find able to replicate it.. I?m gonna try to find if I forgot something again but this time doesn?t seems that way.. Edited May 3, 2006 by jcorreia Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted May 3, 2006 Share Posted May 3, 2006 Ok, speaked to soon..This is a diferent issue with product tax.. When I edit the tax or base price of some product in a existing order and hit update there?s a new line created in . " 4.Discount, Shipping and Total" named "tax". This is the value of my product tax, but it doesn?t have my tax description name which is "IVA". This happens with a new order also. In some other time it even duplicated my line "iva", with "tax", but i can?t find able to replicate it.. I?m gonna try to find if I forgot something again but this time doesn?t seems that way.. Do you use a custom order total module for your tax? If so you may need to customize Order Editor to work with your shop. Take a look at your database table 'orders_total' and find what's entered in the 'class' field for a tax component with the title "IVA" (you're looking for an entry created by the checkout process, not by Order Editor). If it isn't ot_tax, you'll need to do a find and replace on your Order Editor file, replacing all instances of ot_tax with whatever class entry your shop uses for tax. 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...
Fredrik.r Posted May 3, 2006 Share Posted May 3, 2006 Stew, could you think of which file I would need to edit to get the qtpro qttributes stock updating when editing an order? It doesnt sound that it should be too difficult, what do you think? Thank you! 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.