Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

I can't see any reason why there would be a conflict. The two contributions do not overlap; one is for the admin side, the other is for the catalog side. Perhaps you've inadvertently set one or more of the configuration options for the anti-robot contribution to "false"?

 

Well, its not in the actual contribution part code, its in the sql query. I can go back and use an old database before I ran the Order Editor contribution query and the Anti-Robot Registration works, even with the new code changes applied to the php files. I think it has to be in the sql query somehow. The query that you need to run with Order Editor somehow made the Anti Robot stuff not work.

 

I'm not good enough at coding to see what's going on in the sql file. But if you want I can post both the sql query for the Anti Robot Registration contribution and Order Editor to see if there's anything that might be conflicting? The part of the Anti-Robot that isn't working is where it displays the characters for a human to enter. The box is still there but there aren't any characters. However, before I ran the query for the Order Editor everything was fine.

 

I'd really like to have both running but it seems that I can only have one or the other.

Share this post


Link to post
Share on other sites
Well, its not in the actual contribution part code, its in the sql query. I can go back and use an old database before I ran the Order Editor contribution query and the Anti-Robot Registration works, even with the new code changes applied to the php files. I think it has to be in the sql query somehow. The query that you need to run with Order Editor somehow made the Anti Robot stuff not work.

 

I'm not good enough at coding to see what's going on in the sql file. But if you want I can post both the sql query for the Anti Robot Registration contribution and Order Editor to see if there's anything that might be conflicting? The part of the Anti-Robot that isn't working is where it displays the characters for a human to enter. The box is still there but there aren't any characters. However, before I ran the query for the Order Editor everything was fine.

 

I'd really like to have both running but it seems that I can only have one or the other.

 

That's very strange, but here's a way to test it:

 

First, grab a backup of your database so you have backups of both the pre and post Order Editor databases.

 

Using your most recently updated database, with both contributions fully installed, run the following sql commands one line at a time (the one line at a time part is important as we want to see if which, if any, of these database entries is causing the problems)

ALTER TABLE orders DROP shipping_tax;
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_PAYMENT_DROPDOWN";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_SHIPPING_DROPDOWN";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_USE_SPPC";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_DEFAULT_TAX_CLASS";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_CREDIT_CARD";

 

Note that these queries apply to Order Editor v3 and up; if you're using a version prior to v3 please let me know and I'll post different queries.

 

After each individual sql query has been run, test the anti-robot registration tool to see if it has started working again. If it starts working again after deleting a certain key from the database we'll have something more to go on from this end.

 

It would be very surprising to me if there is a conflict between the Order Editor SQL command and the Anti Robot Registration contribution. As I understand it, the Anti Robot code uses the database simply to know whether or not to show the text box to the user; if so, it generates the box and the user has to type in whatever characters are displayed. As you've said, the box is still there but there aren't any characters; this tells us that the database is telling the Anti Robot code to run. So, based on your description of the problem it sounds like you're having a problem not with the database but with the code that actually generates the image itself, probably the file validation_png.php. Have you tested it in various browsers?

 

Also, there is no reason why you can't use both contributions. If there is a conflict we can find it and resolve it.


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
Thanks for pointing out this problem.

 

The correct line of code to use here is

EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" .

 

A new version has been posted with this bug corrected.

 

Thanks for the quick fix! Made the changes and it works like a charm.

 

Thanks again for a great contribution! :thumbsup:


Currently running 76 contibutions.

Share this post


Link to post
Share on other sites
That's very strange, but here's a way to test it:

 

First, grab a backup of your database so you have backups of both the pre and post Order Editor databases.

 

Using your most recently updated database, with both contributions fully installed, run the following sql commands one line at a time (the one line at a time part is important as we want to see if which, if any, of these database entries is causing the problems)

ALTER TABLE orders DROP shipping_tax;
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_PAYMENT_DROPDOWN";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_SHIPPING_DROPDOWN";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_USE_SPPC";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_DEFAULT_TAX_CLASS";
DELETE FROM configuration WHERE configuration_key = "ORDER_EDITOR_CREDIT_CARD";

 

Note that these queries apply to Order Editor v3 and up; if you're using a version prior to v3 please let me know and I'll post different queries.

 

