Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

OK, now I changed some things to the tool and uploaded it.

( http://www.oscommerce.com/community/contributions,1435 )

 

############################

This package includes all files you need. The only thing I've changed is the calculation for order_total.

 

The reason for the changes were that I'm using a shop with prices incl. tax and when changing an order the calculation of the order_total part was made without tax.

 

Now you can use this fantastic tool also with shops only working with prices inkl. tax.

 

Have fun

##############################


Thanks Matthias

Share this post


Link to post
Share on other sites

Great mod!

I'm having a small problem, it occurs in both version 1.2a and 1.2b. If I edit a order for example of $17.50 and I submit the change it will round it up to $18 and store it in the DB. What can I do to fix this?

Share this post


Link to post
Share on other sites

Hello,

Great Mod... I use it everyday.

my only problem besides the round figure is that the state will not write to the DB on the "Create Account". I have to add it again when i do the order process... anyone else got this problem?.

1 other thing.... when I uploaded this mod i lost my edit order mod. I used to be able to edit orders now i cant.

I'm still digging into it.

thanks


<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Share this post


Link to post
Share on other sites
This package includes all files you need. The only thing I've changed is the calculation for order_total.

Are you planning to include updating of the database (stock level) for adding or deleting products?

 

Thanks.

Share this post


Link to post
Share on other sites

Hi, I just installed this mod today, and it is simple and wonderful. A few problems and comments tho...

 

I am using OS2 MS2.

 

#1 I notice that when I change the Price(ex) that it changes the Price(inc) and Total(inc), However the Total changes to $0.00. It also shows as $0.00 for the Order Total on the orders.php page and on the orders.php...&action=edit page, also when the customer views account.php and account_history_info.php. Is this just me or has no one noticed this?

 

#2 Changed the billing address, worked ok.

 

#3 Added a new comment and it did not save it. had to go back to the normal order edit (orders.php...&action=edit page) to add a comment.

 

#4 (I know this may have been dicussed b4, but...) I tried to add a product to the order, and after choosing a Category, no products were available, just empty fields. I have multiple sub levels of categories.

 

#5 I also noticed that you can not see or edit the attribute options amounts, only the total. This would be very helpful.

 

#6 I used the latest download, and did not notice anything about adding the various ways to link to the edit page that were mentioned in this thread. It would be helpful for folks that use the mod but do not read this to have it in the docs.

 

Thanks again, Kirk


Boom... Big butta boom.

Share this post


Link to post
Share on other sites

Hello,

the mod. works with an exception really greatly.

Unfortunately I have also still another small problem with the tax:

In my german shop all prices are displayed with tax.

 

subtotal: 100, - EUR (correctly displayed, the value is incl. tax)

tax: 13.79 EUR (16 % of 100,-EUR)

shipping: 5, - EUR

total: 118.79 EUR (wrongly displayed - now 2 x tax)

 

The correct total should be:

 

total: 105, - EUR (only subtotal + shipping costs)

 

How does the code to change, so that the correct total is displayed?

Thank you for your assistance in advance.

Susi

Share this post


Link to post
Share on other sites

Can this module be used for downloadable products store. Will it also update the orders_products_download table to enable the download links for the products.

Share this post


Link to post
Share on other sites

I've installed Order Editor, and it's working fine. The one problem I have it that when I'm in my Admin panel and click on orders, I get this error:

 

Fatal error: Cannot break/continue 1 level in /home/myoskinc/public_html/catalog/admin/orders.php on line 413

 

From line 412, this is the code in that file:

 

     }
    break;
}

if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
  echo '            <td width="25%" valign="top">' . "\n";

  $box = new box;
  echo $box->infoBox($heading, $contents);

  echo '            </td>' . "\n";
}
?>
        </tr>
      </table></td>
    </tr>
<?php

?>
  </table></td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

If anyone could help point out what I've missed, I'd really appreciate it. Thanks so much,

 

Rachel

Share this post


Link to post
Share on other sites

Hi!

 

When I use * Order Editor i get wollowing error when I tried to add products to an order. (I can update price, shipping rate etc)

 

 

 

1054 - Unknown column 'OS1111031' in 'field list'

 

insert into orders_products set orders_id = OS1111031, products_id = 428, products_model = 'DVD-BOX', products_name = 'DVD Fodral', products_price = '9.0000', final_price = '9', products_tax = '25', products_quantity = 1;

 

[TEP STOP]

 

 

 

I have made the changes in the Readme file regarding the Ordernumber.

I am using MS1 (I think..)

 

Someone?

 

 

Best Regards,

