Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

Order Editor 5.0 does not use a file called oe_order.php. The order class file used by 5.0 is stored at admin/order_editor/order.php.

 

You should revert back to the files you had before you made these changes and make sure everything works properly then. Once you have stable code working you can try again to get this contribution integrated.

 

 

sorry my fault....the file i made the changes to was admin/order_editor/order.php and /admin/order_editor.php this is what i did.

 

i installed a new copy of osc.. i installled the contrib for invoice. tested and everything was working fine. then i instaled order editor v5 and all the bug fixes.

 

these are the changes i made.

 

i copied 'orders_numero_facture' => $order['orders_numero_facture'],

to admin /order_editor/order.php around line 54 right before 'last_modified' => $order['last_modified'].

 

then in admin/order_editor.php i changed

 

$check_status_query = tep_db_query("

SELECT customers_name, customers_email_address, orders_status, date_purchased

FROM " . TABLE_ORDERS . "

WHERE orders_id = '" . (int)$oID . "'");

 

 

to

 

$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased, orders_numero_facture from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

 

 

i copied this

 

// modif facture xawaks

 

if(!empty($_POST["orders_numero_facture"])) {

$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); // je prépare mon ID de commande

$orders_numero_facture = tep_db_prepare_input($HTTP_POST_VARS['orders_numero_facture']); // je prépare mon numéro de facture

tep_db_query(" update " . TABLE_ORDERS . " set orders_numero_facture = '" . tep_db_input($orders_numero_facture) . "', last_modified = now() where orders_id = '" . tep_db_input($oID) . "'"); // je met à jour ma table

}

 

// modif facture xawaks

 

 

affter the // currecies drop-down array funtion line 628.

 

lastly i copied this so it it appears after the comment box in order_editor. .

 

<!-- modif facture xawaks //-->

<tr>

<td class="main"><br><b><?php echo TABLE_HEADING_NUMERO_FACTURE; ?></b> <?php echo $order->info['orders_numero_facture']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"> <FORM method="POST"><input name="orders_numero_facture"><input type="Submit" value="OK"></FORM></td>

</tr>

<!-- modif facture xawaks //-->

right after the final

 

 

i also copied define('TABLE_HEADING_NUMERO_FACTURE', 'Invoice Number : '); in to admin/includes/languages/english/order_edit.php.

 

the contrib it self is very small.. it doesnt ask for too many changes. i think i am copying the stuff to the wrong files. but the functions that the contrib asks me to change , i have changed them as shown above. i got a feeling that the last two bits that i copy to /admin/order_editor.php are causing the problem but not sure ?

 

Now i get to see the invoice box but when i click on ok to save the invoice number it doesnt save it and the button in comment box labelled "submit new comments and /or status" doesnt work, as when i click on it nothing happens. if i remove the changes from the /admin/order_editor.php then the button works.

 

 

i appreciate your help on this..

 

nafri

Share this post


Link to post
Share on other sites
sorry my fault....the file i made the changes to was admin/order_editor/order.php and /admin/order_editor.php this is what i did.

 

i installed a new copy of osc.. i installled the contrib for invoice. tested and everything was working fine. then i instaled order editor v5 and all the bug fixes.

 

these are the changes i made.

 

the contrib it self is very small.. it doesnt ask for too many changes. i think i am copying the stuff to the wrong files. but the functions that the contrib asks me to change , i have changed them as shown above. i got a feeling that the last two bits that i copy to /admin/order_editor.php are causing the problem but not sure ?

 

Now i get to see the invoice box but when i click on ok to save the invoice number it doesnt save it and the button in comment box labelled "submit new comments and /or status" doesnt work, as when i click on it nothing happens. if i remove the changes from the /admin/order_editor.php then the button works.

 

 

i appreciate your help on this..

 

nafri

 

Part of your problem is the code

<FORM method="POST"><input name="orders_numero_facture"><input type="Submit" value="OK"></FORM>

 

