Latest News: (loading..)
jhilgeman

NEW! Complete Order Editing Tool!

3,399 posts in this topic

Installed code, tested it, and re-opened order. Everything seems to work great. Took about 5 minutes to install and test. Simplest install I've done and much needed! Now if I can just find the time to hook it into the admin rather than doing it by URL, it'll be perfect.

 

Thanks again

Share this post


Link to post
Share on other sites

Hey, congrats on your work, this is a much need contribution. Does this work with MS2?

 

Thanks again

Share this post


Link to post
Share on other sites

I have found that I have had to, at times, move and order from a charged order to a "credit" (order was cancelled and I need to retain the order in the system, yet show that it was credited back to the customer). Will this allow me to do that?

Share this post


Link to post
Share on other sites

I've found the easiest way of "hooking" this into the admin system is via the order details page. At the top of the order details page, there's a "back" button - I just copy the code for this, and change the HREF. There's already a "edit order" graphic, too, so you can use that.

 

That way, if I need to edit an order, I just go to that order's details page, click on "edit order" and presto, I'm in the editing mode.

 

This contribution SHOULD work in any 2.2 version, and possibly 2.1.

 

- Jonathan

Share this post


Link to post
Share on other sites

Which version are you using it with? It sounds wonderful, but version is important since there are changes between ms1 and ms2 that affect many many contributions.

Share this post


Link to post
Share on other sites

I've installed the Contribution very fast... fine :D

 

Than I make my first test on a german shop (2.2MS2)

 

After Updating the following things happened:

 

The Order is not shown in the view of all orders because the order status was changed to 0

 

After manuell changing the status in the database it was back again

 

But than I could see, that the currency was changed from EUR to $

 

After that I stop testing. Can somebody help ??

Share this post


Link to post
Share on other sites

I was just about to say I had tested this on the basis that this kind of mod has always intrigued me, and I found the same.

 

Whenever it is used it removes the order from the listings, due to the order status change.

 

Also, for those that have to add tax to shipping it doesnt do it.

It adds tax to the order total, but not to shipping, so the order grand total is wrong for those that need tax adding in for shipping.

 

Can I assume that in the US you dont charge tax on Shipping costs?

 

Apart from that a very nice mod, and certainly an excellent foundation for the community to build on and improve over time.

 

Nice1 :wink:

Share this post


Link to post
Share on other sites

To alter the currency find this line:

$ot_text = "$" . number_format($ot_value, 2, '.', ',');

 

And change the "$" to the symbol you wish to display.

Share this post


Link to post
Share on other sites

I use ms1, and I got the same problem as bodyfeelings. My shop language is not english, then I change a order "$" appears in the orderhistory.

Also, the "add product" function only chooses products from the english language table... too bad I can?t use this mod until this is fixed, it?s a really nice mod.

Share this post


Link to post
Share on other sites
To alter the currency find this line:  

Code:  

$ot_text = "$" . number_format($ot_value, 2, '.', ',');  

 

 

And change the "$" to the symbol you wish to display.

 

Yes, thats OK, but the script also calculates a new price - not only changing the sign for the currency.

 

And the first thing I have to solve is the orderstatus problem.

 

I think there are some things to to for make the contribution working in different cuntries. But I can't. And the contribution is very good for everybody using osc.

Share this post


Link to post
Share on other sites
Yes, thats OK, but the script also calculates a new price - not only changing the sign for the currency.

 

That is like I say, becos the order total is not adding tax to the shipping price.

 

If you work our the total, it is all fine for the product, try making shipping cost 0.00 and you will see it should be the correct total for what ever tax you charge, but it doesnt add tax to the shipping cost, therefore your total ends up incorrect if you have to add tax to shipping in your country.

 

Have a look through the code, jhilgeman has commented it quite well, so you can see what each section does and build on it from there.

Share this post


Link to post
Share on other sites

great!

 

- just implement a button in the admin area

- add tax to shipping price

- change the order status

 

and it would be a perfect mod :)

Share this post


Link to post
Share on other sites

- automatically send the customer a mail with the changes (important for prepayment)

Share this post


Link to post
Share on other sites

triplepost, sorry :D

 

- the EUR should be after the price, and not in front of (like 50.00EUR not EUR50.00)

Share this post


Link to post
Share on other sites
- just implement a button in the admin area  

- add tax to shipping price  