After each individual sql query has been run, test the anti-robot registration tool to see if it has started working again. If it starts working again after deleting a certain key from the database we'll have something more to go on from this end.

 

It would be very surprising to me if there is a conflict between the Order Editor SQL command and the Anti Robot Registration contribution. As I understand it, the Anti Robot code uses the database simply to know whether or not to show the text box to the user; if so, it generates the box and the user has to type in whatever characters are displayed. As you've said, the box is still there but there aren't any characters; this tells us that the database is telling the Anti Robot code to run. So, based on your description of the problem it sounds like you're having a problem not with the database but with the code that actually generates the image itself, probably the file validation_png.php. Have you tested it in various browsers?

 

Also, there is no reason why you can't use both contributions. If there is a conflict we can find it and resolve it.

 

 

Ran the commands, line at a time and there was no change. Still missing the validation characters. Very strange.

 

I've tried on different browsers/platforms with the same results.

 

What's so weird is that I can use the database before I installed Order Editor and the validation characters appear.

Share this post


Link to post
Share on other sites

Ok, I found a fix for this. It has to do with the tep_image function. I made this change in the contact_us.php file:

 

Replace:

$validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']);

 

with:

$validation_images = '<img src="validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] . '">';

 

Not sure if this has anything to do with Order Editor or not, but it works now with this change in the code.

 

Thanks for all the help – I'm just glad I can get both of these great contributions working together nicely again!

Share this post


Link to post
Share on other sites

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

 

UPDATE orders SET customers_name = 'kelly ferreira', customers_company = 'csw', customers_street_address = 'csw 123', customers_suburb = 'ravena', customers_city = 'melb', customers_state = 'vic', customers_postcode = '3023', customers_country = 'Australia', customers_telephone = '93605000', customers_email_address = 'ksmodelwork@hotmail.com', billing_name = 'kelly ferreira', billing_company = 'csw', billing_street_address = 'csw 123', billing_suburb = 'ravena', billing_city = 'melb', billing_state = 'vic', billing_postcode = '3023', billing_country = 'Australia', delivery_name = 'kelly ferreira', delivery_company = 'csw', delivery_street_address = 'csw 123', delivery_suburb = 'ravena', delivery_city = 'melb', delivery_state = 'vic', delivery_postcode = '3023', delivery_country = 'Australia', payment_method = 'Cash on Delivery', currency = 'AUD', currency_value = '1.00000000', cc_type = '', cc_owner = '', cc_number = '', cc_expires = '', shipping_tax = '' where orders_id = '21';

 

[TEP STOP]

 

 

