Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

You have to modify the code in Order Editor to take the discount into account when calculating tax. To do this we have to know the ot_class value of the discount component. You can find this in the the 'orders_total' table in the database. For example, subtotal is ot_subtotal, total is ot_total, tax is ot_tax, etc.

It's ot_custom... So it'll have applyed the same rule for every "custom" add? Well... at the moment I've only an ot_custom class entry, so every ot_custom could be like this.

Right... how can I modify the code?

Link to comment
Share on other sites

It's ot_custom... So it'll have applyed the same rule for every "custom" add? Well... at the moment I've only an ot_custom class entry, so every ot_custom could be like this.

Right... how can I modify the code?

 

Yes, this will cause every entry with ot_custom (ie any entry added in by Order Editor) to be included in the tax total.

 

Find at about line 293

if($ot_class == "ot_shipping")//a good place to add in custom total components

and change it to

if(($ot_class == "ot_shipping") || ($ot_class == "ot_custom"))//a good place to add in custom total components

 

Then find at about line 625

  //just adding in shipping tax, don't mind me
	$ot_shipping_query = tep_db_query("
	SELECT value 
	FROM " . TABLE_ORDERS_TOTAL . " 
	WHERE orders_id = '" . (int)$oID . "'
	AND class = 'ot_shipping'");

and change it to

  //just adding in shipping tax, don't mind me
	$ot_shipping_query = tep_db_query("
	SELECT value 
	FROM " . TABLE_ORDERS_TOTAL . " 
	WHERE orders_id = '" . (int)$oID . "'
	AND (class = 'ot_shipping' OR class = 'ot_custom')");

 

Then at about line 1117 find

//shipping tax is added to the default tax class
 if (p == 'ot_shipping') {
 <?php

and change it to

//shipping tax is added to the default tax class
 if ((p == 'ot_shipping') || (p == 'ot_custom')) {
 <?php

 

Then at about line 1164 find

 //This has to be done independently since the grand total doesn't count the various tax totals
 if (pid == 'ot_shipping') {

and change it to

 //This has to be done independently since the grand total doesn't count the various tax totals
 if ((pid == 'ot_shipping') || (pid == 'ot_custom')) {

and you should be all set for that issue.

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 yes yes! :D

Maybe it'd be better if there were both ways... don't you think?

Maybe. What if you typed the model number wrong?

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

Maybe. What if you typed the model number wrong?

If I type a model and is wrong, I'd like to have a way to verify it right when I add the product.

Or I'll check it in a second time, when I'm in the order screen, of course.

No matter!

It's a good implementation however (if I can have both methods, of course...)

 

Why do you have doubts?

Link to comment
Share on other sites

If I type a model and is wrong, I'd like to have a way to verify it right when I add the product.

Or I'll check it in a second time, when I'm in the order screen, of course.

No matter!

It's a good implementation however (if I can have both methods, of course...)

 

Why do you have doubts?

 

I'm just stalling. :)

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

Hi,

 

can someone give a detailled feature list what this contribution does?

 

Thanks.

 

Cu

 

Quickly and easily perform any or all of the following tasks:

 

-change the order currency

-edit the customer's billing, shipping, and/or home address

-change the payment method for an order (using either a dropdown menu or a text input box, your choice)

-add or delete products from an order

-reliably update order totals, including taxes

-insert coupons & discounts & extra fees

-update tax on individual products

-update product quantities, prices, model number, name, tax, etc.

-handy JavaScript calculator that will show you what the updated totals will be before you hit 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

This looks like an awsome contrib, unfortunately i think it's conflicting with some i already have installed.

 

In my order i have a CVV contrib which also includes a cvv number remover and also a CC number remover. Any ideas how i can integrate them both as when i edit the order.php file i then get an error :(

Link to comment
Share on other sites

I installed this today and when I tried to edit an order I got this message:

 

"Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Apache/1.3.34 Server at roundtriprentals.com Port 80"

 

 

I checked the error log and it says "Premature end of script headers:" in the edit_orders.php file. I'm not sure what may be causing this. Any ideas?

 

Thanks!

Link to comment
Share on other sites

Not sure why but it's working now. Maybe some silly cache issue. Any way - it's an awesome contribution!

 

I installed this today and when I tried to edit an order I got this message:

 

"Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Apache/1.3.34 Server at roundtriprentals.com Port 80"

I checked the error log and it says "Premature end of script headers:" in the edit_orders.php file. I'm not sure what may be causing this. Any ideas?

 

Thanks!

Link to comment
Share on other sites

This looks like an awsome contrib, unfortunately i think it's conflicting with some i already have installed.

 

In my order i have a CVV contrib which also includes a cvv number remover and also a CC number remover. Any ideas how i can integrate them both as when i edit the order.php file i then get an error :(

 

You're referring to admin/includes/classes/order.php? What error is it that you're seeing?

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

Why? :)

You know, v2.6.4 and up feature an optional search box for the product names and categories (commented code at about lines 2051 and 2065). If you implement the changes you posted to add the product model in the product dropdown list and enable the search box you're almost there.

 

You just need to do away with the categories dropdown and make the products dropdown have all the products in it.

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

You're referring to admin/includes/classes/order.php? What error is it that you're seeing?

 

:D I couldn't remember the error so i reinstalled it and it's now working :blush:

 

This is an excellent contrib, thanks :thumbsup:

 

One thing that i have noticed though is that the email that gets sent out when you change the order status within the editor is different to the one when you change it via the details button. I prefer the details one TBH as it's says it's been changed to Shipped/Dispatched rather than just "Your order has been updated"

 

Regards

 

Daz

Link to comment
Share on other sites

One thing that i have noticed though is that the email that gets sent out when you change the order status within the editor is different to the one when you change it via the details button. I prefer the details one TBH as it's says it's been changed to Shipped/Dispatched rather than just "Your order has been updated"

What is TBH?

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 thing that i have noticed though is that the email that gets sent out when you change the order status within the editor is different to the one when you change it via the details button. I prefer the details one TBH as it's says it's been changed to Shipped/Dispatched rather than just "Your order has been updated"

In any case you're using a contribution to achieve this. You will have to modify admin/edit_orders.php similar to the way you modified admin/orders.php in order to have your emails work that way.

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

In any case you're using a contribution to achieve this. You will have to modify admin/edit_orders.php similar to the way you modified admin/orders.php in order to have your emails work that way.

 

To Be Honest :D

 

It's not a problem, i can just use the one in detail to send the email. This is probably one of the best contribs ive installed :thumbsup:

 

One thing that i have noticed is that if you add a product to an exisiting order it doesn't add it to the bestsellers list on the sites front page, that would be nice

Link to comment
Share on other sites

To Be Honest :D

 

It's not a problem, i can just use the one in detail to send the email. This is probably one of the best contribs ive installed :thumbsup:

Excellent!

 

One thing that i have noticed is that if you add a product to an exisiting order it doesn't add it to the bestsellers list on the sites front page, that would be nice
In a stock osC store, "Bestsellers" are based on the products_ordered field of the 'products' table. Order Editor does update that field when adding, deleting, or changing the quantities of products in an order.

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

It's not a problem, i can just use the one in detail to send the email.

 

In admin/edit_orders.php change

EMAIL_TEXT_SUBJECT

to

EMAIL_TEXT_SUBJECT_1. $oID . EMAIL_TEXT_SUBJECT_2 . $orders_status_array[$status]

 

Then add this to admin/includes/languages/english/edit_orders.php (or your language of choice):

define('EMAIL_TEXT_SUBJECT_1', STORE_NAME . ' Order ');
define('EMAIL_TEXT_SUBJECT_2', ':  ');

 

Or something like that. :)

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

  • 2 weeks later...

Hi DJmonk ;)

 

Some troubles with IE and onMouseover="ddrivetip..... function

It doesn't display them anymore.

But it's ok with firefox... :-"

 

message error:

'tipobj.style' has NULL value or isn't an objet...

 

And credit card fields are always displayed instead of not with 2.6.5 a version...

 

Any ideas? :rolleyes:

 

If you want I've translated in french the new edit_orders.php language file.

Edited by M@verick
Link to comment
Share on other sites

Hey djmonkey1

 

I have opdate to 2.7, but can you make it so the Billing Address Box are under the Shipping Address box ??

 

And thanks for the great job you made.

 

/TheExterminator

 

That's not too hard- you just have to edit the HTML to display the elements as you would like.

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

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...