Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

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.

Link to comment
Share on other sites

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?

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

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.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: 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 by Irin
Link to comment
Share on other sites

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?

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

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.

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

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

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

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.

Link to comment
Share on other sites

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.

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

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.

Link to comment
Share on other sites

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.

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

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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

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.

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

Alright mate, will try that, thanks

Link to comment
Share on other sites

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?

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

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.

Link to comment
Share on other sites

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.

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

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 by jcorreia
Link to comment
Share on other sites

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.

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

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...