Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

thats it exactly.. no its not used for calculations.. the tep_get_tax_rate is used for calculations.. but the function i created can be used for that I just didnt feel like doing so much recoding.. but its still perfect for having the tax descriptions seperate along with the individual tax rates..

 

Well, it should be exact, I took it whole cloth from the install instructions of your Separated Taxes Display contribution! It would've been a lot easier to just say "modify admin/order_editor/order.php however you modified catalog/includes/classes/order.php", but it got the job done. :)


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

Hi friends

 

I see you fabulous module and its very easy to install and its working fine now.

 

I see a bug in edit_orders_ajax.php file in which you not define the array i corrected it and its working fine when we we update the shipping and total amount now.

 

$oID = $_POST['oID'];

$shipping=array();

if (is_array($_POST['update_totals']))

{

foreach($_POST['update_totals'] as $total_index => $total_details)

{

extract($total_details, EXTR_PREFIX_ALL, "ot");

if ($ot_class == "ot_shipping")

{

$shipping['cost'] = $ot_value;

$shipping['title'] = $ot_title;

} // end if ($ot_class == "ot_shipping")

} //end foreach

} //end if is_array

 

I changed the code in my file now its working fine.

 

:)

Edited by dhiman_pawan

Share this post


Link to post
Share on other sites
Agreed, kang you shouldnt be having any problems at all.. it seems that contribution you added only outputs the orderid in a different way but has nothing to do with the way it is stored.. in which case it should be causing any problems at all..

however.. there may be someplace (one or more) where you are actually assigning that value to the $oID. That would definitely cause some problems..

if anywhere you have $oID = tep_trans_id($raw_date, $oID); or something to that effect.. then this would definitely cause that problem.. i would look for that..

J

 

Hey J,

Well i did have working few days ago.. but updated from your post on the 22nd, and so i worked back, thankfully i just had everything commented out i changed, and what i came up with was this section of code update.. this is giving me the error:

 

//if ($order->info['shipping_method'] == null) {

// $Query = "SELECT title FROM " . TABLE_ORDERS_TOTAL . "

// WHERE class = 'ot_shipping'

// AND orders_id = '" . (int)$oID . "'";

// $result = tep_db_query($Query);

// $row = tep_db_fetch_array($result);

 

// $order->info['shipping_method'] = $row['title'];

//}

 

when commented out again I get into the edit page no problems, but i cant see why it couldn't find the order??? getting there slowly!!!! any suggestions for this???

Share this post


Link to post
Share on other sites

Hi,

 

I have installed the new Order Editing Tool but when I click on the edit it goes to website/admin/FILENAME_ORDERS_EDIT?oID=24 (order no 24) and it says

 

404 not found

 

The requested resource could not be found.

 

also if I manually change the address to website/admin/edit_orders.php

It gives these errors:

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Fatal error: main(): Failed opening required 'includes/functions/oe_functions.php' (include_path='.:/usr/local/lib/php') in /admin/edit_orders.php on line 24

 

Could you please tell me what I did wrong? I Really appreciate your help

Edited by moradbarqi

Share this post


Link to post
Share on other sites
Interesting. Try this- in admin/edit_orders_ajax.php find at about line 154
		$order = new manualOrder($oID);


	  //this is where we call the order total modules
	 require( 'order_editor/order_total.php');
	 $order_total_modules = new order_total();
	 $order_totals = $order_total_modules->process();

and change it to

		$order = new manualOrder($oID);

	 $cart = new manualCart();
	 $cart->restore_contents($oID);
	 $total_count = $cart->count_contents();
	 $total_weight = $cart->show_weight();

	  //this is where we call the order total modules
	 require( 'order_editor/order_total.php');
	 $order_total_modules = new order_total();
	 $order_totals = $order_total_modules->process();

 

 

Yes this does get rid of the error but brings a new problem. Now when I click on a shipping option it wont show a price in the order total box where it shows shipping amound. Whateve option I choose it returns a 0.00 amount.

Share this post


Link to post
Share on other sites

djmonkey1,

 

I installed the upgrade from ORDER EDITOR 3.0.2.1 to 4.0.1.

I already had MANUAL ORDER MAKER 1.4.2, so I followed your instructions for upgrading.

 

When I go to create an order here:

 

/admin/create_order.php and select a customer, it then goes to: /admin/edit_orders.php?oID=xx but the browser window is blank.

 

 

