Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

I had 4.0.2 and just installed 5.0 over it. I left manual order maker installed. BUT... I did have to undo some of the 4.0.2 from some of the files (example: I had to remove shipping_method and handling_fee from some queries.) There weren't too many of these. Afterwards 5.0 seems to work very well...AND with manual order maker. I wish I documented the changes and I would have shared. I'm a programmer so it was fairly simple. But for a non-programmer it might not. HINT: Install 5.0 over 4.0.2 > You will then see some of the errors > Look back at the 4.0.2 install file and simply undo the changes to the files.

 

I went ahead last night and just installed it over 4.0.2 and then installed manual order maker. I did see the queries I needed to remove as I got an error from them. I just wanted to make sure because I hate leaving any unneeded files and database entries in tact if that are not going to be used that might cause problems down the road, ya know what I mean? Everything seems to be working flawlessly at the moment.

 

5.0 looks really sharp, you did a god job on that DJmonkey1


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 am having an issue, can someone help?

 

I installed and updated all the files, and when I go to click edit, i receive this error:

 

Warning: main(http://www.2reachamillion.com/includes/classes/http_client.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Warning: main(http://www.2reachamillion.com/includes/classes/http_client.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Fatal error: main() [function.require]: Failed opening required 'http://www.2reachamillion.com/includes/classes/http_client.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Any help would be greatly appreciated!

 

Thanks!

Share this post


Link to post
Share on other sites
I am having an issue, can someone help?

 

I installed and updated all the files, and when I go to click edit, i receive this error:

 

Warning: main(http://www.2reachamillion.com/includes/classes/http_client.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Warning: main(http://www.2reachamillion.com/includes/classes/http_client.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Fatal error: main() [function.require]: Failed opening required 'http://www.2reachamillion.com/includes/classes/http_client.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dayfallm/public_html/2reachamillion/admin/edit_orders.php on line 35

 

Any help would be greatly appreciated!

 

Thanks!

It sounds like you have bad settings on your server or a problem with your configuration file. If you get a 403 forbidden error when loading files from the catalog side into the admin side, then how can you install or modify payment or shipping modules? In the event that your server settings are correct, I would look at your configure file admin/includes/configure.php, specifically the settings DIR_FS_DOCUMENT_ROOT and DIR_WS_CLASSES. However, it seems like if either/both of those were incorrect you would be having other problems. Also look at your SSL settings in the configure file, etc.

 

That being said, you can try this: copy the file catalog/includes/classes/http_client.php into the folder admin/order_editor (do not delete the file from it's original folder, you will still need it there).

 

Then in each of the two files admin/edit_orders.php and admin/edit_orders_ajax.php find the following code:

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

and change each instance (it should only occur once per file) to

require('order_editor/http_client.php');

Please let us know how this goes; if your settings and configuration are otherwise correct, I may start including the http_client file with future releases to prevent this from happening again.


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
Thank you, let me know if a solution was found...

 

 

It happens in Opera too. I'm going to have to chew on this one for a while....


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
It sounds like you have bad settings on your server or a problem with your configuration file. If you get a 403 forbidden error when loading files from the catalog side into the admin side, then how can you install or modify payment or shipping modules? In the event that your server settings are correct, I would look at your configure file admin/includes/configure.php, specifically the settings DIR_FS_DOCUMENT_ROOT and DIR_WS_CLASSES. However, it seems like if either/both of those were incorrect you would be having other problems. Also look at your SSL settings in the configure file, etc.

 

That being said, you can try this: copy the file catalog/includes/classes/http_client.php into the folder admin/order_editor (do not delete the file from it's original folder, you will still need it there).

 

Then in each of the two files admin/edit_orders.php and admin/edit_orders_ajax.php find the following code:

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

and change each instance (it should only occur once per file) to

require('order_editor/http_client.php');

Please let us know how this goes; if your settings and configuration are otherwise correct, I may start including the http_client file with future releases to prevent this from happening again.

 

This worked, and fixed the issue, except now I am receiving:

Fatal error: Call to undefined function: get_shiptotal() in /home/dayfallm/public_html/2reachamillion/includes/modules/shipping/indvship.php on line 53

 

Any idea of how to circumvent that?

Share this post


Link to post
Share on other sites
This worked, and fixed the issue, except now I am receiving:

Fatal error: Call to undefined function: get_shiptotal() in /home/dayfallm/public_html/2reachamillion/includes/modules/shipping/indvship.php on line 53

 

Any idea of how to circumvent that?

 

I had install the newest version of order editor, showing the same problem with "dayswillfall", but fixed with instruction provide by DJ. Thanks you!

Share this post


Link to post
Share on other sites
Is there a way to make the Card type a drop down box in version 5.0?

 

 

heh figures a couple minutes after i post this i get it working ;). I do have a legit question though. is there a way, when selecting products to block categorys and products from being displayed? Example. i have cat a-b-c-d, but i only want cat a-c-d to show up.

Share this post


Link to post
Share on other sites
This worked, and fixed the issue, except now I am receiving:

Fatal error: Call to undefined function: get_shiptotal() in /home/dayfallm/public_html/2reachamillion/includes/modules/shipping/indvship.php on line 53

 

Any idea of how to circumvent that?

 

This file indvship.php uses the function get_shiptotal(); you have to find where that function is defined on the catalog side and then add it to admin/order_editor/functions.php.


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
heh figures a couple minutes after i post this i get it working ;) . I do have a legit question though. is there a way, when selecting products to block categorys and products from being displayed? Example. i have cat a-b-c-d, but i only want cat a-c-d to show up.

 

You can find the queries for the add a product function in edit_orders_add_product.php after the line

// Generate product list based on chosen category or search keywords

 

There are a couple different queries there, just drop in code that excludes whatever category you don't want to see.


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
This file indvship.php uses the function get_shiptotal(); you have to find where that function is defined on the catalog side and then add it to admin/order_editor/functions.php.

 

I found this in catalog/includes/classes.php

//start indvship
function get_shiptotal() {
  global $cart, $order;
  $this->shiptotal = '';
  $products = $cart->get_products();
  for ($i=0, $n=sizeof($products); $i<$n; $i++) {
	if (tep_not_null($products[$i]['products_ship_price'])) {
	  $products_ship_price = $products[$i]['products_ship_price'];
	  $products_ship_price_two = $products[$i]['products_ship_price_two'];
	  $products_ship_zip = $products[$i]['products_ship_zip'];
	  $qty = $products[$i]['quantity'];
	  if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){
		$this->shiptotal += ($products_ship_price);
		if ($qty > 1) {
		  if (tep_not_null($products_ship_price_two)) {
			$this->shiptotal += ($products_ship_price_two * ($qty-1));
		  } else {
			$this->shiptotal += ($products_ship_price * ($qty-1));
		  }
		}/////////////NOT HERE <<------------
	  }
	}
  }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN/////////////move back here <<------------
  if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) {
	if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') {
	  $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE;
	} else {
	  $this->shiptotal += INDIVIDUAL_SHIP_INCREASE *  $this->get_indvcount();
	}
	return $this->shiptotal;
	// not sure why this is needed, but it now works correctly for home country - by Ed
  } else {
	   $this->shiptotal *= 1;
	 return $this->shiptotal;
  }
}

 