this comes up when i try and edit :( help

Share this post


Link to post
Share on other sites
1054 - Unknown column 'shipping_tax' in 'field list'

 

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

STEP 1

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

 

Run the following command on your MySQL database or use the included sql_install.sql file.

 

###If you always or almost always charge tax on shipping,

###you may want to enter a different default value for shipping_tax,

###ie 16.0000 instead of 0.0000):

 

 

ALTER TABLE orders ADD shipping_tax DECIMAL( 7, 4 ) DEFAULT '0.000' NOT NULL ;

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Payment Method dropdown?', 'ORDER_EDITOR_PAYMENT_DROPDOWN', 'true', 'Based on this selection Order Editor will display the payment method as a dropdown menu (true) or as an input field (false).', '1', '95', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- Display Shipping Method dropdown?', 'ORDER_EDITOR_SHIPPING_DROPDOWN', 'true', 'Based on this selection Order Editor will display the shipping method as a dropdown menu (true) or as an input field (false).', '1', '96', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- use Separate Pricing Per Customer?', 'ORDER_EDITOR_USE_SPPC', 'false', 'This should be set to true only if SPPC is installed.', '1', '97', now(), now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select a tax class for shipping fees', 'ORDER_EDITOR_DEFAULT_TAX_CLASS', '0', 'Order Editor will assess tax on shipping as being a part of this tax class.', '1', '98', now(), now(), 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Order Editor- select your credit card payment method', 'ORDER_EDITOR_CREDIT_CARD', 'Credit Card', 'Order Editor will display the credit card fields when this payment method is selected.', '1', '99', now(), now(), NULL, 'tep_cfg_pull_down_payment_methods(');


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 just installed:

v3.0.2.1 with bug fixed, digitally remastered

 

and I'm getting this error:

Parse error: parse error, unexpected $ in /home/rcepower/public_html/osCommerce1/catalog/admin/includes/functions/general.php on line 1351

 

 

I'm pretty much a noob so any help would be greatly appreciated :)

Share this post


Link to post
Share on other sites
Hi,

I just installed:

v3.0.2.1 with bug fixed, digitally remastered

 

and I'm getting this error:

Parse error: parse error, unexpected $ in /home/rcepower/public_html/osCommerce1/catalog/admin/includes/functions/general.php on line 1351

 

 

I'm pretty much a noob so any help would be greatly appreciated :)

 

Step 4 of the install.txt file deals with the file admin/includes/functions/general.php. The instructions state that the following block of code be added to that file:

  //////create a pull down for all payment installed payment methods for Order Editor configuration

  // Get list of all payment modules available
  function tep_cfg_pull_down_payment_methods() {
  global $language;
  $enabled_payment = array();
  $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
  $file_extension = '.php';

  if ($dir = @dir($module_directory)) {
 while ($file = $dir->read()) {
   if (!is_dir( $module_directory . $file)) {
	 if (substr($file, strrpos($file, '.')) == $file_extension) {
	   $directory_array[] = $file;
	 }
   }
 }
 sort($directory_array);
 $dir->close();
  }

  // For each available payment module, check if enabled
  for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
 $file = $directory_array[$i];

 include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/payment/' . $file);
 include($module_directory . $file);

 $class = substr($file, 0, strrpos($file, '.'));
 if (tep_class_exists($class)) {
   $module = new $class;
   if ($module->check() > 0) {
	 // If module enabled create array of titles
	   $enabled_payment[] = array('id' => $module->title, 'text' => $module->title);

   }
}
 }

 $enabled_payment[] = array('id' => 'Other', 'text' => 'Other');	

	 //draw the dropdown menu for payment methods and default to the order value
   return tep_draw_pull_down_menu('configuration_value', $enabled_payment, '', ''); 
	 }


/////end payment method dropdown

 

I would double-check your file admin/includes/functions/general.php and make sure those changes were made and that you didn't put the new function in the middle of some other function and that you didn't accidentally delete a

 }

or two in the process of adding the new code.


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 Scuse my english i'm french Canadian

 

I add this contrib to my store but I have few problem when I try to edit order....

 

I have

 

Sub Total 10.00

Shipping 7.00

Tax 6% ( 0.00 )

Tax 7.5% (0.00)

Total 17.00

 

Need to be at

Sub Total 10.00

Shipping 7.00

Tax 6% ( 1.02 )

Tax 7.5% (1.35) applied on the sub total + Shipping + tax 6% ( 10+7+1.02)*.075

Total 19.37

 

 

 

Do you know hoe to have my tax in the screen. I need to have seperate tax on the invoice so I implemented the contrib to have seperate tax on invoice. In data base fo order_total the tax ar at 0.00 in the VALUE field but I have amount in TEXT field

 

this is my OT_TAX.PHP

 

<?php

/*

$Id: ot_tax.php,v 1.3 2002/12/06 02:08:11 christopheweber$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

class ot_tax {

var $title, $output, $gst_title;

 

function ot_tax() {{

$this->code = 'ot_tax';

$this->title = MODULE_ORDER_TOTAL_TAX_TITLE;

$this->title2 = MODULE_ORDER_TOTAL_GST_TITLE;

$this->title3 = MODULE_ORDER_TOTAL_PST_TITLE;

$this->description = MODULE_ORDER_TOTAL_TAX_DESCRIPTION;

$this->enabled = ((MODULE_ORDER_TOTAL_TAX_STATUS == 'true') ? true : false);

$this->sort_order = MODULE_ORDER_TOTAL_TAX_SORT_ORDER;

 

$this->output = array();

}

}

 

function process() {

global $order, $currencies, $realsub, $customer_id;

 

$flag=0;

 

if (MODULE_ORDER_TOTAL_TAX_SHOW_GROUPS == 'true') {

 

reset($order->info['tax_groups']);

while (list($key, $value) = each($order->info['tax_groups'])) {

 

if (MODULE_ORDER_TOTAL_GST_STATUS == 'true') {

 

if ( $flag != 1 ) {

$orderquery1 = tep_db_query("select entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");

$orderquery2 = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_id = '6'");

$orderquery3 = tep_db_fetch_array($orderquery1);

$orderquery4 = tep_db_fetch_array($orderquery2);

$orderquery5 = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_id = '5'");

$orderquery6 = tep_db_fetch_array($orderquery5);

$orderquery7 = tep_db_query("select entry_country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");

$orderquery8 = tep_db_fetch_array($orderquery7);

 

$tax1 = ( $order->info['subtotal']+$order->info['shipping_cost']) * (MODULE_ORDER_TOTAL_GST_VALUE / 100); /* replace by your GST rate */

 

 