- change the order status  

 

That would be wonderful....

 

automatically send the customer a mail with the changes (important for prepayment)

Must be swiched on/off because not each change is for the customer.

 

- the EUR should be after the price, and not in front of (like 50.00EUR not EUR50.00)

 

In the moment it is fixed in the sourcecode without a variable. It must be variable and depending on the default currency of the shop

Share this post


Link to post
Share on other sites

Agree with GFW.

 

I have noticed a strange thing, when I click the update button in edit_orders and haven?t changed anything the order disappears. Database still has the data, but orderhistory and admin is not showing it. Anyone else got this problem?

Share this post


Link to post
Share on other sites

@end

 

The Order is not shown in the view of all orders because the order status was changed to 0  

 

After manuell changing the status in the database it was back again  

Share this post


Link to post
Share on other sites

this is ment with "order status", after updating the order status is "0" and disappears, but is still there *fg*.

 

after changing these things, this would be a perfect and really really simple and helpful mod!

Share this post


Link to post
Share on other sites

You know, I think that this is a great contribution, but I don't understand why anyone would want the shipping to be recalculated here.

 

Why not just have a text field that would allow us to change the shipping ot whatever we want?

Share this post


Link to post
Share on other sites
You know, I think that this is a great contribution, but I don't understand why anyone would want the shipping to be recalculated here.

 

Why not just have a text field that would allow us to change the shipping ot whatever we want?

 

this new version does have a text field to change the shipping to whatever you want

Share this post


Link to post
Share on other sites

The reason for recalculating it is because if tax needs to be added, it needs a recalculation, but it the tax doesnt want to be displayed in the Shipping line of the totals.

It needs to be displayed in the tax line.

 

i.e.

Sub-Total =

Shipping =

Tax =

Grand Total =

 

the tax for shipping is displayed in the tax line, not the shipping line.

this way the customer sees the full breakdown.

 

Do you guys not charge tax on shipping in the US?

We have to add VAT to everything on the order in the UK.

 

But the tax on shipping has to be displayed as tax, not just included in the shipping total.

Share this post


Link to post
Share on other sites

Oh, well I guess that's a pretty good reason.

 

Actually, we only have to charge tax if the person ordering is having it shipped to the same state the business is located in. So the vast majority of orders have no tax whatsoever.

 

It would be nice to at least have to option to not have it calculated.

 

But still, I think its a great tool.

Share this post


Link to post
Share on other sites

I added a link, (it is not the cleanest code, but it works) to allow me to update the invoices using this contribution.

 

Edit the orders.php file.

find:

]

$contents[] = array('align' => 'center', 'text' => '<a href="javascript:popupWindo

w('' .  (HTTP_SERVER . DIR_WS_ADMIN . FILENAME_ORDERS_INVOICE) . '?' . (tep_get_a

ll_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '')">' . te

p_image_button('button_invoice.gif', IMAGE_ORDERs_INVOICE) . '</a><a href="javascr

ipt:popupWindow('' .  (HTTP_SERVER . DIR_WS_ADMIN . FILENAME_ORDERS_PACKINGSLIP)

. '?' . (tep_get_all_get_params(array('oID')) . 'oID=' . $oInfo->orders_id) . '')

">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERs_PACKINGSLIP) . '</a>

');

 

I use this: Just creates the link.

$contents[] = array('align' => 'center', 'text' => '<a href="javascript:po

pupWindow('' .  (HTTP_SERVER . DIR_WS_ADMIN . FILENAME_ORDERS_INVOICE) . '?' . (t

ep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '')

">' . tep_image_button('button_invoice.gif', IMAGE_ORDERs_INVOICE) . '</a><a href=

"javascript:popupWindow('' .  (HTTP_SERVER . DIR_WS_ADMIN . FILENAME_ORDERS_PACKI

NGSLIP) . '?' . (tep_get_all_get_params(array('oID')) . 'oID=' . $oInfo->orders_id

) . '')">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERs_PACKINGSLIP)

. '</a>' .

'<br><a href="edit_orders.php?oID=' . $oInfo->orders_id  . '">Edit the Invoice</a>

');

 

I took the '); at the end of the line and inserted

' . '<br><a href="edit_orders.php?oID=' . $oInfo->orders_id . '">Edit the Invoice</a>

 

This created the link Edit the Invoice just below the buttons.

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