I am an absolutely idiot when it comes to PHP, and really have no clue what Im looking at, but I figure thats the function you were talking about.

However, when I copy and paste it into the functions.php for Order Editor, nothing happens - i get the same error:

 

Fatal error: Call to undefined function: get_shiptotal() in /home/dayfallm/public_html/2reachamillion/includes/modules/shipping/indvship.php on line 53

 

I really wish I knew PHP enough to get around, but unfortunately all my experience is in design and css. Any further help is of course greatly appreciated.

Share this post


Link to post
Share on other sites

Hi

I get this error when i try to update the order

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Gate Ct.', customers_suburb = '', customers_city =

 

Anyone know how to fix this

 

Thanks

Tom

Share this post


Link to post
Share on other sites
You can find the queries for the add a product function in edit_orders_add_product.php after the line
// Generate product list based on chosen category or search keywords

 

There are a couple different queries there, just drop in code that excludes whatever category you don't want to see.

 

 

okay i was able to exclude the products from the page but i cannot find where it looks for the categorys. the only refference i doulc find was here

 

  $category_array = array(array('id' => '', 'text' => TEXT_SELECT_CATEGORY),
					  array('id' => '0', 'text' => TEXT_ALL_CATEGORIES));

 

 

so where can i find the query that $category_array is calling? i searched in the files the Oeditor calls but did not find it.

Share this post


Link to post
Share on other sites
Hi

I get this error when i try to update the order

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's Gate Ct.', customers_suburb = '', customers_city =

 

Anyone know how to fix this

 

Thanks

Tom

 

What version of Order Editor are you using?

 

What are you trying to do when you see this error?

 