if (MODULE_ORDER_TOTAL_GST_ZONE == 'Quebec: PST=(sub+GST)*x' ) {

$tax2 = ( $order->info['subtotal']+$order->info['shipping_cost']+ $tax1 ) * (MODULE_ORDER_TOTAL_PST_VALUE / 100); /* ............ PST rate */

} else {

$tax2 = ( $order->info['subtotal'] ) * (MODULE_ORDER_TOTAL_PST_VALUE / 100); /* ............ PST rate */

}

 

$taxdec1 = round($tax1, 2);

$taxdec2 = round($tax2, 2);

 

if ($orderquery8['entry_country_id'] == $orderquery6['configuration_value']) { /* customer and store in the same country */

 

$this->output[] = array('title' => $this->title2 . ' ( ' . MODULE_ORDER_TOTAL_GST_VALUE . '% ):',

'text' => $currencies->format($taxdec1, true, $order->info['currency'], $order->info['currency_value']),

'value' => $value);

 

$flag=1;}

 

 

if ($orderquery3['entry_zone_id'] == $orderquery4['configuration_value']) { /* customer and store in the same zone */

$this->output[] = array('title' => $this->title3 . ' ( ' . MODULE_ORDER_TOTAL_PST_VALUE . '% ):',

'text' => $currencies->format($taxdec2, true, $order->info['currency'], $order->info['currency_value']),

'value' => $order->info['tax']); }}

}

reset($order->info['tax_groups']);

while (list($key, $value) = each($order->info['tax_groups'])) {

if ($key > 0) {

$this->output[] = array('title' => $this->title . ' (' . $key . '%):',

'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),

'value' => $value); }}

}} else {

 

if (MODULE_ORDER_TOTAL_GST_STATUS == 'true') {

 

$orderquery1 = tep_db_query("select entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");

$orderquery2 = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_id = '6'");

$orderquery3 = tep_db_fetch_array($orderquery1);

$orderquery4 = tep_db_fetch_array($orderquery2);

$orderquery5 = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_id = '5'");

$orderquery6 = tep_db_fetch_array($orderquery5);

$orderquery7 = tep_db_query("select entry_country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");

$orderquery8 = tep_db_fetch_array($orderquery7);

 

$tax1 = ( $order->info['subtotal']+$order->info['shipping_cost']) * (MODULE_ORDER_TOTAL_GST_VALUE / 100); /* replace by your GST rate */

if (MODULE_ORDER_TOTAL_GST_ZONE == 'Quebec: PST=(sub+GST)*x' ) {

$tax2 = ( $order->info['subtotal']+$order->info['shipping_cost']+ $tax1 ) * (MODULE_ORDER_TOTAL_PST_VALUE / 100);

} else {

$tax2 = ( $order->info['subtotal'] ) * (MODULE_ORDER_TOTAL_PST_VALUE / 100); /* ............ PST rate */

}

$taxdec1 = round($tax1, 2);

$taxdec2 = round($tax2, 2);

 

if ($orderquery8['entry_country_id'] == $orderquery6['configuration_value']) { /* customer and store in the same country */

 

$this->output[] = array('title' => $this->title2 . ' ( ' . MODULE_ORDER_TOTAL_GST_VALUE . '% ):',

'text' => $currencies->format($taxdec1, true, $order->info['currency'], $order->info['currency_value']),

'value' => $value);

 

if ($orderquery3['entry_zone_id'] == $orderquery4['configuration_value']) { /* customer and store in the same zone */

$this->output[] = array('title' => $this->title3 . ' ( ' . MODULE_ORDER_TOTAL_PST_VALUE . '% ):',

'text' => $currencies->format($taxdec2, true, $order->info['currency'], $order->info['currency_value']),

'value' => $order->info['tax']); }

 

}}

 

if ($order->info['tax'] != 0) {

$this->output[] = array('title' => $this->title . ':',

'text' => $currencies->format($order->info['tax'], true, $order->info['currency'], $order->info['currency_value']),

'value' => $order->info['tax']);

}

}

}

 

