Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW! Complete Order Editing Tool!


jhilgeman

Recommended Posts

Hi all,

I found a bug, it accures when there is no country zones in the database. It cases a javascript error and screws up the javscript functions. Here is the solution:

 

In order_editor/funktions.php and function oe_js_zone_list()

Do a row check before while ($countries = tep_db_fetch_array($countries_query)) {

Like this if (tep_db_num_rows($countries_query) > 0){

 

I only post it here be cus it is such a small bug. Maybe someone can include the fix in coming versions.

 

Regards

Ivan

Link to comment
Share on other sites

Installed Products attribute option type feature while ago and it worked fine - have since installed this order editor and now OTF has stopped working properly. It passes the details the user has inputted into the shopping cart and through ordering but will not pass the details any further. In admin when reviewing the order and also on the order emails I'm just getting the name of the field and "TEXT" instead of the user submitted info. I'm assuming this has something to do with order editor?? Help.

Link to comment
Share on other sites

Hello,

 

RE: Order Editor 5.0.61

 

Thanks for the great mod! It looks like it could be very usefull!

When I press edit I get the Order Editor window but then when I press "Update" or add a new product I get this:

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /admin/edit_orders.php on line 423

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /admin/edit_orders.php on line 423

 

Warning: Cannot modify header information - headers already sent by (output started at /admin/edit_orders.php:423) in /admin/includes/functions/general.php on line 22

 

Any ideas?

Great work though... very nice. I can't wait for it to work!!!! :-)

Edited by askvideo
Link to comment
Share on other sites

sure you have not made any editing problems on the bottom of some of the pages?

you can not have any empty space after the very last ?>

 

so the ones you modified go to the end of the page and hit the backspace key until you get to the ?>

 

 

 

Hello,

 

RE: Order Editor 5.0.61

 

Thanks for the great mod! It looks like it could be very usefull!

When I press edit I get the Order Editor window but then when I press "Update" or add a new product I get this:

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /admin/edit_orders.php on line 423

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /admin/edit_orders.php on line 423

 

Warning: Cannot modify header information - headers already sent by (output started at /admin/edit_orders.php:423) in /admin/includes/functions/general.php on line 22

 

Any ideas?

Great work though... very nice. I can't wait for it to work!!!! :-)

Link to comment
Share on other sites

I re-checked all the code just now. No spaces. Exactly like in the instructions. The error comes from edit_orders.php (which I haven't touched) and general.php. Just wondering why the headers are being called again. And why the order totals arn't being updated.

 

All the information in the order IS being updated except the total. When I click "Update" the error comes up but if I hit the back button in my browser and refresh the page all my NEW changes are there... so I don't think it would be a "space" at the very last ?> that would casue this...?

 

I think the error is right "Wrong datatype for second argument in /admin/edit_orders.php on line 423"

 

Is anyone else receiving this error?

 

Thanks, :-(

 

 

sure you have not made any editing problems on the bottom of some of the pages?

you can not have any empty space after the very last ?>

 

so the ones you modified go to the end of the page and hit the backspace key until you get to the ?>

Edited by askvideo
Link to comment
Share on other sites

I apologize if this has been addressed before, but seeing as their is 130+ pages and I tried to search, I couldn't come up with anything. When I click on Orders, I get:

 

Parse error: syntax error, unexpected T_REQUIRE in /home/mysticd2/public_html/store/admin/orders.php on line 1

 

Any ideas?

Link to comment
Share on other sites

Hi I am getting the following errors...

 

Warning: pwtable::require(includes/functions/cost_weight_table.php) [function.pwtable-require]: failed to open stream: No such file or directory in /mounted-storage/home90c/sub008/sc45169-QOCL/www/shop/includes/modules/shipping/pwtable.php on line 92

 

Warning: pwtable::require(includes/functions/cost_weight_table.php) [function.pwtable-require]: failed to open stream: No such file or directory in /mounted-storage/home90c/sub008/sc45169-QOCL/www/shop/includes/modules/shipping/pwtable.php on line 92

 

Fatal error: pwtable::require() [function.require]: Failed opening required 'includes/functions/cost_weight_table.php' (include_path='.:/usr/local/lib/php/') in /mounted-storage/home90c/sub008/sc45169-QOCL/www/shop/includes/modules/shipping/pwtable.php on line 92

 

that line refers to a shipping module I added. the line is...

require(DIR_WS_FUNCTIONS . 'cost_weight_table.php');

 

Is there a simple solution to the error? Please note I am a complete novice to PHP :blush:

Link to comment
Share on other sites

I was getting a blank page and and an error using free shipping by categories module.

 

if you get this error in your web logs...

 

PHP Fatal error: Call to undefined function tep_get_categories_name() in /patph/to/catalog/includes/modules/shipping/freecats.php on line 74

 

 

add to admin/includes/functions/general.php

 

function tep_get_categories_name($cID, $language = ''){

global $languages_id;

if (!tep_not_null($language))

$language = $languages_id;

 

$cname = tep_db_fetch_array(tep_db_query('select categories_name from '.TABLE_CATEGORIES_DESCRIPTION.' where categories_id="'.$cID.'" and language_id="'.$language.'"'));

 

return $cname['categories_name'];

}

 

I found the fix on an OSC netherlands forum.

http://forums.oscommerce.nl/index.php?showtopic=17881

Link to comment
Share on other sites

Hi

Could i ask if there should be any files that need editing once a SSL conection is made with the admin.

My order editor was running great untill i turned on the SSL. Editor runs but i now get error in ie7 once i try to change any invoice.

 

Error: Unknown runtime error

 

 

or should i be adding a define(' call to the includes/configure.php file any help much appreciated.

Link to comment
Share on other sites

hi

 

Can someone help.. whenever i add a product , the product name isnt shown in the edit_orders page. but i still see it's model, tax, price ...

 

i have to fix this problem temporarily by re-entering its name

 

Disable Ajax and still get this problem

Link to comment
Share on other sites

Hi,

 

Me again!

 

Discovered something not working in my install of this great contribution.

 

When I click 'create' in the admin panel I get this:

Haven't changed the file, it's the one that came with the package.

 

Thanks again.

 

Did you ever resolve this problem? I am having the exact same thing happen with the create_order.php. Makes no sense.

 

Thanks.

Link to comment
Share on other sites

This is a great mod and I have been using it extensively.

 

I have noticed that in the email sent to the customer that in the information for Delivery and Billing the fields for City and Zip (postal) Code are incorrect. They are being populated with the City and Zip Code from the customer address information field. Please see below

 

I have tried to correct the issue without success.

 

Can anyone help me fix this issue?

 

I really appreciate it.

Taylor

 

 

Customer Address Field

Bob Smith

123 Main St.

Boston

Massachusetts

02101

 

 

Email sent to customer

 

Delivery Address

------------------------------------------------------

Jane Smith

200 Water St

Boston

Florida

02101

 

 

Billing Address

------------------------------------------------------

Bob Smith

PO Box 100

Boston

Rhode Island

02101

Link to comment
Share on other sites

Hi,

 

I'm using this great contribution within my shop. It's very usefull to modify existing orders.

 

Is there a way to integrate a dropdown to select the ot_xy? All new custom subtotals are added with ot_custom1..n. To get all created reports showed the summary displayed right I have to update the orders_totals table manually. If there is a way to select addition os_xx e.g. Discount it would be possible to insert it with the right class_id/class_name during the edit-order process.

 

Any ideas are welcome.

 

regards

 

peter

Link to comment
Share on other sites

I apologize if this has been addressed before, but seeing as their is 130+ pages and I tried to search, I couldn't come up with anything. When I click on Orders, I get:

 

Parse error: syntax error, unexpected T_REQUIRE in /home/mysticd2/public_html/store/admin/orders.php on line 1

 

Any ideas?

Anyone?

Link to comment
Share on other sites

anyone knows how to make the popup bigger when adding a product? i've got many attributes and they don't show

thanks

 

 

Hi,

 

Try to edit:

 

catalog/admin/order_editor/javascript.php

 

In there it is a function called "openWindow"

 

function openWindow(file, windowName) {

msgWindow = window.open(file, windowName,'top=250, left=250, width=550, height=450, location=0, status=1, toolbar=0, resize=1');

if (!msgWindow.opener) msgWindow.opener = self;

}

 

You can easy change the value in width=xxx and height=xxx

 

Hope this helps

 

regards

 

peter

Link to comment
Share on other sites

Just added and it's wonderful, however I have some strange things happening.

I've lost the file manager. It will open showing default directory however when I click on any folder to move to that directory, it comes up with a blank page. Same thing happens when I try to edit a catalog item. Will preview, then when you click update it returns you to a blank screen.

 

Thoughts? Did I miss a line of code or have a space somewhere I shouldn't have?

 

Thanks in advance.

Shane

Link to comment
Share on other sites

I had an old evrsion but I've just upgraded it to the latest version. It is a great evolution. However, I have a small problem because something is not updated:

Now, for each order, I have the following information:

 

_ subtotal (the "normal" one => vat included and before shipping)

_ total VAT excluded

_VAT

_ shipping (I don't have VAT on shipping)

_ TOTAL

 

The total VAT excluded is calculate like this in includes/classes/order.php (it is only one part of the code to include this value of course):

 

if (DISPLAY_PRICE_WITH_TAX == 'true') {

$this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];

} else {

$this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];

}

$this->info['totalHT'] = $this->info['subtotal'] - $this->info['tax'];

 

However, when I edit my order with this contribution, the total VAT excluded is not updated as it should be and I can't access to the related box to update it manually.

 

Could you please help me?

Link to comment
Share on other sites

There is a problem using Order Editor and the Individual Shipping contributions. I posted this thread seeking help:

 

http://www.oscommerce.com/forums/index.php?sho...0&p=1201199

 

I never found a solution. It appears to be rather complicated and beyond my php expertise. If anyone finds a solution, please share it with me.

 

 

This will fix the problem!

 

 

In Indvship1.php

 

Find :

$shiptotal1 = $cart->get_shiptotal1();

 

Replace :

$currpage =$_SERVER["PHP_SELF"];

if ($currpage <> "/admin/edit_orders.php"){

$shiptotal1 = $cart->get_shiptotal1();

}

 

More of a patch rather than fix, none the less works.

 

Happy days.

Dan

Link to comment
Share on other sites

This will fix the problem!

In Indvship1.php

 

Here is a revision to psylencer's fix you may need. There are three scripts in the order editor, and we need to exclude calling the individual shipping function from all three:

 

Find (around line 32) in indvship.php:

 

$shiptot = $cart->get_shiptotal();

 

Replace with:

	  $currpage = $_SERVER['PHP_SELF'];
  if ($currpage == "/admin/edit_orders.php") {
  }
	elseif ($currpage == "/admin/edit_orders_ajax.php") {
	}
	  elseif ($currpage == "/admin/edit_orders_add_product.php") {
	  }
		else {
		$shiptot = $cart->get_shiptotal();
		}

 

I know many people have been having problems with Order Editor and Individual Shipping playing together, and this should get you going.

Link to comment
Share on other sites

Im running the latest version of this module and Im having some problems with one of my order total modules

 

I use a shipping insurance module to calculate shipping based on the courier company I use.

 

Now when I edit orders the ot_insurance information is not updated.

 

Any ideas?

Link to comment
Share on other sites

I will give you more info about my total vat excluded (before shipping).

 

1/ In includes/classes/order.php

 

I have replaced

 

	  if (DISPLAY_PRICE_WITH_TAX == 'true') {
	$this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
  } else {
	$this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];
  }

 

by

	  if (DISPLAY_PRICE_WITH_TAX == 'true') {
	$this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
  } else {
	$this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];
  }
  $this->info['totalHT'] = $this->info['subtotal'] - $this->info['tax'];

 

Then I have created ot_total_ht.php in includes/modules/order_total/

 

<?php
/*
$Id: ot_total.php,v 1.7 2003/02/13 00:12:04 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

class ot_total_ht {
  var $title, $output;

  function ot_total_ht() {
 $this->code = 'ot_total_ht';
 $this->title = MODULE_ORDER_TOTAL_HT_TOTAL_TITLE;
 $this->description = MODULE_ORDER_TOTAL_HT_TOTAL_DESCRIPTION;
 $this->enabled = ((MODULE_ORDER_TOTAL_HT_TOTAL_STATUS == 'true') ? true : false);
 $this->sort_order = MODULE_ORDER_TOTAL_HT_TOTAL_SORT_ORDER;

 $this->output = array();
  }

  function process() {
 global $order, $currencies;

 $this->output[] = array('title' => $this->title . ':',
						 'text' => '<b>' . $currencies->format($order->info['totalHT'], true, $order->info['currency'], $order->info['currency_value']) . '</b>',
						 'value' => $order->info['totalHT']);
  }

  function check() {
 if (!isset($this->_check)) {
   $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_HT_TOTAL_STATUS'");
   $this->_check = tep_db_num_rows($check_query);
 }

 return $this->_check;
  }

  function keys() {
 return array('MODULE_ORDER_TOTAL_HT_TOTAL_STATUS', 'MODULE_ORDER_TOTAL_HT_TOTAL_SORT_ORDER');
  }

  function install() {
 tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Affichage du total', 'MODULE_ORDER_TOTAL_HT_TOTAL_STATUS', 'true', 'Voulez-vous montrer le total de la commande HT ?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
 tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordre de tri', 'MODULE_ORDER_TOTAL_HT_TOTAL_SORT_ORDER', '4', 'Ordre de tri pour l\'affichage (Le plus petit nombre est montré en premier).', '6', '2', now())");
  }

  function remove() {
 tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
  }
}
?>

(+creation of a file in languages of course but it is not important here)

 

How could I modify the order editor contribution (in order to update the total without tax properly)?

 

Thank you in advance for your help

Edited by From Fan 2 Fans
Link to comment
Share on other sites

First, thank you for such a great (and easy to install) mod. I have spent very little time on the installation, but I have it almost working perfectly.

 

The 'almost' was getting tax to calculate correctly on shipping, but I re-read the installation instructions, and tried overwriting the shipping method, and now it is working!

 

The only thing left I need to do is to fix a custom shipping method that calculates a handling fee. The method's title displays right above shipping method as it should (is this from the ot_totals module?), but the handling fee value is always $0.00.

 

What do I need to do to display the value of this custom shipping module, ot_handlingfee? What do I need to do to include this value into the shipping tax calculation? It should be added to the shipping cost prior to applying the tax rate.

 

Any assistance would be greatly appreciated. I am not a very competent php programmer, and I got lucky with the handling fee module. Now that I have had it in place for a couple of years, I am afraid to touch it. I have been reading through all 137 pages of posts, and I am sure I have missed some, so I apologize if this has been addressed somewhere.

 

Thank you,

Ron

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...