Does this happen on every order you try to edit?


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 found this in catalog/includes/classes.php

 

I am an absolutely idiot when it comes to PHP, and really have no clue what Im looking at, but I figure thats the function you were talking about.

However, when I copy and paste it into the functions.php for Order Editor, nothing happens - i get the same error:

 

Fatal error: Call to undefined function: get_shiptotal() in /home/dayfallm/public_html/2reachamillion/includes/modules/shipping/indvship.php on line 53

 

I really wish I knew PHP enough to get around, but unfortunately all my experience is in design and css. Any further help is of course greatly appreciated.

 

Are you sure you uploaded the modified file? If that function is defined on the admin side it's pretty bizarre that the PHP would declare it to be undefined.


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
What version of Order Editor are you using?

 

What are you trying to do when you see this error?

 

Does this happen on every order you try to edit?

 

I believe it 2.84

im trying to delete an item order and relpace it for a different one..

 

Thanks

Share this post


Link to post
Share on other sites
Are you sure you uploaded the modified file? If that function is defined on the admin side it's pretty bizarre that the PHP would declare it to be undefined.

 

Yes, i made sure twice, and checked the file after I uploaded.

 

Any other suggestions? I could PM you with my ftp info?

 

This is pretty much the last component that I need working, and its a godsend of a component...i just need to have it working with the individual shipping function.

Share this post


Link to post
Share on other sites
Yes, i made sure twice, and checked the file after I uploaded.

 

Any other suggestions? I could PM you with my ftp info?

 

This is pretty much the last component that I need working, and its a godsend of a component...i just need to have it working with the individual shipping function.

 

1. Undo the change you made to admin/order_editor/functions.php.

 

2. Open admin/order_editor/shipping.php and find the following line of code:

    //start indvship
   function get_shiptotal() {
     global $cart, $order;
     $this->shiptotal = '';
     $products = $cart->get_products();
     for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       if (tep_not_null($products[$i]['products_ship_price'])) {
         $products_ship_price = $products[$i]['products_ship_price'];
         $products_ship_price_two = $products[$i]['products_ship_price_two'];
         $products_ship_zip = $products[$i]['products_ship_zip'];
         $qty = $products[$i]['quantity'];
         if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){
           $this->shiptotal += ($products_ship_price);
           if ($qty > 1) {
             if (tep_not_null($products_ship_price_two)) {
               $this->shiptotal += ($products_ship_price_two * ($qty-1));
             } else {
               $this->shiptotal += ($products_ship_price * ($qty-1));
             }
           }//
         }
       }
     }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN
     if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) {
       if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') {
         $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE;
       } else {
         $this->shiptotal += INDIVIDUAL_SHIP_INCREASE *  $this->get_indvcount();
       }
       return $this->shiptotal;
     }
   }

   function get_indvcount() {
     global $cart;
     $this->indvcount = '';
     $products = $cart->get_products();
     for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       if (tep_not_null($products[$i]['products_ship_price'])) {
         $products_ship_price = $products[$i]['products_ship_price'];//}
         $products_ship_price_two = $products[$i]['products_ship_price_two'];
         if(is_numeric($products_ship_price)){
           $this->indvcount += '1';
         }
       }
     }
     return $this->indvcount;
   }

   // end indvship

4. Upload the newly changed files and test it out.


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 believe it 2.84

im trying to delete an item order and relpace it for a different one..

 

Thanks

 

And this just started happening today? Something tells me this isn't a problem with Order Editor. Have you modified something recently? Upgraded to a newer version of PHP and/or MySQL? Changed webhosts even?


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
okay i was able to exclude the products from the page but i cannot find where it looks for the categorys. the only refference i doulc find was here

 

  $category_array = array(array('id' => '', 'text' => TEXT_SELECT_CATEGORY),
					   array('id' => '0', 'text' => TEXT_ALL_CATEGORIES));

 

 

so where can i find the query that $category_array is calling? i searched in the files the Oeditor calls but did not find it.

 

It use the function tep_get_category_tree to generate the list of all categories:

<td class="dataTableContent" valign="top"><?php echo tep_draw_pull_down_menu('add_product_categories_id', tep_get_category_tree('0', '', '0', $category_array), $add_product_categories_id,'style="width:300px;" onchange="this.form.submit();"'); ?></td>

 

Luckily enough, the third parameter of tep_get_category_tree is $exclude. So if you change the third parameter to the category_id of the category you want to avoid the function will do the rest of the work for you.


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