Patrick Andersson

Share this post


Link to post
Share on other sites

perhaps I'm the only one with this issue, but my 'notify customer' and 'comments' fields will only update if I change the status at the same time. In my shop however, I would like to be able to add comments with the status set as pending. Any suggestions?


sirkyle

Share this post


Link to post
Share on other sites

Also, anyone find a solution for the blank "Choose a Product" menu on the edit orders page? I'm seeing the same thing, though I'm using an otherwise stock installation and database design.

Share this post


Link to post
Share on other sites

I would like to change how the products are selected. I want to show the model number and sort based on that number. Could someone point me in the right direction on this.


sirkyle

Share this post


Link to post
Share on other sites

Great Mod. but i have problem <_<

 

everyone seems to say that,

how can it be great in your eye when it gave you trouble :lol:

 

This is great mod and it work perfectly well for me 1st install :D. I hope the manual which is great, to be simpler so others can install it and dont need to say they run into trouble eventhough its a great mod.

 

I know the manual is easy but still something might be overlooked while installation causing all the trouble.

 

Wish you all luck at installation. This mod is wonderful.

 

Jaleel

Share this post


Link to post
Share on other sites

I just installed the mod but could not do one of the instructions. In step 4 it says

 

next find....

 

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>

 

under that add

 

<td class="dataTableContent" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_EDIT_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID='. $orders['orders_id']) . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>' ?></td>

 

but my file doesn't have that line. What does this step do? I seem to be able to edit orders ok without it.

 

Also, can some one explain how this should work in general. Let's say a customer places an order but then wants to add/delete/change an item. I can go in and do that but how will I collect payment, or apply a credit, if the amount changes?

 

Jack

Share this post


Link to post
Share on other sites

I am using 2.2 MS2

 

I have order editor installed and seems to work, except that when processing orders through the LinkPoint Credit Module, it still processes the order with the same information the customer originally entered. It updates the info in admin that I see, but processes it differently through the credit module. Also it doesn't update the quantities for the stock levels.

 

For example, I had 2 of this particular item ordered by a customer @ $2.00 each. They ordered 1 and meant to get 2 of these. I went into order editor and changed the quantity from 1 to 2. It showed:

 

2 X product @ $2.00 = $4.00

shipping $1.06

total $5.06

 

When processed it billed out as:

1 x product @$2.00 =$2.00

shipping $1.06

total $3.06

 

It also left one of them in inventory although I didn't have it on hand.

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites

Hi,

 

I'm using OSC MS1, with the randomised order number. I installed it following the instructions and changed the (int)$oID to $oID. Still I'm getting the following error:

 

1054 - Unknown column 'KW3101044' in 'field list'

 

insert into orders_products set orders_id = KW3101044, products_id = 193, products_model = 'WAG311', products_name = 'Netgear 802.11g 108Mbps Triband PCI Card WAG311', products_price = '163.6364', final_price = '163.6364', products_tax = '10', products_quantity = 1;

 

[TEP STOP]

 

 

Also if I try to amend an order to add another product, after I choose the category in the first drop down box, the second drop down box has a number of blank lines before I see a few products displayed down the bottom.

 

Please help!

Share this post


Link to post
Share on other sites
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.

 

mods.gif

 

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.

 

Any chance of getting the code you have shown in your image here that gives those status flags? Also including the javascript for the comments would be an excellent thing to get a hold of.

 

And what mod are you running that gives you a specific tracking number field?

 

Great work.

Edited by DS_Sultan

If at first you don't succeed! Erase all evidence that you tried!

The higher... the fewer...

Share this post


Link to post
Share on other sites

Hi,

 

thanks for edit orders contrib!

 

I had some problems with tax (sub_total without tax after updating orders and wrong/no tax calculation for shipping) even with a version including the "special tax features". I managed to solve that for my situation, if anyone is still interested I will try to make it available somehow.

 

I got two problems left:

 

1) the edit orders contrib never seems to use the "special price", I tried to figure out how to make it use the special price of a product but no succes yet. :( Any ideas anyone how to fix it, or where to start to fix it?

 

2) Often after editting an order one or two cents are added or missing. Has to do with tax (maybe I have a solution, have to test some more first). I haven't seen anyone else reporting the cents problem in this thread, am I the only one (probably only happens for including tax shops)?

Edited by paulm2003

Share this post


Link to post
Share on other sites
2) Often after editting an order one or two cents are added or missing. Has to do with tax (maybe I have a solution, have to test some more first). I haven't seen anyone else reporting the cents problem in this thread, am I the only one (probably only happens for including tax shops)?