That code is contained inside the form "edit_order" and that is why the buttons don't work- you can't have a form inside another form (forms can't be nested).

Edited by djmonkey1

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.

Share this post


Link to post
Share on other sites
Part of your problem is the code
<FORM method="POST"><input name="orders_numero_facture"><input type="Submit" value="OK"></FORM>

 

That code is contained inside the form "edit_order" and that is why the buttons don't work- you can't have a form inside another form (forms can't be nested).

 

 

thnaks dude..

 

i changed the form to this and it seems to work..

<tr>

<td class="main"><?php echo TABLE_HEADING_NUMERO_FACTURE; ?></td>

<td class="main"><input name="orders_numero_facture" size="32" value="<?php echo $order->info['orders_numero_facture']; ?>" onChange="updateOrdersField('orders_numero_facture', encodeURIComponent(this.value))"></td>

</tr>

 

thanks for your help :thumbsup:

Share this post


Link to post
Share on other sites

Just a quick note to let everyone know that I am working on the final release of 5.0 however I have no ETA as of yet.

 

Due to the dearth of bug reports from BETA 1, I'm skipping BETA 2 and going straight to the final release. At this point I'm thinking that either not many people are using it or the bugs already fixed are the big ones.

 

As mentioned in the previously stated plans for the now defunct BETA 2, the final release will have bug fixes as necessary, an Add a Product function that works without JavaScript, cleaned up and streamlined AJAX code, the ability to toggle the AJAX features on/off via admin, and as always will contain all source code or your money back!

 

If you have any comments, suggestions, bug reports, feature requests, gripes, etc, please don't hesitate to post here.


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.

Share this post


Link to post
Share on other sites
Just a quick note to let everyone know that I am working on the final release of 5.0 however I have no ETA as of yet.

 

Due to the dearth of bug reports from BETA 1, I'm skipping BETA 2 and going straight to the final release. At this point I'm thinking that either not many people are using it or the bugs already fixed are the big ones.

 

As mentioned in the previously stated plans for the now defunct BETA 2, the final release will have bug fixes as necessary, an Add a Product function that works without JavaScript, cleaned up and streamlined AJAX code, the ability to toggle the AJAX features on/off via admin, and as always will contain all source code or your money back!

 

If you have any comments, suggestions, bug reports, feature requests, gripes, etc, please don't hesitate to post here.

 

 

hi

 

i am using beta1 with all the bug fixes.. tested it for a while on my test machine and everything is okay.. will u be including easy upgrade path from beta 1 with all bug fixes... to final release..

 

ta

Share this post


Link to post
Share on other sites
Ok I got all that sorted out with the width and hard code those descriptions for my pay-pal and made a new language define for my admin side and it's good to go now.

 

Now for my next question.....

 

1. Where do you enter the credit card information. I see where you select the payment module and the process the order in step 4, but I do not see where or how to enter cc number etc or does this contribution not do this?

 

2. I am not getting real time shipping quotes so can some advise me what I need to look into to get this to work. I am using UPS Choice and USPS XML for my shipping modules.

 

-Thanks

 

Anyone have any advice or information for me on this?

 

-Thanks


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
hi

 

i am using beta1 with all the bug fixes.. tested it for a while on my test machine and everything is okay.. will u be including easy upgrade path from beta 1 with all bug fixes... to final release..

 

ta

 

The only difference between Beta 1 with bugfixes and the final release will be the non-javascript/non-ajax features and cleaner code. Whether or not you feel the upgrade path will be easy depends on your definition of "easy"- i.e., I'll think it's easy, but then again I work with these files almost every day.


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.

Share this post


Link to post
Share on other sites
The only difference between Beta 1 with bugfixes and the final release will be the non-javascript/non-ajax features and cleaner code. Whether or not you feel the upgrade path will be easy depends on your definition of "easy"- i.e., I'll think it's easy, but then again I work with these files almost every day.

 

A built in payment module would be awesome, Im working on a form of that now that is intigrated into order editor 5 but I have run into some roadblocks.

Share this post


Link to post
Share on other sites
A built in payment module would be awesome, Im working on a form of that now that is intigrated into order editor 5 but I have run into some roadblocks.

 

i have it working for order editor 4.0 but it will require some modification of payment modules.. for one each payment module needs to be copied over.. all the redirects in the payment modules need to point to the order editor.. and the main problem is when the information is submitted to the payment service.. where do they return to.. well the way to do this is just have them return to the checkout_process.php ... and modify order editor so that an extra value is forwarded identifying it as an admin payment submission.. when its returned to checkout_process.php .. then check to see if its an admin submission.. if it is do the work necessary.. and if not then continue as normal..

 

it works but im pretty sure im not going to bother releasing it with version 4.0.. v5 is better and once djmonkey comes out with the final version .. payment module support can be easily added in the same fashion that ive added it.. works just fine too..

Share this post


Link to post
Share on other sites

So this means that you can't process orders with this contribution as far as payment goes correct? If so where do you enter the Credit Card information?

 

-Thanks


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
So this means that you can't process orders with this contribution as far as payment goes correct? If so where do you enter the Credit Card information?

 

-Thanks

 

 

there is no real-time payment processing in the uploaded version of 4.0.2 or 5.0 as far as I know..

 

i havent installed 5.0 yet.. but im sure you need to have a payment module installed.. then you just select it from the drop down.. your credit card information boxes should popup.. but djmonkey would know better

Share this post


Link to post
Share on other sites
So this means that you can't process orders with this contribution as far as payment goes correct? If so where do you enter the Credit Card information?

 

-Thanks

 

There should at least be boxes to enter credit card information (card type, card number, etc) on the edit_orders.php page underneath the payment method dropdown. They appear when you select whatever is the pre-selected credit card payment option on your site. Check the information icon tooltip next to "Payment Method" on edit_orders.php for more information.


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.

Share this post


Link to post
Share on other sites

Ok cool I see the CC Info fields now. I just didn't have them set in my store configuration. I use Authorize.net and it was set to CC. So let me make sure I have this right. This will just store the credit card information it won't actually process it? I know their is a check box in step 4 that says "Finalize Order (Process Payment): " but it won't actually process that through the module will it, or do I need to manually run it through my payment gateway?

 

Also I am still not getting anything for shipping. I check the box "Request Real-Time Shipping Quotes:" then hit update and nothing happens, no quotes no drop down box, nothing and I have it set to true in my store configuration to show it. Also their is an item added to the order. I am using UPS Choice 1.8 and USPS XML. Is their something I need to do to get it working or need to look at?

 

-Thanks


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
your missing a bug fix..

 

find this around line 568

 

								$shipping = array('id' => $shipping,
								'title' => ($quotes[$i]['module'] . ' (' . $quotes[$i]['methods'][$j]['title'] . ')'),
								'cost' => $quotes[$i]['methods'][$j]['cost']);

							$Query = "UPDATE " . TABLE_ORDERS_TOTAL . " SET
								title = '" . $shipping['title'] . "'
								WHERE class = 'ot_tax'
								AND orders_id = '" . (int)$oID . "'";
							tep_db_query($Query);

 

see this line

 

WHERE class = 'ot_tax' ..

 

it should be

 

WHERE class = 'ot_shipping' ..

 

you may also be missing it a little further below

 

around line 600 find

 

						if ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping) {
						$shipping = array('id' => $shipping,
							'title' => ($quotes[$i]['module'] . ' (' . $quotes[$i]['methods'][$j]['title'] . ')'),
							'cost' => $quotes[$i]['methods'][$j]['cost']);

						$Query = "UPDATE " . TABLE_ORDERS_TOTAL . " SET
							title = '" . $shipping['title'] . "'
							WHERE class = 'ot_tax'
							AND orders_id = '" . (int)$oID . "'";
						tep_db_query($Query);
					}

 

change the same line as above

 

either you have to change both or just one..

 

also make sure you added in the missing javascript function.. it was posted i believe on page 108 or 109 ..

 

J

 

 

I have this same issue where the tax shows at first when I first go to the edit_orders.php page but then when I hit update it disappears and the totals are calulated as if there was never tax.

 

Also, when I create an order (manually) and then add products to the order....if the product has tax the tax is not shown in the '4. Discount, Shipping, and Total' section.

 

I also checked to make sure that javascript function is there...and it was.

 

PS. I installed 4.0.2 version.

 

Please help.

Share this post


Link to post
Share on other sites

Yea I just noticed I am having the same problem as above. I am using 4.0.2 and it sees that a lot of my problems could be fixed with 5.0 so how stable is 5.0 for live production?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Yea I just noticed I am having the same problem as above. I am using 4.0.2 and it sees that a lot of my problems could be fixed with 5.0 so how stable is 5.0 for live production?

 

Once the bug fixes listed in my signature have been applied 5.0 is ready to go for use on production sites. It does not have any of the "Manual Order Maker" features of 4.0, however.


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.

Share this post


Link to post
Share on other sites

Bummer because this is a great contribution, just needs a little tweaking. Any plans to merge 5.0 and the 4.0.X with the manual order maker together?

 

-Thanks


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

I just installed Order Editor v5.0 BETA 1, updating from v4.0.2 to work with Aust Postage Calculator.

The latest update (v5.0) works like a charm with Aust Post, however I am now receiving a new error.

 

Fatal error: Call to a member function on a non-object in ../httpdocs/includes/modules/order_total/ot_easy_discount.php on line 17

 

Line 17 on ot_easy_discount.php is:

 

if ($easy_discount->count() > 0) {

 

 

	function process() {
  global $order, $currencies, $ot_subtotal, $cart, $easy_discount;
  $od_amount = 0;
  if ($easy_discount->count() > 0) {
	$easy_discounts = $easy_discount->get_all();
	$n = sizeof($easy_discounts);
	for ($i=0;$i < $n; $i++) {
	   $this->output[] = array('title' => $easy_discounts[$i]['description'].': ',
							   'text' => '<font color="red">-' . $currencies->format($easy_discounts[$i]['amount']).'</font>',
							   'value' => $easy_discounts[$i]['amount']);
	   $od_amount = $od_amount + $easy_discounts[$i]['amount'];
	}
	$this->deduction = $od_amount;
  $order->info['total'] = $order->info['total'] - $od_amount;
	if ($this->sort_order < $ot_subtotal->sort_order) $order->info['subtotal'] = $order->info['subtotal'] - $od_amount;
  }
}

 

I am running the latest version of Easy Discount from http://www.oscommerce.com/community/contributions,3945

 

In a search for an answer (before posting here), I have searched through the forums, and even google to try working out how to fix this problem. It appears when I try to edit an order.

 

Not sure if this helps, the error displays where the postage options should be located

edit-order-error.jpg

 

I have also tried to do the recommended changes in http://forums.oscommerce.com/index.php?sho...p;#entry1110856

 

Thanks!

Lau

Edited by echolalia

Share this post


Link to post
Share on other sites

I just installed a fresh version of rc-1 for oscommerce and installed the order edit 4.02 suggested under the contribution.

 

I installed the SQL and replaced all of the files from rc-1 with the ones for the order edit 4.02 alpha, as suggested.

 

When I click on the "edit" button, I get a blank page. When I click on "details" for an order, I get the following messages att he top of the page

 

1146 - Table 'mydatabase.TABLE_MONERIS_ORDERIDS' doesn't exist

 

select moneris_orderid from TABLE_MONERIS_ORDERIDS where orders_id = 2

 

[TEP STOP]

 

In addition, the credit card number does not appear.

 

Does anyone know where this might be coming from and how I can correct it?

 

Thanks!

 

Mike

:'(

Share this post


Link to post
Share on other sites
I just installed a fresh version of rc-1 for oscommerce and installed the order edit 4.02 suggested under the contribution.

 

I installed the SQL and replaced all of the files from rc-1 with the ones for the order edit 4.02 alpha, as suggested.

 

When I click on the "edit" button, I get a blank page. When I click on "details" for an order, I get the following messages att he top of the page

 

1146 - Table 'mydatabase.TABLE_MONERIS_ORDERIDS' doesn't exist

 

select moneris_orderid from TABLE_MONERIS_ORDERIDS where orders_id = 2

 

[TEP STOP]

 

In addition, the credit card number does not appear.

 

Does anyone know where this might be coming from and how I can correct it?

 

Well, I am following up to my own post. Seems there are refences to some code labeled as "MONERIS CODE" in orders.php to start with.

 

I am also getting an error to a non-existent class in includes/classes/shipping.php (on the catalog side, not the admin side).....

 

Are there some errors in 4.02 or something I was supposed to install before fresh-installing rc1 and this?

 

Thanks,

 

Mike

Share this post


Link to post
Share on other sites
Well, I am following up to my own post. Seems there are refences to some code labeled as "MONERIS CODE" in orders.php to start with.

 

I am also getting an error to a non-existent class in includes/classes/shipping.php (on the catalog side, not the admin side).....

 

Are there some errors in 4.02 or something I was supposed to install before fresh-installing rc1 and this?

 

Thanks,

 

Mike

 

Hey Mike,

 

Had the same problem when i installed 4.02, after some research i found the SQL tables you need to insert into the database (remember reading it somewhere on the forums).

 

Here is the code

 

DROP TABLE IF EXISTS moneris_orderids;# MySQL returned an empty result set (i.e. zero rows).

CREATE TABLE moneris_orderids (
moneris_orderid varchar(99) NOT NULL,
orders_id int NOT NULL,
response_variables BLOB NOT NULL,
PRIMARY KEY (orders_id, moneris_orderid),
KEY idx_moneris_orderids_orders_id (orders_id)
);# MySQL returned an empty result set (i.e. zero rows).

 

 

Hope this help!

[edit: inserted the code incorrectly]

Edited by echolalia

Share this post


Link to post
Share on other sites
I have this same issue where the tax shows at first when I first go to the edit_orders.php page but then when I hit update it disappears and the totals are calulated as if there was never tax.

 

Also, when I create an order (manually) and then add products to the order....if the product has tax the tax is not shown in the '4. Discount, Shipping, and Total' section.

 

I also checked to make sure that javascript function is there...and it was.

 

PS. I installed 4.0.2 version.

 

Please help.

 

I've applied those changes as insani posted (only had missed one) and that made the tax show up but pressing update still makes the tax get deleted. For some reason that line is not getting added into the total and it is removing it from the database or overwriting it in the database! I've reverted back out the modification and am hoping that an update to either 4 or 5 comes out solid with bug fixes already completed in the package because i'm working with a live server and don't want to take down the site on accident. Thanks for the hard work you guys do for these great contribs.

Share this post


Link to post
Share on other sites
I just installed Order Editor v5.0 BETA 1, updating from v4.0.2 to work with Aust Postage Calculator.

The latest update (v5.0) works like a charm with Aust Post, however I am now receiving a new error.

 

I am running the latest version of Easy Discount from http://www.oscommerce.com/community/contributions,3945

 

In a search for an answer (before posting here), I have searched through the forums, and even google to try working out how to fix this problem. It appears when I try to edit an order.

 

Not sure if this helps, the error displays where the postage options should be located

 

I have also tried to do the recommended changes in http://forums.oscommerce.com/index.php?sho...p;#entry1110856

 

Thanks!

Lau

 

The non-object is $easy_discount. The member functions in this case would be ->count() and ->get_all(). You would have to re-create the $easy_discount class within Order Editor to get this to work; there are general instructions on how to do this included install.txt file that comes with the Easy Discount contribution.

 

It is possible that this is all you have to do: in admin/edit_orders.php find near the top of the file find

require(DIR_FS_DOCUMENT_ROOT . DIR_WS_CLASSES . 'http_client.php');

then, on a new line immediately below that one, add this code:

require(DIR_FS_DOCUMENT_ROOT . DIR_WS_CLASSES . 'easy_discount.php');

Next, perform that exact same procedure within admin/edit_orders_ajax.php.

 

Make sure you get all the bug fixes listed in my signature.


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.

Share this post


Link to post
Share on other sites
I've applied those changes as insani posted (only had missed one) and that made the tax show up but pressing update still makes the tax get deleted. For some reason that line is not getting added into the total and it is removing it from the database or overwriting it in the database! I've reverted back out the modification and am hoping that an update to either 4 or 5 comes out solid with bug fixes already completed in the package because i'm working with a live server and don't want to take down the site on accident. Thanks for the hard work you guys do for these great contribs.

 

I've never heard of anyone taking down their server by installing Order Editor, although I suppose anything is possible. If you're really that worried about it, just apply the bug fixes to the appropriate files before you upload them.


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.

Share this post


Link to post
Share on other sites

Hey Peeps. :D I'm new to this forum (I'm not a php programmer, but not a newbie either)

 

Got a quick question about Order Edit.

 

This is my senerio

 

Client wants to take orders online via oscommerce, but manually process orders over the phone with a point of sale machine.

They have a small VPN with 5 workstations taking orders via 800 #. Client does not want online transactions at this time, but will use a transactional company later. I have gone through ..I think all of the relevant posts for Order Edit versions 4 and up.. and I am a little confused.

Are there still issues with this contrib ORDER EDITOR 4.0.2 ALPHA, and what should I look out for.

Will Version 5 beta do what I need, or are there issues with that release related to what I need also?

 

I know there are people here close to the same situation as me any help to get this contrib working without errors would be great appreciated!

 

Thanks in advance

 

Thomas :)

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

×