Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 346,060

Results 1,301 to 1,320 of 1,927
16 Apr 2018, 3:05 PM
#1302
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

s-thomas:

Hi there

I just installed the module and am running into an issue that I have tracked down to the (IS_ADMIN_FLAG === true) in the /includes/classes/shipping file.
I am using Edit orders 4.1.7 and running Zen Cart 1.5.4

In the admin section the pages are not loading because of an file load error. If I hack the IS_ADMIN_FLAG then the pages loads with out errors. I am going with the assumption that there is an issue with the admin files calling the catalog files or that there is an issue with using a shipping file that is a core 1.5.5a when I am running 1.5.4. Any help would be appreciated.
Thanks

if (IS_ADMIN_FLAG === true) {
$lang_file = zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
$module_file = DIR_FS_CATALOG . $module_file;
} else {
$lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
}

> 
> 
> [20-Mar-2018 13:50:06 America/Los_Angeles] PHP Warning:  include_once(includes/modules/shipping/canadapost.php): failed to open stream: No such file or directory in /home/xxx/public_html/includes/classes/shipping.php on line 64
> [20-Mar-2018 13:50:06 America/Los_Angeles] PHP Warning:  include_once(): Failed opening 'includes/modules/shipping/canadapost.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/xxx/public_html/includes/classes/shipping.php on line 64
> [20-Mar-2018 13:50:06 America/Los_Angeles] PHP Fatal error:  Class 'canadapost' not found in /home/xxx/public_html/includes/classes/shipping.php on line 65


I have just come across this issue. I have used Edit Orders extensively previously without seeing this. 

Definitely, seems to be a relative path issue when the shipping modules are loaded from admin.  The original OP says the file is there. Well, actually that is not strictly true.  The current working directory is admin, so the inclusion of 'includes/modules/shipping/canadapost.php' in his case fails.  And it should fail because we are in the admin folder.

If the CWD was the root directory this inclusion would work on his/her server.  So, this is what I encountered anyway.  My resolution to it was to change the CWD just before the shipping modules are included and then return it back to admin afterwards.  Now everything works.

I am not sure if this is server specific, or php version specific.  Someone with more sysadmin experience than me can comment about that.  I guess there must be some complication if not everyone is experiencing this.

Nick
16 Apr 2018, 3:43 PM
#1303
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@niccol, the changes to the /includes/classes/shipping.php use the absolute directory when loaded via the admin (the pre-pending of the DIR_FS_CATALOG to the 'relative' directories). Is it perhaps that the DIR_FS_CATALOG identified in the admin's /includes/configure.php is empty?

16 Apr 2018, 3:59 PM
#1304
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

Which changes to shipping.php?

(no DIR_FS_CATALOG is not empty)

16 Apr 2018, 4:27 PM
#1305
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

Oh, I see. There are changes to shipping.php in v1.5.5

My mistake. I had expected backwards compatibility. But should not have. And it does have a warning if you read down the list of previous versions.

My bad.

16 Apr 2018, 4:47 PM
#1306
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

niccol:

Oh, I see. There are changes to shipping.php in v1.5.5

My mistake. I had expected backwards compatibility. But should not have. And it does have a warning if you read down the list of previous versions.

My bad.
No problems.

Regarding the backwards compatibility, it's something I strive for but the core-file changes needed for Edit Orders affect modules that seem to change on each new Zen Cart release ... so I'm working to push the required notifiers into the "core" and rely on those notifications being present for various plugins' operation! The shipping.php class for EO is a case-in-point.

18 Apr 2018, 4:05 PM
#1307
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lat9:

No problems.