Okay, found a solution for the cents problem myself.

 

The including tax version of edit order I use ( http://www.oscommerce.com/community/contributions,1435 )

has a rounding problem. The product prices shown without tax are rounded to only 2 decimals :o . The problem is that edit orders also calculates with this, far too much, rounded value and even stores it to the database!!!

 

example:

 

a certain products price is 16.00 euro inc tax (= about 13.4453 ex)

edit_orders uses a two decimals rounded value: 13.45 ex.

during order update it calculates: 13.45x1.19 (Dutch tax is 19%)=16.0055

So the outcome will be rounded to 16.01 euro!

 

I made the following changes and it seems to work fine:

(in "my" version line 819, but it might be different for yours)

                     '            <td class="' . $RowStyle . '" align="right" valign="top">' . "<input name='update_products[$orders_products_id][final_price]' size='5' value='" . number_format($order->products[$i]['final_price'], 2, '.', '') . "'>" . '</td>' . "\n" .

changed to:

                     '            <td class="' . $RowStyle . '" align="right" valign="top">' . "<input name='update_products[$orders_products_id][final_price]' size='5' value='" . number_format($order->products[$i]['final_price'], 6, '.', '') . "'>" . '</td>' . "\n" .

(watch number_format values)

 

I changed the decimal places from 2 to 6, maybe 4 or 5 is enough too.

 

It works fine for me now (only tested on a few orders but the error like the example above certainly is gone), there might be an even better/nicer solution of course.

 

Now who is going to fix the special price issue? :)

Share this post


Link to post
Share on other sites

Did anyone ever figure out with this why the "Suburb" field empties when the order is updated?

 

It shows up when creating the order, but if you edit and then update the suburb is gone.

 

Anyone know why?

Share this post


Link to post
Share on other sites

It was spelt "surburb" instead of "suburb"... do a search for that (I think there are 4 instances) and it works fine.

Share this post


Link to post
Share on other sites

Hi

 

I have the same problem as others, did anyone figure out how to solve the special price problem?

 

Thanks. :o

Share this post


Link to post
Share on other sites

Thanks to the authors for the useful OrderEditor v. 1.3. I'm just evaluation osCommerce to see if I can make it work for my small web site, so I don't know too much about it yet.

 

The Add Product SQL in edit_orders.php, v. 1.3, line 903 contains an error which prevents Add Product from working:

 

//#####################################
//   Get List of All Products
//#####################################

$result = tep_db_query("SELECT products_name, p.products_id, ptc.categories_name, ptc.categories_id"
   . " FROM " . TABLE_PRODUCTS . " p "
   . " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id=p.products_id"
   . " LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id=p.products_id"
   . " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id=ptc.categories_id"
   . " LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " x ON x.categories_name=ptc.categories_name"
   . " ORDER BY categories_id");

 

The immediate problem can be fixed by changing "ptc.categories_name" to "cd.categories_name". However, this query raises some questions.

 

1. Why is there a join between x.categories_name and ptc.categories_name (cd.categories_name) at all?

 

2. Why aren't pd and cd constrained as to language (language_id = $languages_id)?

 

3. Is it permitted to have a product with no name? If not, why use an outer join between pd.products_id and p.products_id?

 

4. Is it permitted to have a category with no name? If not, why use an outer join between cd.categories_id and ptc.categories_id?

 

5. Is it permitted to have a product not in any category? (It can be done, but the product can't be reached on the order page, etc.) If not, then why use an outer join between p.products_id and ptc.products_id?

 

Does anyone know where to find more information about the intended semantics of the database schema? I have the tep_database-pr2.2-CVS.pdf schema, for which I am very grateful, but it doesn't say just how the category-product intersection table can be used.

 

The following query produces similar results, with far fewer rows to be filtered by the ensuing loop.

 

$result = tep_db_query("SELECT products_name, p.products_id,      cd.categories_name, ptc.categories_id"
   . " FROM " . TABLE_PRODUCTS . " p, "
   . TABLE_PRODUCTS_DESCRIPTION . " pd, "
   . TABLE_PRODUCTS_TO_CATEGORIES . " ptc, "
   . TABLE_CATEGORIES_DESCRIPTION . " cd "
   . " WHERE pd.products_id = p.products_id "
   . " AND ptc.products_id = p.products_id "
   . " AND cd.categories_id = ptc.categories_id "
   . " AND cd.language_id = '" . (int)$languages_id . "'"
   . " AND pd.language_id = '" . (int)$languages_id . "'"
   . " ORDER BY ptc.categories_id, p.products_id");

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

×