Hello all,

 

A huge thanks to djmonkey1 for a great contribution!!

I have installed and am using Order Editor v5.0.2 and only have 1 issue to combat.

 

This is what is in the 'Order Totals:' section for my shipping on orders when I first open the Order Editor.

AusPOST Parcel Post (Delivery to Post Code: <b>3196</b><br>1 day(s) Estimated Delivery Time*<br>1 box @ 5.45kg(s)):

 

It looks ugly and is causing problems being sent back and forth to the database... I want to just have

AusPOST Parcel Post

 

Being a newbie to PHP I'm not sure how I tell the order editor to look at the string and only write out up to the first instance of (

 

I think something like this should do it for me but not sure where (and what variable) to use it on???

$ot_shipping = substr($ot_shipping,0,strpos($ot_shipping, '(')-1)

 

Any assistance is much appreciated

Tim

Edited by EuroTimmy

Share this post


Link to post
Share on other sites
That's bizarre- I've never seen that. In fact it's designed to output the subtotal, total, and any taxes if it somehow loses all the various components. Dropping just the subtotal and total doesn't make any sense.

 

What is the class value of your subtotal and total components? It should be something like ot_subtotal and ot_total.

 

Hi DJ, and thankyou for a great contribution! I'm in the middle of testing it on my dummy store and have encountered this problem as well. All I've done here is removed an item from the order. Here's a before and after screenshot.

 

Now you see it:

now_you_see_it_reduced.JPG

 

Now you don't:

now_you_dont_reduced.JPG

 

The shipping quote part disappears, as do the subtotals and the ability to add a product. I know sweet bugger-all about AJAX, so have no idea where to start troubleshooting.

 

Cheers,

Max.

Share this post


Link to post
Share on other sites
I have installed and am using Order Editor v5.0.2 and only have 1 issue to combat.

 

This is what is in the 'Order Totals:' section for my shipping on orders when I first open the Order Editor.

AusPOST Parcel Post (Delivery to Post Code: <b>3196</b><br>1 day(s) Estimated Delivery Time*<br>1 box @ 5.45kg(s)):

 

It looks ugly and is causing problems being sent back and forth to the database... I want to just have

AusPOST Parcel Post

 

I suspect it's an issue with the AusPost shipping module. I'm using a module similar to yours (though probably an older version, I see in other threads you're using version 3.x). You can see from my screenshots in an earlier post that I'm not experiencing this strange behaviour. Does it display strangely during the checkout process as well? Or just in Order Editor?

 

Cheers,

Max

Share this post


Link to post
Share on other sites

Just an addendum to my last post, adjusting the quantity of an item also produces the same behaviour - the postage quote section disappears as does the subtotal section.

 

Max

Share this post


Link to post
Share on other sites
1. Undo the change you made to admin/order_editor/functions.php.

 

2. Open admin/order_editor/shipping.php and find the following line of code:

    //start indvship
   function get_shiptotal() {
     global $cart, $order;
     $this->shiptotal = '';
     $products = $cart->get_products();
     for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       if (tep_not_null($products[$i]['products_ship_price'])) {
         $products_ship_price = $products[$i]['products_ship_price'];
         $products_ship_price_two = $products[$i]['products_ship_price_two'];
         $products_ship_zip = $products[$i]['products_ship_zip'];
         $qty = $products[$i]['quantity'];
         if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){
           $this->shiptotal += ($products_ship_price);
           if ($qty > 1) {
             if (tep_not_null($products_ship_price_two)) {
               $this->shiptotal += ($products_ship_price_two * ($qty-1));
             } else {
               $this->shiptotal += ($products_ship_price * ($qty-1));
             }
           }//
         }
       }
     }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN
     if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) {
       if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') {
         $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE;
       } else {
         $this->shiptotal += INDIVIDUAL_SHIP_INCREASE *  $this->get_indvcount();
       }
       return $this->shiptotal;
     }
   }

   function get_indvcount() {
     global $cart;
     $this->indvcount = '';
     $products = $cart->get_products();
     for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       if (tep_not_null($products[$i]['products_ship_price'])) {
         $products_ship_price = $products[$i]['products_ship_price'];//}
         $products_ship_price_two = $products[$i]['products_ship_price_two'];
         if(is_numeric($products_ship_price)){
           $this->indvcount += '1';
         }
       }
     }
     return $this->indvcount;
   }

   // end indvship

4. Upload the newly changed files and test it out.

 

That worked!

Thanks very much!

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

×