Would anyone be willing to take a look at my code for these contribs and apply neccessary fixes? I will pay for your time. Let me know your hourly rate.

 

Scott

Share this post


Link to post
Share on other sites
djmonkey1,

 

I installed the upgrade from ORDER EDITOR 3.0.2.1 to 4.0.1.

I already had MANUAL ORDER MAKER 1.4.2, so I followed your instructions for upgrading.

 

When I go to create an order here:

 

/admin/create_order.php and select a customer, it then goes to: /admin/edit_orders.php?oID=xx but the browser window is blank.

Would anyone be willing to take a look at my code for these contribs and apply neccessary fixes? I will pay for your time. Let me know your hourly rate.

 

Scott

 

Hey Scott,

 

Actually that upgrade procedure was written by me.. if you already have Manual Order Maker 1.4.2 you still have to do a slight modification..

 

make sure you perform all the edits in the upgrade file also make sure you do all the steps in install.txt starting from step2 .. these are necessary as well..

Share this post


Link to post
Share on other sites

insaini,

 

I followed those procedures including step2.

 

Scott

 

 

 

Hey Scott,

 

Actually that upgrade procedure was written by me.. if you already have Manual Order Maker 1.4.2 you still have to do a slight modification..

 

make sure you perform all the edits in the upgrade file also make sure you do all the steps in install.txt starting from step2 .. these are necessary as well..

Share this post


Link to post
Share on other sites
Hey J,

Well i did have working few days ago.. but updated from your post on the 22nd, and so i worked back, thankfully i just had everything commented out i changed, and what i came up with was this section of code update.. this is giving me the error:

 

//if ($order->info['shipping_method'] == null) {

// $Query = "SELECT title FROM " . TABLE_ORDERS_TOTAL . "

// WHERE class = 'ot_shipping'

// AND orders_id = '" . (int)$oID . "'";

// $result = tep_db_query($Query);

// $row = tep_db_fetch_array($result);

 

// $order->info['shipping_method'] = $row['title'];

//}

 

when commented out again I get into the edit page no problems, but i cant see why it couldn't find the order??? getting there slowly!!!! any suggestions for this???

 

Kang,

 

tell me .. is this what your edit case looks like in edit_orders.php

		case 'edit':
		if (isset($_GET['oID'])) {
			if (!tep_session_is_registered('order')) {
				tep_session_register('order');
			}
			$oID = tep_db_prepare_input($_GET['oID']);
			$order = new oe_order($oID);

			if ($order->info['shipping_method'] == null) {
				$Query = "SELECT title FROM " . TABLE_ORDERS_TOTAL . "
						WHERE class = 'ot_shipping'
						AND orders_id = '" . (int)$oID . "'";
				$result = tep_db_query($Query);
				$row = tep_db_fetch_array($result);

				$order->info['shipping_method'] = $row['title'];
			}
			if (!$order->exists) {
				  $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
			}
		  }
 		break; //end case 4 (edit)

 

this is my complete edit case .. you commented that section of code in the middle out..but make sure that it looks something similar to this.. if youre missing something then thats probably why it wasnt working..

 

J

Share this post


Link to post
Share on other sites
insaini,

 

I followed those procedures including step2.

 

Scott

 

so you followed all procedures in install.txt and all procedures in the upgrade.txt file as well?

Share this post


Link to post
Share on other sites
Hi,

 

I have installed the new Order Editing Tool but when I click on the edit it goes to website/admin/FILENAME_ORDERS_EDIT?oID=24 (order no 24) and it says

 

404 not found

 

The requested resource could not be found.

 

also if I manually change the address to website/admin/edit_orders.php

It gives these errors:

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Fatal error: main(): Failed opening required 'includes/functions/oe_functions.php' (include_path='.:/usr/local/lib/php') in /admin/edit_orders.php on line 24

 

Could you please tell me what I did wrong? I Really appreciate your help

 

do you have the file oe_functions.php in your admin/includes/functions folder ?

Share this post


Link to post
Share on other sites
Interesting. Try this- in admin/edit_orders_ajax.php find at about line 154
		$order = new manualOrder($oID);


	  //this is where we call the order total modules
	 require( 'order_editor/order_total.php');
	 $order_total_modules = new order_total();
	 $order_totals = $order_total_modules->process();