function check() {

if (!isset($this->_check)) {

$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TAX_STATUS'");

$this->_check = tep_db_num_rows($check_query);

}

 

return $this->_check;

}

 

function keys() {

return array('MODULE_ORDER_TOTAL_TAX_STATUS', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', 'MODULE_ORDER_TOTAL_TAX_SHOW_GROUPS', 'MODULE_ORDER_TOTAL_GST_STATUS', 'MODULE_ORDER_TOTAL_GST_VALUE', 'MODULE_ORDER_TOTAL_PST_VALUE', 'MODULE_ORDER_TOTAL_GST_ZONE');

 

}

 

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 ('Display Tax', 'MODULE_ORDER_TOTAL_TAX_STATUS', 'true', 'Do you want to display the order tax value?', '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 ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now())");

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 ('Display Tax Groups', 'MODULE_ORDER_TOTAL_TAX_SHOW_GROUPS', 'false', 'Do you want to display tax groups?', '6', '3', '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, set_function, date_added) values ('Display GST-PST Tax', 'MODULE_ORDER_TOTAL_GST_STATUS', 'true', 'Do you want to display the GST-PST tax?', '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 ('GST Value', 'MODULE_ORDER_TOTAL_GST_VALUE', '7', 'GST Value.', '6', '2', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('PST Value', 'MODULE_ORDER_TOTAL_PST_VALUE', '7.5', 'PST Value.', '6', '3', now())");

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 ('Mode of Calculation', 'MODULE_ORDER_TOTAL_GST_ZONE', 'Quebec: PST=(sub+GST)*x', 'How to calculate the PST?', '6', '4','tep_cfg_select_option(array('Quebec: PST=(sub+GST)*x', 'Other: PST=sub*x'), ', now())");

 

}

 

function remove() {

$keys = '';

$keys_array = $this->keys();

$keys_size = sizeof($keys_array);

for ($i=0; $i<$keys_size; $i++) {

$keys .= "'" . $keys_array[$i] . "',";

}

$keys = substr($keys, 0, -1);

 

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");

}

}

?>

 

Do you know how to ahve the amount in Orde editor or is it possible to EDIT the field in my Order editor

Edited by scrapbook

Share this post


Link to post
Share on other sites
So I got it to work except if I try to do any updates I get a parse error in from the shipping tax...

 

any leads :)

 

If the error you're getting is anything like

1054 - Unknown column 'shipping_tax' in 'field list'
then you didn't perform the database changes seen in Step 1 of the install.txt file. For any other errors you would need to post the error for me to be able to help you further.

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..

I'll re install it and if I get the error again I will post it.

 

Thank you for all your help :)

 

I do have one question:

 

when you run the command in the mysql (one of the first steps) do you just paste that into that file?

Edited by darkside212

Share this post


Link to post
Share on other sites
Ok..

I'll re install it and if I get the error again I will post it.

 

Thank you for all your help :)

 

I do have one question:

 

when you run the command in the mysql (one of the first steps) do you just paste that into that file?

 

If that's the error you're getting you don't need to re-install Order Editor, you just need to run the SQL command on your database. Read this post for instructions on how to perform this step.


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 Scuse my english i'm french Canadian

 

I add this contrib to my store but I have few problem when I try to edit order....

 

Do you know hoe to have my tax in the screen. I need to have seperate tax on the invoice so I implemented the contrib to have seperate tax on invoice. In data base fo order_total the tax ar at 0.00 in the VALUE field but I have amount in TEXT field

 

