NEW! Complete Order Editing Tool!
#21
Posted 08 August 2003, 14:07
Why not just have a text field that would allow us to change the shipping ot whatever we want?
NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.
If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
#22
Posted 08 August 2003, 14:19
Quote
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
- Edmund Burke
#23
Posted 08 August 2003, 14:59
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.
#24
Posted 08 August 2003, 15:08
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.
NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.
If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
#25
Posted 08 August 2003, 15:13
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.
#26
Posted 08 August 2003, 15:46
In my own store, new orders have a Tax order total line that appears above the Sub-Total (I don't tax shipping). Would most prefer to have a tax field added after the shipping line that has ALL The tax? Or how do you want it shown?
- Jonathan
http://www.oscommerce.com/community/contributions,1435
#27
Posted 08 August 2003, 16:26
i.e. - Like the break down I showed before.
Sub-Total
Shipping
Tax
Grand Total
So what would be a good edition all round, I think, would be to have an input for all those options if possible.
Especially one that would allow the alteration of the total tax field.
You see if we had an order like the following:
Widget = £100.00
Shipping = £10.00
Tax @ 17.5% = £19.25
Grand Total = £129.25
At the moment the current code gives this result:
Widget = £100.00
Shipping = £10.00
Tax @ 17.5% = £17.50
Grand Total = £127.50
Now the solution would be some way to just alter the fields individually.
Sort of like we make our own calculations if poss.
I know it leaves room for error, but it also gives loads of control.
If we could then input our own calculations it would save on code calculations. Plus if someone orders from a country that does not have tax added, i.e. anyone not in the EU in Europe, then they would not have tax added to ANY of the order.
Whereas if they code was built to add tax automatically then you would have problems also.
So why not have it so the Admin has control over all input boxes add do his own calculations?
All in all it is a superb mod, and frankly something like this should be included in the standard code.
Look at Interchange, that has all of these features and Manual Order etc as standard. Not saying it is better, but these features do need adding to help each store.
Good work!
Think I have rambled enough, whats everyone elses thoughts?
#28
Posted 08 August 2003, 16:59
This will place an "edit" button next to the packing slip& invoice buttons in your order view.
<tr>
<td colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>
</tr>
Change it to this:
<tr>
<td colspan="2" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> <a href="' . tep_href_link(FILENAME_EDIT_ORDERS, 'oID=' . $HTTP_GET_VARS['oID']) . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'; ?></td>
</tr>
To place and "update" button on the main orders page find this around line 489:
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . tep_href_link(FILENAME_EDIT_ORDERS, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
$contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
Change it to this:
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_EDIT_ORDERS, 'oID=' . $oInfo->orders_id). '">' . tep_image_button('button_update.gif', IMAGE_UPDATE) . '</a>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>');
$contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));
You will also need to add the define in your admin/includes/filenames.php
define('FILENAME_EDIT_ORDERS', 'edit_orders.php');
For the order status issue I just did this. In edit_orders.php line 74:
$UpdateOrders .= "cc_expires = '$update_info_cc_expires', orders_status = '" . tep_db_input($status) . "' where orders_id = '" . tep_db_input($oID) . "';";
I just changed it to this to set all of the edited orders to "processing":
$UpdateOrders .= "cc_expires = '$update_info_cc_expires', orders_status = '" . tep_db_input(2) . "' where orders_id = '" . tep_db_input($oID) . "';";
#29
Posted 08 August 2003, 17:04
Have you considered updating the contribution to include this?
#30
Posted 08 August 2003, 17:35
- Added status editing (fixed order status bug from 1.0).
- Added comments editing. (with compatibility for osC 2.1)
- Added customer notifications.
- Added some additional information to the instructions file.
- Fixed bug with product names containing single quotes.
I added my own recommendation for where to have a new "edit" button, but it's not as extensive as JB's recommendations.
I don't think I will add his suggestion of changing edited orders to Processing, though. It's good for a lot of people, but there are still a lot of people that won't want to use it like that. There may also be instances in which orders that are already processed and maybe even delivered may want to update the invoice. You don't want people to double-deliver an order because Delivered got changed back to Processing.
My original store has a LOT of custom mods, so I had to strip down this contribution to make it compatible with the default settings (i.e. take out tracking numbers, product and option weights, etc...), but it should be easy to re-add anything you need.
However, while this isn't really related to this contribution, here are some ideas that I've implemented and found extremely useful:
I've found that having a "paid" database flag/field is helpful, especially when people are sending in checks or money orders, or when credit cards aren't processed during checkout. Currently, I have that paid flag, and in my orders list, if an order is paid for, I have a $ sign next to the order.
I also use the Overlib Javascript library to allow me to view the comments right from the order list. Here's a partial screenshot of my orders list.
[img]http://www.sitecreative.com/tmp/mods.gif[/img]
Some of those are real time-savers. I've also added a "cancelled" status so that I can keep track of how many orders are cancelled instead of just deleting them.
Just some ideas. I'll keep watching this thread for more opinions on the tax.
- Jonathan
http://www.oscommerce.com/community/contributions,1435
#31
Posted 08 August 2003, 17:43
I am playing with it as we speak.
It is hard to say what the best answer is to the tax query, becos we work in such different ways on either side of the pond.
In which case really, there needs to be an option to add tax to the shipping.
Perhaps an input box that you can put a tax rate in, the same as in the products line, but one just for tax, and if it contains an input amount the tax is calculated on that for shipping amount + tax, if it is left blank then 0% tax will be calculated as there will be no input figure to calculate from.
#32
Posted 08 August 2003, 17:45
Anyone using the P&S Shipping and Manual Order mod, dont use this.
It doesnt work, if you add a product it will not update the SPG_ shipping page with the new additions to the order.
So beware until this is fixed!
#33
Posted 08 August 2003, 17:46
I hate not being able to edit!
#34
Posted 08 August 2003, 19:40
If you were to contribute the "order flags" and Overlib that you are using I think most people would find that very useful/handy as well. I know I sure would!
#35
Posted 08 August 2003, 20:10
If it isn't there, you have the option of inserting a blank-value, new order total item named "Tax:" - which will then be auto-updated with the sum of the products' tax and shipping tax (if the shipping tax is enabled)?
For example, if you have:
Sub-Total: $x.00
Shipping: $y.00
Total: $z.00
and you add an entry inbetween Shipping and Total that looked like:
Sub-Total: $x.00
Shipping: $y.00
Tax:
Total: $z.00
... upon clicking Update, the Tax: field would be calculated with the appropriate taxes and filled in. Would that work for everyone?
- Jonathan
http://www.oscommerce.com/community/contributions,1435
#36
Posted 08 August 2003, 20:24
#37
Posted 08 August 2003, 20:47
Does your address look something like:
/admin/edit_orders.php?oID=600 (or whatever the order ID is)
- Jonathan
http://www.oscommerce.com/community/contributions,1435
#38
Posted 08 August 2003, 20:52
#39
Posted 08 August 2003, 21:04
Are you sure that's the right Order ID? Normally, order IDs are only numbers, like 4224, 92712, 5, or 98... It gets generated from an auto-incrementing field in your database.
Are you using a contribution or some sort of customized modification that creates special Order IDs? I just checked out from your page and it gave me an order ID of OX0808038
I would use a database editor/viewer like phpMyAdmin or MySQLFront to connect to your database and see if you can find the numeric order ID. There has to be one there somewhere (if the mod had COMPLETELY changed the Order ID system, you wouldn't get a message saying the order didn't exist). Then, once you find the numeric order ID, change your link/code to use that order ID instead of the specialized/customized one.
- Jonathan
http://www.oscommerce.com/community/contributions,1435
#40
Posted 08 August 2003, 21:04














