Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

Thanks for a much-needed addition! Great installation directions!

Two related questions to REFUNDS.

 

ONE

 

What is the best way to post a refund without deleting the original entry? I tried but the original entry deleted, although everthing appears to be working fine.

 

A similar request is in post #598 / djmonkey1 from march 2006. A coding change was recommended then but I was wondering best course of action for refund now.

Maybe I should have added another transaction for negative amount. Help to properly post a refund is appreciated.

 

TWO

 

I was thinking that what should happen is that we add a couple more statuses to the database (Refund, Void, etc.), because to have a final status of Delivered doesn't make sense and deleting a transaction where money changed hands doesn't either. Adding the fields is easy, but to make them work properly the challenge. This contribution addresses a lot of needed areas and is a great tool. I am not familiar with the extent of all this code...would a few more statuses work with this contribution or am I thinking of all this wrong.

 

Thanks

What you CODE is what you get

wycodeiwyg

Share this post


Link to post
Share on other sites

Hi all,

 

In regards to the following error that was posted previously:

 

Warning: number_format() expects parameter 1 to be double, string given in C:\Server\www\myserver.dev\public_html\winkel\admin\edit_orders.php on line 1737

 

Im just wondering if anyone has found an actual solution to this error rather than just using the E_NONE ignore thingy in application_top.php (which then in itself brings up another error:

 

Notice: Use of undefined constant E_NONE - assumed 'E_NONE' in H:\wamp\www\catalog\admin\includes\application_top.php on line 17

 

 

 

Any help would be appreciated.

 

Cheers!

Share this post


Link to post
Share on other sites

Hi all,

 

In regards to the previous post, for edit_orders.php I found what I hope is a fix for the above problem:

 

Here is the original code twas line 1740 for me, and line 1737 for someone else:

 

<td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format($order->totals[$i]['value'], 2, '.', '') . '" size="6"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n";

 

And here is the fix: I placed (double) after number_format(

 

which gives me this code:

 

<td align="right" class="dataTableContent"><input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="' . number_format((double)$order->totals[$i]['value'], 2, '.', '') . '" size="6"><input name="update_totals['.$i.'][class]" type="hidden" value="' . $order->totals[$i]['class'] . '"><input name="update_totals['.$i.'][id]" type="hidden" value="' . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n";

 

 

And hey presto the error suddenly disappeared.

 

BTW my current wamp php version is 5.3.0, in the previous version on my wamp server the error was not there.

 

I hope this helps other people, and if Im completely wrong, please let me know, but for me the fix works.

 

I also added the (double) to the lines 1740 and 1737 as they appear to have the same number_format( thingy and the fix is working and order editor is working perfectly!

 

Cheers!

Share this post


Link to post
Share on other sites

Thanks a lot for this fine contrib.

 

However, I get a blank page if I edit an order and select the shipping method (shipping by zones).

If I tick the radio button "shipping method - shipping by zones" a login prompt appears.

Is this the correct behaviour? I am already logged in so I am wondering why I have to login again.

 

After successful login, osCommerce calls the following URL which returns a blank page:

<SHOP_URL>/admin/edit_orders_ajax.php?osCAdminID=xxxxxx

 

There are no PHP errors in the webservers error log.

 

Any idea, what might be wrong?

 

Thanks in advance...

Share this post


Link to post
Share on other sites

I forgot to mention:

I use:

+ PHP version 5.2.14

+ order_editor_5_0_9b_FR

+ oscommerce-2.2rc2a

Edited by zopeuser

Share this post


Link to post
Share on other sites

I installed this twice (once with the autoinstaller (5.0.66) and once manually (order_editor_5_0_9b_FR)). I have RC2a and more than the minimum requirements to run the module. I get the same error when pressing the edit button from the order I want to modify...

 

Fatal error: Call to undefined function tep_round_up() in /home1/custompi/public_html/includes/modules/shipping/uspsflat.php on line 51

 

Any ideas how to get this working? I have installed quite a few modules so I'm fairly familiar with the process and comfortable that I did it right.

Thanks in advance!!!

Rob

Share this post


Link to post
Share on other sites

you can avoid all of that and use the last one I uploaded, which works without all this garbage. Several folks since my upload have dumped their versions (with problems) and ran without supporting them.

 

HEllo,

How Can I know which is the version of this contribution you made?

Here http://www.oscommerce.com/community/contributions,1435 I can't see the autors of each version.

 

I have the same issue others have with:

 

1146 - Table 'tiendas_1.eorder_text' doesn't exist

 

SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '3'

 

Thank you very much.

Share this post


Link to post
Share on other sites

I have the same issue others have with:

 

1146 - Table 'tiendas_1.eorder_text' doesn't exist

 

SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '3'

 

Thank you very much.

This issue is not from OE contrib. I reply on it in other topic. Suddenly I can't remeber it, but very close to OE.

Edited by RusNN

Share this post


Link to post
Share on other sites

I remeber! It is from Order Editor contrib, but discussion has been in Manual Order Maker theme.

Read my posts here and here.

Edited by RusNN

Share this post


Link to post
Share on other sites

Need help now with ot_subtotal_ex.php

 

This works fine in the frontend web.

Product A: 11,00EUR

Product B: 11,00EUR

-------------------------

Subtotal excl: 18,18EUR

21% VAT: 3,82EUR

Subtotal : 22,00EUR

-------------------------

Shipping: 3€

______________________

Total incl: 31,66EUR

 

 

 

 

In the backend (edit_orders.php) the totals are worng.

+ Subtotal excl [22,00] (this should be 18,18€, not 22,00€)

+ VAT 3,82

+ Subtotal 22,00

+ Delivery [ 3 ]

+ TOTAL 31,66€

 

 

 

The orders.php works fine.

 

 

Anyone knows where to modify to avoid the including VAT on Subtotal EXc. ??

Edited by bhbilbao

Share this post


Link to post
Share on other sites

Hi. First of all, this is a really nice contribution. I however have a small problem (only with firefox, not with IE8).

 

When adding a product to an order, I get logged of from the admin panel. If I log in again, then everything works fine.

 

Could anybody help me ?

Share this post


Link to post
Share on other sites

Did anyone find a solution to fix this tax not being applied correctly when using a custom OT field. I looked at this suggestion below but it seems that the edit_orders.php version that he is using is very old. I cannot find any code that looks remotely like stated below. There was another suggestion made by augenblicke-eingefangen shown below here. This looks like it should work but unfortunatly, it does not for me.

 

There are quite a few people looking for answers to this problem. Any suggestions would be great.

 

CODE

if ($ot_title != '') { //7

 

ADD:

 

CODE

//This changes the value of ot_tax

if ($order_totals[$i]['code'] == 'ot_tax') {

$order_totals[$i]['value'] += $tax_to_add;

$order_totals[$i]['text'] = $currencies->format($order_totals[$i]['value'], true, $order->info['currency'], $order->info['currency_value']);

}

//This calculates the tax on additional components

if (($order_totals[$i]['code'] != 'ot_total') && ($order_totals[$i]['code'] != 'ot_subtotal') && ($order_totals[$i]['code'] != 'ot_tax') && ($order_totals[$i]['code'] != 'ot_shipping')) {

$tax_to_add += $order_totals[$i]['value'] * $tax / (100 + $tax);

}

 

AFTER:

 

CODE

} elseif ( (tep_not_null($ot_value)) && (tep_not_null($ot_title)) ) {

 

ADD:

 

CODE

//This calculates tax on ot_custom

$tax_to_add += $ot_value * $tax / (100 + $tax);

 

 

Hi, I'm still standing with the same issue.

I try to apply discounts on manually made orders. But the problem is that the discount is applied to the total, and not to the sub-total (excl. VAT) - and of course the VAT is not recalculated ...

 

Did anybody solve that problem ?

Share this post


Link to post
Share on other sites

Hi, I'm still standing with the same issue.

I try to apply discounts on manually made orders. But the problem is that the discount is applied to the total, and not to the sub-total (excl. VAT) - and of course the VAT is not recalculated ...

 

Did anybody solve that problem ?

 

 

OK, I've found a solution for the subtotal to be correct :

 

Line 136 $shown_price = tep_add_tax($this->products[$index]['final_price'], 0) * $this->products[$index]['qty'];

 

I've put 0 iso $this->products[$index]['tax']

 

For the discount, I've simply created a product called Discount unavailable from the online shop, but which can be added. It's price is 0 and it's changed to the request value in edit_orders.

Share this post


Link to post
Share on other sites

The order editor allows you to put through an order even when you don't have the stock to fulfill it. So is there a solution that would at least show a warning if the stock was insufficient? Or show the item stock in the add to cart screen?

Edited by pmfjoe

Share this post


Link to post
Share on other sites

Hi, I seem to have some problems with getting the ajax/javascript elements of this to work - I've gone through everything with my fairly amateurish fine tooth comb and am stumped.

 

From the Firefox error console I get the following:

 

Error: syntax error

Source File: http://www.xxxxx.com/admin/edit_orders.php?oID=31

Line: 598, Column: 4

Source Code:

} else {

 

 

 

Error: newOrderEmail is not defined

Source File: javascript:newOrderEmail()

Line: 1

 

 

If anyone has any ideas why I'm getrting this that would be great.

 

Many thanks

 

Karl

Share this post


Link to post
Share on other sites

Hi

 

I'm looking for an addon for "scrambled order numbers" contribution.

I'd like to use scrambled order number with this Order Editing Tool same time.

 

Please Help Me.

Share this post


Link to post
Share on other sites

Hey, I'm having a problem with this contribution. When I add a product to an order, manual order editor does not change the product to inactive when last copy is bought. How can I fix this?

Share this post


Link to post
Share on other sites

Sorry I have a stupid question... Can I know how to update database? I'm a newbie in this field... Hope somebody can help me.

Share this post


Link to post
Share on other sites

Hi there,

 

I have tried to install this, when i go into the order and click edit i get this error.

 

The requested URL /admin/FILENAME_ORDERS_EDIT was not found on this server.

 

i have double checked that the files are in there, but nothing is missing. Any ideas?

Share this post


Link to post
Share on other sites

Hi there,

 

I have tried to install this, when i go into the order and click edit i get this error.

 

The requested URL /admin/FILENAME_ORDERS_EDIT was not found on this server.

 

i have double checked that the files are in there, but nothing is missing. Any ideas?

You miss to modify admin\includes\filenames.php. Check for such code there and if not, add it:

// order editor
define('FILENAME_ORDERS_EDIT', 'edit_orders.php');
define('FILENAME_ORDERS_EDIT_ADD_PRODUCT', 'edit_orders_add_product.php');
define('FILENAME_ORDERS_EDIT_AJAX', 'edit_orders_ajax.php');

Share this post


Link to post
Share on other sites

Thank you, that has worked, however on my main page i am getting these errors, my front page has been modded to display links to the categories. Any ideas ?

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main() [function.include]: Failed opening 'includes/modules/MAIN_CATEGORIES' for inclusion (include_path='.:/usr/share/pear') in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main() [function.include]: Failed opening 'includes/modules/FILENAME_UPCOMING_PRODUCTS' for inclusion (include_path='.:/usr/share/pear') in /home/sites/n.com/public_html/index.php on line 353

 

 

 

 

 

 

You miss to modify admin\includes\filenames.php. Check for such code there and if not, add it:

// order editor
define('FILENAME_ORDERS_EDIT', 'edit_orders.php');
define('FILENAME_ORDERS_EDIT_ADD_PRODUCT', 'edit_orders_add_product.php');
define('FILENAME_ORDERS_EDIT_AJAX', 'edit_orders_ajax.php');

Share this post


Link to post
Share on other sites

Thank you, that has worked, however on my main page i am getting these errors, my front page has been modded to display links to the categories. Any ideas ?

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/MAIN_CATEGORIES) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main() [function.include]: Failed opening 'includes/modules/MAIN_CATEGORIES' for inclusion (include_path='.:/usr/share/pear') in /home/sites/n.com/public_html/index.php on line 305

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main(includes/modules/FILENAME_UPCOMING_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /home/sites/n.com/public_html/index.php on line 353

 

Warning: main() [function.include]: Failed opening 'includes/modules/FILENAME_UPCOMING_PRODUCTS' for inclusion (include_path='.:/usr/share/pear') in /home/sites/n.com/public_html/index.php on line 353

Seems, like your default osCommerce installation corrupts. This defines comes from main osCommerce. In my case RC2a.

INsert the line below to catalog\includes\filenames.php

define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');

 

But I don't know about MAIN_CATEGORIES. May be it is from other contrib. Oh... By the way. Do you use BTS or STS? May be it is from there. Check you installation of this mods. I haven't one.

Share this post


Link to post
Share on other sites

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'");

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

 

Sorry for the cross-post, but I was wondering if anyone has been able to actually send new order confirmation emails with order editor 5.0.9b? All I get are blanks emails to the customer when I click on that button. Is that the case for everyone? Is there something strange going on with my host to block that email (not likely since every other email works)? Any ideas are appreciated...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×