this is my OT_TAX.PHP

 

Do you know how to ahve the amount in Orde editor or is it possible to EDIT the field in my Order editor

 

Do you have anything entered in the Shipping Tax field?


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
Do you have anything entered in the Shipping Tax field?

 

 

Nothing in shipping tax because on the invoice I put :

Sub total 10$

Shipping 7$

Tax 1 (on 10 + 7 )

Tax 2 ( tax on 10 + 7 + Tax 1 )

Total

 

 

My tax on shipping are included in tax 1 et 2 not on individual line... This field for me it's not required

Share this post


Link to post
Share on other sites
Nothing in shipping tax because on the invoice I put :

Sub total 10$

Shipping 7$

Tax 1 (on 10 + 7 )

Tax 2 ( tax on 10 + 7 + Tax 1 )

Total

 

My tax on shipping are included in tax 1 et 2 not on individual line... This field for me it's not required

 

It's an Order Editor-only field. If that field is blank or set to zero Order Editor will assess tax on shipping at 0%. It is also necessary to have a tax rate entered for each individual product in the order that is taxable.


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's an Order Editor-only field. If that field is blank or set to zero Order Editor will assess tax on shipping at 0%. It is also necessary to have a tax rate entered for each individual product in the order that is taxable.

 

 

OK so in the programme of order editor it's not possible to change the code to importe my tax amount i have on my invoice. i just want to have the tax on purchase not the shipping tax. The tax on my invoice is calculated on the sub total not for each line or product. My tax are not incluede in the price

Share this post


Link to post
Share on other sites
OK so in the programme of order editor it's not possible to change the code to importe my tax amount i have on my invoice. i just want to have the tax on purchase not the shipping tax. The tax on my invoice is calculated on the sub total not for each line or product. My tax are not incluede in the price

 

A few posts ago you wrote this:

Sub total 10$

Shipping 7$

Tax 1 (on 10 + 7 )

Tax 2 ( tax on 10 + 7 + Tax 1 )

 

The subtotal is calculated by adding up all the products in the order.

 

If Tax 1 is tax on $10 and $7, and Tax 2 is tax on $10 and tax on $7 and tax on Tax 1, then yes you are charging tax on your products and yes you are charging tax on shipping.

 

All you have to do to get Order Editor to calculate your taxes for you is enter in the appropriate tax rate for each product in the order and for shipping tax. If you don't want to do this then you will have to go through the edit_orders.php file and hardcode all the tax calculations into the file, which is much more difficult.


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 so in the programme of order editor it's not possible to change the code to importe my tax amount i have on my invoice. i just want to have the tax on purchase not the shipping tax. The tax on my invoice is calculated on the sub total not for each line or product. My tax are not incluede in the price

 

osCommerce handles compounded tax rates, and Order Editor works the same way, by concatenating them. For instance if Tax 1 is %10, Tax 2 is %7, and Tax 2 is compounded onto Tax 1, that works exactly the same as a tax rate of %17.7 and will show up on the invoice as "Tax 1 + Tax 2".

 

What I said in my last post concerning calculating tax amounts in Order Editor is true; in this example you would enter a tax rate of 17.7 into the Tax% field of each product and shipping tax and Order Editor will spit out a single tax calculation for everything.

 

Won't it won't do is cut the tax calculation onto two lines as you want to do. The only way, in a stock osCommerce scenario, to have multiple line items for taxes is to have multiple tax classes, however it is not possible to assign more than one tax class to an item (I think allowing this would actually be the easiest way to solve this problem within the current osCommerce structure). To accomplish what you want to do (one tax class, multiple rates, line item for each rate on the invoice) you had to customize the osCommerce tax engine, so you will have to customize Order Editor to work this way as well.


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 want to say to those that are wondering what version to install or what works, I have successfully installed order editor 3.0.2.1. It works great for me (I don't have to deal with taxes, so don't know about that part). Thank you so much for this contribution. :thumbsup:

Share this post


Link to post
Share on other sites

Thanks for contribution ver. 3_0_1, easy to install and use.

Meanwhile I noted a bug.

I use contribution "Subtotal excl vat" in Modules - Order total

http://www.oscommerce.com/community/contributions,4618

 