and change it to

		$order = new manualOrder($oID);

	 $cart = new manualCart();
	 $cart->restore_contents($oID);
	 $total_count = $cart->count_contents();
	 $total_weight = $cart->show_weight();

	  //this is where we call the order total modules
	 require( 'order_editor/order_total.php');
	 $order_total_modules = new order_total();
	 $order_totals = $order_total_modules->process();

 

Works great...Thanks again!!

Share this post


Link to post
Share on other sites
Hi friends

 

I see you fabulous module and its very easy to install and its working fine now.

 

I see a bug in edit_orders_ajax.php file in which you not define the array i corrected it and its working fine when we we update the shipping and total amount now.

 

$oID = $_POST['oID'];

$shipping=array();

if (is_array($_POST['update_totals']))

{

foreach($_POST['update_totals'] as $total_index => $total_details)

{

extract($total_details, EXTR_PREFIX_ALL, "ot");

if ($ot_class == "ot_shipping")

{

$shipping['cost'] = $ot_value;

$shipping['title'] = $ot_title;

} // end if ($ot_class == "ot_shipping")

} //end foreach

} //end if is_array

 

I changed the code in my file now its working fine.

 

:)

 

Thank you for the bug report!


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
Hi,

 

I have installed the new Order Editing Tool but when I click on the edit it goes to website/admin/FILENAME_ORDERS_EDIT?oID=24 (order no 24) and it says

 

404 not found

 

The requested resource could not be found.

 

also if I manually change the address to website/admin/edit_orders.php

It gives these errors:

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Warning: main(includes/functions/oe_functions.php): failed to open stream: No such file or directory in /admin/edit_orders.php on line 24

 

Fatal error: main(): Failed opening required 'includes/functions/oe_functions.php' (include_path='.:/usr/local/lib/php') in /admin/edit_orders.php on line 24

 

Could you please tell me what I did wrong? I Really appreciate your help

 

You didn't follow all the install steps and you didn't upload all the necessary files. Go back over the installation instructions and ensure each step is complete.


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
Yes this does get rid of the error but brings a new problem. Now when I click on a shipping option it wont show a price in the order total box where it shows shipping amound. Whateve option I choose it returns a 0.00 amount.

 

So each quote displays an appropriate amount in the left side shipping quotes box, but you click on one and it turns the shipping value in the right side order total box to 0.00?


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
You didn't follow all the install steps and you didn't upload all the necessary files. Go back over the installation instructions and ensure each step is complete.

 

You are right. it works now. just a quick question. for shipping option I used %10 of the price up to $100 and then after $100 it is free shipping. but when I try to modify the order for example change from $120 to $90, it doesn't allow me to add the %10 shipping. even when I click on the shipping option it doesn't add automatically or even manually to the total. what should I do?

 

Thanks

Share this post


Link to post
Share on other sites
You are right. it works now. just a quick question. for shipping option I used %10 of the price up to $100 and then after $100 it is free shipping. but when I try to modify the order for example change from $120 to $90, it doesn't allow me to add the %10 shipping. even when I click on the shipping option it doesn't add automatically or even manually to the total. what should I do?

 

Thanks

 

You could add it in as a custom order total component.


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
So each quote displays an appropriate amount in the left side shipping quotes box, but you click on one and it turns the shipping value in the right side order total box to 0.00?

 

Yes, I'm having the same problem now as well.

Share this post


Link to post
Share on other sites
You are right. it works now. just a quick question. for shipping option I used %10 of the price up to $100 and then after $100 it is free shipping. but when I try to modify the order for example change from $120 to $90, it doesn't allow me to add the %10 shipping. even when I click on the shipping option it doesn't add automatically or even manually to the total. what should I do?

 

Thanks

 

 

it has been fixed. thanks for your wonderful contributions

Share this post


Link to post
Share on other sites
Does it now give you a correct price in the order total box?

 

I'm getting the correct prices in the order total box.

 

However, I'm having the issue where if you click on a shipping option on the left, the right side (order total) will display the new shipping method you selected, however the price will always be $0.

 

Also, the order totals are the correct currency (CDN), BUT the pricing for each product is in the default currency (USD). Anyone have any ideas?

Share this post


Link to post
Share on other sites
I'm getting the correct prices in the order total box.

 

However, I'm having the issue where if you click on a shipping option on the left, the right side (order total) will display the new shipping method you selected, however the price will always be $0.

 