Regarding the backwards compatibility, it's something I strive for but the core-file changes needed for Edit Orders affect modules that seem to change on each new Zen Cart release ... so I'm working to push the required notifiers into the "core" and rely on those notifications being present for various plugins' operation! The shipping.php class for EO is a case-in-point.
A cautionary note for stores that are still using Zen Cart 1.5.4 has been added to the ***top ***of the EO Plugin download page (https://www.zen-cart.com/downloads.php?do=file&id=1513) ... thanks @swguy!

29 Apr 2018, 4:33 PM
#1308
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

I've come across a couple of issues that can occur during an order's update if changes were made to a product (or its attributes) after-order:

  1. A product in the order is currently disabled, its stock-quantity+order-quantity is a positive value and the store's configuration uses:
  1. Stock->Subtract Stock, set to 'true'.
  2. Stock->Show products when out of stock, set to '0'
    Updating the order will cause the disabled product to be re-enabled. This issue has been around since at least v4.0.4.
  1. A product in the order was deleted/removed from the shop after the order was placed.

    Updating the order "might" result in the product's name being erased from the order. Not clear when this issue was introduced; v4.0.4 processes correctly.

  2. An attributed product exists in the order, but a purchased attribute is no longer available on the shop (i.e. that attribute has been deleted from the product).

    Viewing that order will show a **different **attribute selected, since the purchased one doesn't exist anymore, and updating the order will change the attribute from the one purchased without updating pricing. This issue has also been around since at least v4.0.4.

My plan is to create a script (an init_include) that, upon loading EO, checks for the above conditions and notifies via header-message (in English only) of the condition. The admin can choose to continue the order's edit (removing any products identified will be OK, but the action on update will not be "pretty").

The ultimate solution (detecting and acting upon the conditions in-code) are going to be tied to the Edit Orders restructuring (see EO GitHub issue #59 for additional information).

I'll post back here once the script is available; it *should *be usable on all Zen Cart installations.

29 Apr 2018, 5:21 PM
#1309
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Attached is a small zip-file that contains the two modules to be installed in YOUR_ADMIN directory to provide those messages:

  1. admin/includes/auto_loaders/config.eo_cautions.php
  2. admin/includes/init_includes/edit_orders_cautions.php
    Attachment #17819

I'll report back to this support-thread when the updated version of Edit Orders is available that correctly deals with these conditions.

12 Jun 2018, 3:46 AM
#1310
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Edit Orders Version 4.1.4
Zencart Version 1.5.1

Hi i have a problem.

when i click update button i meet blank page. however, update button is working on most orders.

so i checked edit_orders.php file. and i saw "if ($status < 1) break;".

most order's status are larger than 1 but orders status having blank page are 0.

can someone explain why some orders have 0 status?

and how to solve not to see blank page?

thanks...

12 Jun 2018, 10:40 AM
#1311
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

sungmo:

Edit Orders Version 4.1.4
Zencart Version 1.5.1

Hi i have a problem.

when i click update button i meet blank page. however, update button is working on most orders.

so i checked edit_orders.php file. and i saw "if ($status < 1) break;".

most order's status are larger than 1 but orders status having blank page are 0.

can someone explain why some orders have 0 status?

and how to solve not to see blank page?

thanks...
Zen Cart 1.5.1 (released in 2012) is going to be more difficult to debug, but when you receive a blank-page there "should" be a file created in your store's /logs directory named myDEBUG-adm-*.log that identify what the PHP issue is.

Remember that the -adm- debug-logs contain your store's secret-admin name, so if you post the contents of that file, be sure to xxx-out that name.

Other than some underlying PHP-related issue, I have no explanation for your orders that have an undefined (i.e. 0) value for their status-code ... but that's for a separate forum posting to determine.

12 Jun 2018, 3:39 PM
#1312
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hi thanks for your answer...

below is the myDEBUG-adm-1528817021-296426.log's content

PHP Warning: Cannot modify header information - headers already sent by (output started at /home/tucsoncitycenter/public_html/xxx/edit_orders.php:69) in /home/tucsoncitycenter/public_html/xxx/includes/functions/general.php on line 23

and below is the general.php's 23 line

// Redirect to another page or site
function zen_redirect($url) {
global $logger;

// clean up URL before executing it
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
while (strstr($url, '&&')) $url = str_replace('&&', '&', $url);
// header locates should not have the & in the address it breaks things
while (strstr($url, '&')) $url = str_replace('&', '&', $url);

header('Location: ' . $url);                // line 23
session_write_close();
if (STORE_PAGE_PARSE_TIME == 'true') {
  if (!is_object($logger)) $logger = new logger;
  $logger->timer_stop();
}
exit;

}

and below is the DEBUG-update_order-1528817154-119718.log in logs/edit_orders

============================================================
= Edit Orders (4.1.4) Action Log

Order ID: 1128
Action Requested: update_order
Enabled Order Totals: ot_subtotal;ot_shipping;ot_tax;ot_gv;ot_total

can you guess what the problem is on my website?

and if i give you my website's info...can you check for me?

thanks have a good one.

12 Jun 2018, 4:30 PM
#1313
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@sungmo, it's been about 2 years since I looked at EO 4.1.4. Would you post the top 100 lines of /your_admin/edit_orders.php (using "CODE" tags) and identify which line is #69.

12 Jun 2018, 4:49 PM
#1314
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

@sungmo, it's been about 2 years since I looked at EO 4.1.4. Would you post the top 100 lines of /your_admin/edit_orders.php (using "CODE" tags) and identify which line is #69.

line 69 is after if ($status < 1) break;

thanks...

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ global $db; require('includes/application_top.php'); // Check for commonly broken attribute related items eo_checks_and_warnings(); // Start the currencies code include_once(DIR_WS_INCLUDES . 'init_includes/init_currencies.php'); // Use the normal order class instead of the admin one include(DIR_FS_CATALOG . DIR_WS_CLASSES . 'order.php'); $oID = zen_db_prepare_input($_GET['oID']); $step = zen_db_prepare_input($_POST['step']); $add_product_categories_id = zen_db_prepare_input($_POST['add_product_categories_id']); $add_product_products_id = zen_db_prepare_input($_POST['add_product_products_id']); $add_product_quantity = zen_db_prepare_input($_POST['add_product_quantity']); $orders_statuses = array(); $orders_status_array = array(); $orders_status_query = $db->Execute("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int)$_SESSION['languages_id'] . "' order by orders_status_id"); while (!$orders_status_query->EOF) { $orders_statuses[] = array('id' => $orders_status_query->fields['orders_status_id'], 'text' => $orders_status_query->fields['orders_status_name'] . ' [' . $orders_status_query->fields['orders_status_id'] . ']'); $orders_status_array[$orders_status_query->fields['orders_status_id']] = $orders_status_query->fields['orders_status_name']; $orders_status_query->MoveNext(); } $action = (isset($_GET['action']) ? $_GET['action'] : 'edit'); if (zen_not_null($action)) { if(EO_DEBUG_ACTION_LEVEL > 0) eo_log( '============================================================' . PHP_EOL . '= Edit Orders (' . EO_VERSION . ') Action Log' . PHP_EOL . '============================================================' . PHP_EOL . 'Order ID: ' . $oID . PHP_EOL . 'Action Requested: ' . $action . PHP_EOL . 'Enabled Order Totals: ' . str_replace('.php', '', MODULE_ORDER_TOTAL_INSTALLED) . PHP_EOL ); switch ($action) { // Update Order case 'update_order': $comments = zen_db_prepare_input($_POST['comments']); $status = (int)zen_db_prepare_input($_POST['status']); if ($status < 1) break; $order_updated = false; $sql_data_array = array( 'customers_name' => zen_db_prepare_input($_POST['update_customer_name']), 'customers_company' => zen_db_prepare_input($_POST['update_customer_company']), 'customers_street_address' => zen_db_prepare_input($_POST['update_customer_street_address']), 'customers_suburb' => zen_db_prepare_input($_POST['update_customer_suburb']), 'customers_city' => zen_db_prepare_input($_POST['update_customer_city']), 'customers_state' => zen_db_prepare_input($_POST['update_customer_state']), 'customers_postcode' => zen_db_prepare_input($_POST['update_customer_postcode']), 'customers_country' => zen_db_prepare_input($_POST['update_customer_country']), 'customers_telephone' => zen_db_prepare_input($_POST['update_customer_telephone']), 'customers_email_address' => zen_db_prepare_input($_POST['update_customer_email_address']), 'last_modified' => 'now()', 'billing_name' => zen_db_prepare_input($_POST['update_billing_name']), 'billing_company' => zen_db_prepare_input($_POST['update_billing_company']), 'billing_street_address' => zen_db_prepare_input($_POST['update_billing_street_address']), 'billing_suburb' => zen_db_prepare_input($_POST['update_billing_suburb']), 'billing_city' => zen_db_prepare_input($_POST['update_billing_city']), 'billing_state' => zen_db_prepare_input($_POST['update_billing_state']), 'billing_postcode' => zen_db_prepare_input($_POST['update_billing_postcode']), 'billing_country' => zen_db_prepare_input($_POST['update_billing_country']), 'delivery_name' => zen_db_prepare_input($_POST['update_delivery_name']), 'delivery_company' => zen_db_prepare_input($_POST['update_delivery_company']), 'delivery_street_address' => zen_db_prepare_input($_POST['update_delivery_street_address']), 'delivery_suburb' => zen_db_prepare_input($_POST['update_delivery_suburb']), 'delivery_city' => zen_db_prepare_input($_POST['update_delivery_city']), 'delivery_state' => zen_db_prepare_input($_POST['update_delivery_state']), 'delivery_postcode' => zen_db_prepare_input($_POST['update_delivery_postcode']), 'delivery_country' => zen_db_prepare_input($_POST['update_delivery_country']), 'payment_method' => zen_db_prepare_input($_POST['update_info_payment_method']), 'cc_type' => zen_db_prepare_input($_POST['update_info_cc_type']), 'cc_owner' => zen_db_prepare_input($_POST['update_info_cc_owner']), 'cc_expires' => zen_db_prepare_input($_POST['update_info_cc_expires']) );
12 Jun 2018, 5:39 PM
#1315
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

For future reference, those "CODE" tags are inserted when you click the big # in the toolbar when you're writing a post. To include code (or large blocks of text), click that # button and then insert your code or text between the CODE and /CODE tags.

When you initially display an order for editing, there's a block at the bottom of the page that you use to change an order's status or add a message to the user. The 'status' field is the dropdown list of order-status values, used when you're changing the status of an order.

When you click that dropdown, what values are shown as possible?

12 Jun 2018, 6:28 PM
#1316
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lat9:

For future reference, those "CODE" tags are inserted when you click the big # in the toolbar when you're writing a post. To include code (or large blocks of text), click that # button and then insert your code or text between the CODE and /CODE tags.

When you initially display an order for editing, there's a block at the bottom of the page that you use to change an order's status or add a message to the user. The 'status' field is the dropdown list of order-status values, used when you're changing the status of an order.

When you click that dropdown, what values are shown as possible?

thanks...

i can see 4 lists..

Pending [1]
Processing [2]
Sent [3]
Update [4]

12 Jun 2018, 7:41 PM
#1317
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Hmm, that doesn't make sense. That $status value that is being detected as 0 is the result of that dropdown form-element.

1 Jul 2018, 5:08 PM
#1318
webchills avatar

webchills

Zen Follower

Join Date:
Sep 2005
Location:
Austria
Posts:
99
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

In Edit Orders 4.3.4 strange things are happening for stores which are displaying prices with tax and charge tax on the shipping fee.

To reproduce configure a vanilla 1.5.5f store like this (99% of b2c stores in Germany are configured like this):

Store Country: Germany
Zone: Berlin
Display Prices with tax: true
Display Prices with tax in Admin: true
Basis of Product Tax: Shipping
Basis of Shipping Tax: Shipping
Currency: Euro (Decimal Places: 2)
Tax Rate: 19%
Shipping Module: flat (set a price of 4.16 with tax class taxable goods so the result with tax will be 4.95 Euro)
Test product: set a price of 29.9000 gross

Order the product, the result will be:

Sub-Total: €29.90
Flat Rate (Best Way): €5.89
19%: €5.57
Total: €35.79

Edit the order with Edit Orders 4.3.4, do not change anything, just click the update button

The result will be:
Sub-Total: €29.90
Flat Rate (Best Way): €5.89
19%: €5.71
Total: €35.79

Note that the tax amount has magically increased.

EO log:

2018-07-01 18:46:41, Edit Orders entered (4.3.4) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/edit_orders.php on line #705
	Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 5.57, Total: 34.86, Tax Groups: {"19.0000":"1"}
	$_SESSION['shipping']: (not set)

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual

getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 0.94.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 4.95, 4.16, 0.79
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
	Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: 4.78, Total: 34.86, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual

============================================================
= Creating display of Order Product #1
============================================================
Product Details:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}


2018-07-01 18:46:59, Edit Orders entered (4.3.4) action (update_order)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/manager/edit_orders.php on line #305
	Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 0.00, Total: 34.86, Tax Groups: {"19.0000":"1"}
	$_SESSION['shipping']: (not set)

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual

getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 0.94.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 4.95, 4.16, 0.79
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
	Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.86, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551


Order Subtotal: 29.9

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551
Order Tax (total): -0.79
Order Tax Groups:
{"19%":4.77}

Requested Products:
array (
  1 => 
  array (
    'qty' => '1',
    'name' => 'Test',
    'model' => '',
    'tax' => '19',
    'final_price' => '25.13',
  ),
)
Products in Original Order: 
array (
  0 => 
  array (
    'qty' => 1,
    'id' => '1',
    'name' => 'Test',
    'model' => '',
    'tax' => '19.0000',
    'price' => '25.1261',
    'final_price' => '25.1300',
    'onetime_charges' => '0.0000',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
  ),
)

Order Product ID: 1 Row ID: 0
Product in Request: 
{"qty":1,"name":"Test","model":"","tax":"19","final_price":"25.13"}

Old Product:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
Old Order Subtotal: 29.9
Old Order Totals: 		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551
Old Tax (total): -0.79
Old Tax Groups:
{"19%":4.77}
eo_update_order_subtotal (), taxes on entry.  Called by /var/www/xxx/edit_orders.php on line #370
	Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.86, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9047
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €5.57, Value: 5.5651
		ot_total. Text: €34.86, Value: 34.8551


getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.

eo_update_order_subtotal, taxes on exit. 
	Subtotal: 0, Shipping: 4.16, Shipping Tax: 0, Tax: -5.56, Total: 4.16, Tax Groups: {"19%":0}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €0.00, Value: 0
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-5.56, Value: -5.56
		ot_total. Text: €4.16, Value: 4.16


Removed Product Order Subtotal: 0
Removed Product Order Totals: 		ot_subtotal. Text: €0.00, Value: 0
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-5.56, Value: -5.56
		ot_total. Text: €4.16, Value: 4.16
Removed Product Tax (total): -5.56
Removed Product Tax Groups:
{"19%":0}
eo_update_order_subtotal (1), taxes on entry.  Called by /var/www/xxx/manager/edit_orders.php on line #429
	Subtotal: 0, Shipping: 4.16, Shipping Tax: 0, Tax: -5.56, Total: 4.16, Tax Groups: {"19%":0}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €0.00, Value: 0
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-5.56, Value: -5.56
		ot_total. Text: €4.16, Value: 4.16


getProductTaxes(19%)
false{"id":1,"qty":1,"tax":"19","name":"Test","model":"","price":"25.1261","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"19%","onetime_charges":0,"final_price":"25.13"}
getProductTaxes, returning 4.77.

eo_update_order_subtotal, taxes on exit. 
	Subtotal: 29.9, Shipping: 4.16, Shipping Tax: 0, Tax: -0.79, Total: 34.06, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06


Pricing, as entered, was used.
Added Product:
{"id":1,"qty":1,"tax":"19","name":"Test","model":"","price":"25.1261","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"19%","onetime_charges":0,"final_price":"25.13"}
Added Product Order Subtotal: 29.9
Added Product Order Totals:		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
Added Product Tax (total): -0.79
Added Product Tax Groups:
{"19%":4.77}

Updated Products in Order:
array (
  0 => 
  array (
    'id' => 1,
    'qty' => 1.0,
    'tax' => '19',
    'name' => 'Test',
    'model' => '',
    'price' => '25.1261',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_virtual' => '0',
    'product_is_always_free_shipping' => '0',
    'tax_description' => '19%',
    'onetime_charges' => 0,
    'final_price' => '25.13',
    'stock_reduce' => 1.0,
  ),
)
Updated Products Order Totals:		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
Updated Products Tax (total): 4.77
Updated Products Tax Groups:
{"19%":4.77}


============================================================
= Processing Requested Updates to Order Totals
============================================================

Requested Order Totals:
array (
  0 => 
  array (
    'code' => 'ot_shipping',
    'shipping_module' => 'flat',
    'title' => 'Flat Rate (Best Way):',
    'value' => '4.9504',
  ),
  1 => 
  array (
    'code' => 'ot_coupon',
    'title' => '',
    'value' => '',
    'shipping_module' => 'flat',
  ),
)
Starting Order Totals:		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
Starting Tax (total): 4.77
Starting Tax Groups:
{"19%":4.77}
eo_update_database_order_total: and_clause: (), found (0), array (
  'code' => 'ot_shipping',
  'shipping_module' => 'flat',
  'title' => 'Flat Rate (Best Way):',
  'value' => 4.9504000000000001,
  'text' => '€4.95',
  'sort_order' => NULL,
)
eo_update_database_order_total: and_clause: (), found (1), array (
  'code' => 'ot_coupon',
  'title' => '',
  'value' => 0.0,
  'shipping_module' => 'flat',
  'text' => '€0.00',
  'sort_order' => NULL,
)

eo_update_database_order_totals, taxes/totals on entry.  Called by /var/www/xxx/edit_orders.php on line #585
	Subtotal: 29.9, Shipping: 4.9504, Shipping Tax: 0, Tax: 4.77, Total: 34.06, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
		ot_coupon. Text: €0.00, Value: 0


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual
Checking taxes for ot_coupon: Tax class (MODULE_ORDER_TOTAL_COUPON_TAX_CLASS:0), 0
eo_update_database_order_totals, after adjustments: order_total: 35.790976, order_tax: 5.710576
eo_update_database_order_totals, after process: order_total: 35.790976, order_tax: 5.710576
[{"code":"ot_subtotal","title":"Sub-Total:","text":"€29.90","value":29.9,"sort_order":"100"},{"code":"ot_shipping","title":"Flat Rate (Best Way)::","text":"€5.89","value":5.890976,"sort_order":"200"},{"code":"ot_tax","title":"19%:","text":"€5.71","value":5.710576,"sort_order":"300"},{"code":"ot_total","title":"Total:","text":"€35.79","value":35.790976,"sort_order":"999"}]
[{"title":"Sub-Total:","text":"€29.90","class":"ot_subtotal","value":29.9},{"title":"Flat Rate (Best Way):","text":"€4.95","class":"ot_shipping","value":4.9504},{"title":"19%:","text":"€-0.79","class":"ot_tax","value":-0.79},{"title":"Total:","text":"€34.06","class":"ot_total","value":34.06},{"class":"ot_coupon","title":"","value":0,"text":"€0.00","sort_order":null}]
eo_update_database_order_total: and_clause: (), found (0), array (
  'code' => 'ot_subtotal',
  'title' => 'Sub-Total:',
  'text' => '€29.90',
  'value' => 29.899999999999999,
  'sort_order' => '100',
)
eo_update_database_order_total: and_clause: (), found (0), array (
  'code' => 'ot_shipping',
  'title' => 'Flat Rate (Best Way)::',
  'text' => '€5.89',
  'value' => 5.8909760000000002,
  'sort_order' => '200',
)
eo_update_database_order_total: and_clause: (), found (0), array (
  'code' => 'ot_tax',
  'title' => '19%:',
  'text' => '€5.71',
  'value' => 5.7105759999999997,
  'sort_order' => '300',
)
eo_update_database_order_total: and_clause: (), found (0), array (
  'code' => 'ot_total',
  'title' => 'Total:',
  'text' => '€35.79',
  'value' => 35.790976000000001,
  'sort_order' => '999',
)
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: title = 'Flat Rate (Best Way):' OR `class` = ''
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: `class` = ''
Removing order-total, and-clause: title = '' OR `class` = ''
eo_update_database_order_totals, taxes on exit. 
	Subtotal: 29.9, Shipping: 5.890976, Shipping Tax: 0.940576, Tax: 5.710576, Total: 35.790976, Tax Groups: {"19%":5.710576}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
		ot_coupon. Text: €0.00, Value: 0


Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
		ot_coupon. Text: €0.00, Value: 0

Updated Tax (total): 5.710576
Updated Tax Groups:
{"19%":5.710576}

============================================================
= Done Processing Requested Updates to the Order
============================================================

Final Subtotal: 29.9
Final Totals:		ot_subtotal. Text: €29.90, Value: 29.9
		ot_shipping. Text: €4.95, Value: 4.9504
		ot_tax. Text: €-0.79, Value: -0.79
		ot_total. Text: €34.06, Value: 34.06
		ot_coupon. Text: €0.00, Value: 0
Final Tax (total): 5.710576
Final Tax Groups:
{"19%":5.710576}

2018-07-01 18:47:00, Edit Orders entered (4.3.4) action (edit)
Enabled Order Totals: ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_loworderfee.php;ot_gv.php;ot_total.php
getOrderInfo, on entry: Called by /var/www/xxx/edit_orders.php on line #705
	Subtotal: (not set), Shipping: (not set), Shipping Tax: (not set), Tax: 5.71, Total: 35.79, Tax Groups: {"19.0000":"1"}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way)","id":"flat_","cost":4.95}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9000
		ot_shipping. Text: €5.89, Value: 5.8910
		ot_tax. Text: €5.71, Value: 5.7106
		ot_total. Text: €35.79, Value: 35.7910


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual

getProductTaxes(19%)
{"products_tax_class_id":"1"}{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
getProductTaxes, returning 4.77.


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual
calculateOrderShippingTax returning 1.12.
removeTaxFromShippingCost(order, flat), 1, Shipping, 1.19, 5.89, 4.95, 0.94
getOrderInfo, on exit:
{"code":"flat","title":"Flat Rate","description":"Flat Rate","icon":"","enabled":true,"sort_order":"0","tax_class":"1","tax_basis":"Shipping"}
	Subtotal: 29.9, Shipping: 4.95, Shipping Tax: 0, Tax: 4.77, Total: 35.79, Tax Groups: {"19%":4.77}
	$_SESSION['shipping']: {"title":"Flat Rate (Best Way):","id":"flat_","cost":5.89}

Order Totals
		ot_subtotal. Text: €29.90, Value: 29.9000
		ot_shipping. Text: €5.89, Value: 5.8910
		ot_tax. Text: €5.71, Value: 5.7106
		ot_total. Text: €35.79, Value: 35.7910


Checking order for virtual status.  Order contains 1 unique products, 0 of those are virtual

============================================================
= Creating display of Order Product #2
============================================================
Product Details:
{"qty":1,"id":"1","name":"Test","model":"","tax":"19.0000","price":"25.1261","final_price":"25.1300","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0"}
2 Jul 2018, 3:07 PM
#1319
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

@webchills, did you try clicking on the "Update" button twice? EO has issues at times with tax-related calculations.

I appreciate the detailed steps to reproduce the issue and will attempt that later today.

2 Jul 2018, 3:30 PM
#1320
webchills avatar

webchills

Zen Follower

Join Date:
Sep 2005
Location:
Austria
Posts:
99
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

lat9:

@webchills, did you try clicking on the "Update" button twice?
If you click twice the tax amount is increased again. Every click increases it further