On Edit order page the line "Subtotal excl vat" appears in part 3 - Discount, Shipping and Total.

First of all the field "ammont" has wrong value, actually it has subtotal included vat and not excluded.

By manual edit this field the calculation of Total is wrong and shows as Total = Subtotal excl vat + vat + Sub total + Shipping

 

Any way to solve the problem?

 

Thanks

Sergei

Share this post


Link to post
Share on other sites

I've just installed a Free Of Charge payment module and now I get a fatal error in Order Editor. In the area where payment information would be I get this error...

 

Fatal error: Call to a member function on a non-object in .../catalog/includes/modules/payment/freeofcharge.php on line 42

 

Below is the contents of freeofcharge.php...

 

 

<?php

 

/*

 

$Id: freeofcharge.php,v 1.0 2005/07/11 17:04:32 cap Exp $

 

 

 

Free Of Charge Payment Module for osCommerce 2.2 MS2

 

 

 

Module written by Want A Better Website, Inc.

 

http://www.wantabetterwebsite.com/

 

 

 

Module checks the grand total of the customer's shopping cart.

 

If the grand total is $0.00 and this module is enabled, a

 

Free Of Charge option is given to the customer on checkout.

 

 

 

Module Copyright © 2005 Want A Better Website, Inc.

 

osCommerce Copyright © 2003 osCommerce

 

 

 

Released under the GNU General Public License

 

*/

 

 

 

class freeofcharge {

 

var $code, $title, $description, $enabled;

 

 

 

// class constructor

 

function freeofcharge() {

 

global $order;

 

 

 

$this->code = 'freeofcharge';

 

$this->title = MODULE_PAYMENT_FOC_TEXT_TITLE;

 

$this->description = MODULE_PAYMENT_FOC_TEXT_DESCRIPTION;

 

$this->sort_order = MODULE_PAYMENT_FOC_SORT_ORDER;

 

$this->enabled = ((MODULE_PAYMENT_FOC_STATUS == 'True') ? true : false);

 

if (is_object($order)) $this->update_status();

 

}

 

 

 

// class methods

 

function update_status() {

 

global $order;

 

 

 

// disable the module if the order only contains virtual products

 

if ($this->enabled == true) {

 

global $cart;

 

if ($cart->show_total() >= 0.01) {

 

$this->enabled = false;

 

}

 

}

 

}

 

 

 

function javascript_validation() {

 

return false;

 

}

 

 

 

function selection() {

 

return array('id' => $this->code,

 

'module' => $this->title);

 

}

 

 

 

function pre_confirmation_check() {

 

return false;

 

}

 

 

 

function confirmation() {

 

return false;

 

}

 

 

 

function process_button() {

 

return false;

 

}

 

 

 

function before_process() {

 

return false;

 

}

 

 

 

function after_process() {

 

return false;

 

}

 

 

 

function get_error() {

 

return false;

 

}

 

 

 

function check() {

 

if (!isset($this->_check)) {

 

$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_FOC_STATUS'");

 

$this->_check = tep_db_num_rows($check_query);

 

}

 

return $this->_check;

 

}

 

 

 

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 ('Enable Cash On Delivery Module', 'MODULE_PAYMENT_FOC_STATUS', 'True', 'Do you want to accept Cash On Delevery payments?', '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, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_FOC_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_FOC_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_FOC_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");

 

}

 

 

 

function remove() {

 

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

 

}

 

 

 

function keys() {

 

return array('MODULE_PAYMENT_FOC_STATUS', 'MODULE_PAYMENT_FOC_ZONE', 'MODULE_PAYMENT_FOC_ORDER_STATUS_ID', 'MODULE_PAYMENT_FOC_SORT_ORDER');

 

}

 

}

 

?>

 

 

 

It appears that Line 42 is a blank line under

 

class freeofcharge {

 

var $code, $title, $description, $enabled;

 

Any ideas?

 

Anthony

Edited by analli

Share this post


Link to post
Share on other sites
I've just installed a Free Of Charge payment module and now I get a fatal error in Order Editor. In the area where payment information would be I get this error...

 

Below is the contents of freeofcharge.php...

 

Any ideas?

 

Anthony

 

Disable the payment method dropdown.


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

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

×