The workaround for this problem is to type the correct amount in the box manually (it should be editable). Could you please post the HTML source for one of the table row cells from the shipping quotes box in Order Editor? It should look something like this:

<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this, 'dataTableRow')" onclick="selectRowEffect(this, 1); setShipping(1);">				   
<td class="dataTableContent" align="left" valign="top" width="15">

<input name="shipping" id="shipping_radio_1" value="flat_flat" type="radio">

<input id="update_shipping[1][title]" name="update_shipping[1][title]" value="Flat Rate (Best Way):" type="hidden">

<input id="update_shipping[1][value]" name="update_shipping[1][value]" value="5.00" type="hidden">

		 </td><td class="dataTableContent" valign="top">Flat Rate (Best Way):</td>

		 <td class="dataTableContent" align="right">$5.00</td>
			  </tr>

 

Also, the order totals are the correct currency (CDN), BUT the pricing for each product is in the default currency (USD). Anyone have any ideas?
Product prices being displayed in the default currency is normal for Order Editor since that is how they're stored in the database (standard osC procedure). They are displayed in the order currency in order emails, invoices, etc. Note that for order total fields that are editable such as shipping cost, custom, etc, the editable field shows the price in the default currency (once again, that's what is actually written to the database).

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 workaround for this problem is to type the correct amount in the box manually (it should be editable). Could you please post the HTML source for one of the table row cells from the shipping quotes box in Order Editor?

 

Here is the HTML that is being rendered:

                 <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this, 'dataTableRow')" onClick="selectRowEffect(this, 1); setShipping(1);">                    <td class="dataTableContent" valign="top" align="left">
		 <script language="JavaScript" type="text/javascript">
                  <!--
                   document.write("<input type=\"radio\" name=\"shipping\" id=\"shipping_radio_1\" value=\"upsxml_UPS Standard\">");
               //-->
                 </script>

		 <input type="hidden" id="update_shipping[1][title]" name="update_shipping[1][title]" value="United Parcel Service (XML) (1 pkg, 1 lbs total) (UPS Standard, <acronym title='Estimated Delivery Date'>EDD</acronym>: July 27, 2007):">
		 <input type="hidden" id="update_shipping[1][value]" name="update_shipping[1][value]" value="9.72">
                   <td class="dataTableContent" valign="top">United Parcel Service (XML) (1 pkg, 1 lbs total) (UPS Standard, <acronym title='Estimated Delivery Date'>EDD</acronym>: July 27, 2007):</td>
                   <td class="dataTableContent" align="right">$10.79</td>
                 </tr> 

 

Product prices being displayed in the default currency is normal for Order Editor since that is how they're stored in the database (standard osC procedure). They are displayed in the order currency in order emails, invoices, etc. Note that for order total fields that are editable such as shipping cost, custom, etc, the editable field shows the price in the default currency (once again, that's what is actually written to the database).

 

Humm, very good point...of course I just made that change, backing it out now. Thanks :)

Share this post


Link to post
Share on other sites
Here is the HTML that is being rendered:

                 <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this, 'dataTableRow')" onClick="selectRowEffect(this, 1); setShipping(1);">                    <td class="dataTableContent" valign="top" align="left">
		 <script language="JavaScript" type="text/javascript">

                 </script>

		 <input type="hidden" id="update_shipping[1][title]" name="update_shipping[1][title]" value="United Parcel Service (XML) (1 pkg, 1 lbs total) (UPS Standard, <acronym title='Estimated Delivery Date'>EDD</acronym>: July 27, 2007):">
		 <input type="hidden" id="update_shipping[1][value]" name="update_shipping[1][value]" value="9.72">
                   <td class="dataTableContent" valign="top">United Parcel Service (XML) (1 pkg, 1 lbs total) (UPS Standard, <acronym title='Estimated Delivery Date'>EDD</acronym>: July 27, 2007):</td>
                   <td class="dataTableContent" align="right">$10.79</td>
                 </tr> 

 

 

 

Humm, very good point...of course I just made that change, backing it out now. Thanks :)

 

Does the problem only affect UPS XML quotes? Do you have other shipping modules you can test with it? What browser and OS are you using?


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
Does the problem only affect UPS XML quotes? Do you have other shipping modules you can test with it? What browser and OS are you using?

 

 

It also has same problem with flat rate. using IE7 and Firefox

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

×