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

Edit Orders v4.0 Support Thread

Views: 345,905

Results 761 to 780 of 1,927
02 Jul 2015, 03:25
#761
andy_m avatar

andy_m

New Zenner

Join Date:
Apr 2015
Location:
United States
Posts:
15
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

OK..

I think I found a solution to this, in case anyone else has the Optional Shipping Insurance with Edit Orders 4.1.4 and ZenCart 1.5.4..

In the file..
\My_Admin_Folder\edit_orders.php

Near line 437 after ..

// TODO Special processing for some modules
	if(zen_not_null($order_total['title']) && $order_total['title'] != ':') {
		switch($order_total['code']) {

I added...

case 'ot_insurance':
	$_SESSION['opt_insurance'] = true;
	break;

so the code looks like this now...

// TODO Special processing for some modules
	if(zen_not_null($order_total['title']) && $order_total['title'] != ':') {
	switch($order_total['code']) {
		case 'ot_insurance':
			$_SESSION['opt_insurance'] = true;
			break;
		case 'ot_shipping':
			$GLOBALS['order']->info['shipping_cost'] = $order_total['value'];
			$GLOBALS['order']->info['shipping_module_code'] = $order_total['shipping_module'];
			break;
		case 'ot_tax':

This seems to give the ot_insurance code the variable it needs to add the insurance to the order total correctly.

Let me know if anyone else tries this and has success or problems..

-Andy

02 Jul 2015, 04:30
#762
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

May want to double check to ensure your change does not FORCE insurance on all orders when updated via edit orders (including when saving an order where the customer did not request insurance). The above runs a good likelyhood of also flipping insurance for any subsequent order as you are adding the change into the Store Admin's login session (persists beyond a single admin page / request).

May be better to update ot_insurance.php to check if the module was already part of the order and loaded via admin (and if both are true, flip the flag instead of adding to the session).

03 Jul 2015, 01:12
#763
andy_m avatar

andy_m

New Zenner

Join Date:
Apr 2015
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lhungil:

May want to double check to ensure your change does not FORCE insurance on all orders when updated via edit orders (including when saving an order where the customer did not request insurance). The above runs a good likelyhood of also flipping insurance for any subsequent order as you are adding the change into the Store Admin's login session (persists beyond a single admin page / request).

May be better to update ot_insurance.php to check if the module was already part of the order and loaded via admin (and if both are true, flip the flag instead of adding to the session).

Thanks lhungil,

I was pondering those same possibilities. So far my testing has not produced any problems with unintended application of insurance, both in the Admin Edit Orders or with customers regular shopping cart. I will keep testing, but so far this seems to work for me.

I appreciate your taking time to look at it.

Andy

04 Jul 2015, 11:16
#764
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Edit Orders v4.0 Support Thread

Has anyone reported calculation problems with zc 1.5.4 and php 5.5.25? I moved the site from one server to another so no change to the site, just the new php version. On an order with about 40 items it should add up to 268 but instead is totaled 270 once the order was edited. Not much difference but still an indication that something isn't working exactly correct.

05 Jul 2015, 13:41
#765
treefrog avatar

treefrog

New Zenner

Join Date:
Nov 2009
Location:
West Yorkshire, UK
Posts:
13
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hi,
Does anyone know the reason for the 'Advanced Attributes Editor' being removed from Edit Orders 4.1.x ?
I've looked around and can't seem to find reference to it here in the Forum nor in Logs etc.
I just wondered if there was a specific reason I should know about before I go about butchering it back in place.
Many Thanks

05 Jul 2015, 17:37
#766
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

Edit Orders 4.0 did all the math internally. Edit Orders 4.1 lets functions from the Zen Cart customer checkout and order total modules do most of the math.

Edit Orders 4.1.x currently allows changing attributes (as long as the attributes exist and are assigned to the product - so if the attribute shows on the customer side it shows on the admin side - if not on the customer side it is not an option on the admin side).

The "advanced" attribute editor allowed adding attributes which do not exist in the database to products. This led to an inconsistent customer experience. Also in some edge cases handling products or attributes not in the database can result in unintended side effects (and calculation errors).

29 Jul 2015, 00:31
#767
yaseent avatar

yaseent

Zen Follower

Join Date:
Mar 2009
Posts:
169
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

lhungil:

May want to double check to ensure your change does not FORCE insurance on all orders when updated via edit orders (including when saving an order where the customer did not request insurance). The above runs a good likelyhood of also flipping insurance for any subsequent order as you are adding the change into the Store Admin's login session (persists beyond a single admin page / request).

May be better to update ot_insurance.php to check if the module was already part of the order and loaded via admin (and if both are true, flip the flag instead of adding to the session).

Hey Andy_M,

thanks for posting a solution to using the Optional Insurance module.

Just a question, have you picked up any issues up to now on your implementation?

Does it calculate correctly and avoid globalizing the insurance onto orders that were not originally selected for insurance?

09 Aug 2015, 00:08
#768
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hello,

I successfully added Admin New Customer 3 this week to a functioning v1.5.3 ZC install.

Today I installed Edit Orders 4 and it appeared to go fine but when using the Update button to submit form on /edit_orders.php?page=1&oID=11435&action=update_order I get "WARNING: An Error occurred, please refresh the page and try again."

The error being logged by these is

PHP Fatal error: 1054:Unknown column 'p.products_quantity' in 'field list' ::
SELECT p.products_quantity FROM products WHERE p.products_id = '153' ==>
(as called by) /[snip]myadmin/includes/functions/extra_functions/edit_orders_functions.php on line 1028
<== in [snip]/includes/classes/db/mysql/query_factory.php on line 155

On checking the referenced line I found that the query did not supply the alias p for the table...

$check = $db->Execute(
'SELECT p.products_quantity FROM ' . TABLE_PRODUCTS . ' ' .
'WHERE p.products_id = '' . (int)$query->fields['products_id'] . '''
);

After changing the above code to TABLE_PRODUCTS . '` p ' . the error was resolved.

Since editing an order occurs post sale should I assume that order total and weights/shipping amounts will not be affected by edits?

Thanks!

David

09 Aug 2015, 18:07
#769
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

jerrygarciuh:

...
The error being logged by these is

PHP Fatal error: 1054:Unknown column 'p.products_quantity' in 'field list' ::
SELECT p.products_quantity FROM products WHERE p.products_id = '153' ==>
(as called by) /[snip]myadmin/includes/functions/extra_functions/edit_orders_functions.php on line 1028
<== in [snip]/includes/classes/db/mysql/query_factory.php on line 155
...
Glad you were able to solve the issue you were experiencing. The issue (and solution) previously posted is very similiar (just a bit more explicit).

If you are not already, I've found adding "site:zen-cart.com" to the end of search queries on Bing and Google to be very helpful when searching this site (forums, wiki, plugins, etc). I've found it especially helpful (and time saving) when searching for specific error messages or bugs / bugfixes.

jerrygarciuh:

...
Since editing an order occurs post sale should I assume that order total and weights/shipping amounts will not be affected by edits? ...
Yes and No.

Nope. When you add / remove / update items (or totals / addresses) in an order the Zen Cart code for processing order totals is run again, so order totals will be updated (unless the order total module is not compatibble with being loaded from the admin and interacting directly with $order).

Yes. The shipping module code to generate a shipping quote is not called, so shipping is not recalculated and will appear in the admin as the customer selected (as long as they are not changed - and the shipping module is enabled).

09 Aug 2015, 21:41
#770
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

lhungil:

Nope. When you add / remove / update items (or totals / addresses) in an order the Zen Cart code for processing order totals is run again, so order totals will be updated (unless the order total module is not compatible with being loaded from the admin and interacting directly with $order).

Thank you for the reply! I am using Local Sales Tax but otherwise I believe my Order Total process is default one for v1.5.3.

When I update order items I am seeing taxes calculated correctly for the new order total but the sub-total is coming up $0.00. The completed order total is being calculated a $0 for subtotal and then correctly adding current shipping amount and tax.

In this example I have deleted a hat which was only item in a real order after using Edit Orders to add two cases of hot sauce.

Attachment 15518

Do you have any advice on sub-total issue or should I dig into code and see what I can find?

Appreciate the help!

10 Aug 2015, 00:36
#771
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

Usually means the subtotal stored in the database is no longer synced (it is not recalculated by Edit Orders). I've also seen this in the past when 'ot_subtotal' (Subtotal Order Total Module) is disabled (needs to be enabled for Edit Orders to work correctly). The most common cause is if there was an ERROR while updating an order (such as the p one you saw). Quickest fix is to just update the two related database tables by hand (if you really need to keep the order), or just delete and re-create the order.

For reference it will be the row in the table 'orders_total' corresponding to the row storing the value of 'ot_subtotal' for the order.

10 Aug 2015, 14:52
#772
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

OK, thank lhungil! I appreciate your time and the mods! Order Sub-Total was enabled so I will dig in and see what I find. If anything useful comes up I will post here.

Peace,

David

10 Aug 2015, 16:01
#773
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I grepped files for EO_DEBUG_ACTION_LEVEL to see where it was being defined()ed but it looks like in my distro it is not defined. Since all references in codebase come from edit_orders.php I define()ed it at top of that file.

Debug output appears to show the new products being added and subsequently removed by the update routine...

I tried enabling SQL logging for whole store briefly but while edit_orders.php select statements appear to be logged, the update SQL was not.

Digging further now...

============================================================

= Edit Orders (4.1.4) Action Log
============================================================
Order ID: 11435
Action Requested: update_order
Enabled Order Totals: ot_subtotal;ot_shipping;ot_coupon;ot_group_pricing;ot_tax;ot_local_sales_taxes;ot_loworderfee;ot_gv;ot_total

Order Subtotal: 0.0000
Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Order Tax (total): 1.59
Order Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Requested Products:
array (
  17668 => 
  array (
    'qty' => '1',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4',
    'final_price' => '19.88',
  ),
  17669 => 
  array (
    'qty' => '1',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4',
    'final_price' => '19.88',
  ),
)


============================================================
= Processing Requested Updates to Products
============================================================



Products in Original Order: 
array (
  0 => 
  array (
    'qty' => 1,
    'id' => '29',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4.0000',
    'price' => '19.8800',
    'final_price' => '19.8800',
    'onetime_charges' => '0.0000',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
  ),
  1 => 
  array (
    'qty' => 1,
    'id' => '29',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4.0000',
    'price' => '19.8800',
    'final_price' => '19.8800',
    '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: 17668 Row ID: 0
Product in Request: 
array (
  'qty' => 1,
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'tax' => '4',
  'final_price' => '19.88',
)

Old Product:
array (
  'qty' => 1,
  'id' => '29',
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'tax' => '4.0000',
  'price' => '19.8800',
  'final_price' => '19.8800',
  '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: 0.0000
Old Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Old Tax (total): 1.59
Old Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Removed Product Order Subtotal: -19.88
Removed Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$-19.88',
    'class' => 'ot_subtotal',
    'value' => -19.88,
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$0.79',
    'class' => 'ot_tax',
    'value' => 0.7948,
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$-7.94',
    'class' => 'ot_total',
    'value' => -7.9352,
  ),
)

Removed Product Tax (total): 0.7948
Removed Product Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 0.7952,
)

Added Product:
array (
  'id' => 29,
  'qty' => 1,
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'price' => '19.8800',
  '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' => '4',
  'tax_description' => '4.0% Louisiana Sales Tax',
  'onetime_charges' => 0,
  'final_price' => '19.88',
)

Added Product Order Subtotal: 0
Added Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
    'value' => 0,
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
    'value' => 1.59,
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$12.74',
    'class' => 'ot_total',
    'value' => 12.74,
  ),
)

Added Product Tax (total): 1.59
Added Product Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Order Product ID: 17669 Row ID: 0
Product in Request: 
array (
  'qty' => 1,
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'tax' => '4',
  'final_price' => '19.88',
)

Old Product:
array (
  'qty' => 1,
  'id' => '29',
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'tax' => '4.0000',
  'price' => '19.8800',
  'final_price' => '19.8800',
  '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: 0
Old Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
    'value' => 0,
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
    'value' => 1.59,
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$12.74',
    'class' => 'ot_total',
    'value' => 12.74,
  ),
)

Old Tax (total): 1.59
Old Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Removed Product Order Subtotal: -19.88
Removed Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$-19.88',
    'class' => 'ot_subtotal',
    'value' => -19.88,
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$0.79',
    'class' => 'ot_tax',
    'value' => 0.7948,
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$-7.94',
    'class' => 'ot_total',
    'value' => -7.9352,
  ),
)

Removed Product Tax (total): 0.7948
Removed Product Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 0.7952,
)

Added Product:
array (
  'id' => 29,
  'qty' => 1,
  'name' => '6oz. [snipped] (Case of 24)',
  'model' => '',
  'price' => '19.8800',
  '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' => '4',
  'tax_description' => '4.0% Louisiana Sales Tax',
  'onetime_charges' => 0,
  'final_price' => '19.88',
)

Added Product Order Subtotal: 0
Added Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
    'value' => 0,
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
    'value' => 1.59,
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$12.74',
    'class' => 'ot_total',
    'value' => 12.74,
  ),
)

Added Product Tax (total): 1.59
Added Product Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Updated Products in Order:
array (
  0 => 
  array (
    'qty' => 1,
    'id' => '29',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4.0000',
    'price' => '19.8800',
    'final_price' => '19.8800',
    'onetime_charges' => '0.0000',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
  ),
  1 => 
  array (
    'qty' => 1,
    'id' => '29',
    'name' => '6oz. [snipped] (Case of 24)',
    'model' => '',
    'tax' => '4.0000',
    'price' => '19.8800',
    'final_price' => '19.8800',
    'onetime_charges' => '0.0000',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
  ),
)

Updated Products Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Updated Products Tax (total): 1.59
Updated Products Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Requested Order Totals:
array (
  0 => 
  array (
    'code' => 'ot_shipping',
    'shipping_module' => 'fedexwebservices',
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'value' => '11.1500',
  ),
  1 => 
  array (
    'code' => 'ot_loworderfee',
    'title' => 'Handling Fee:',
    'value' => '3.5000',
  ),
  2 => 
  array (
    'code' => 'ot_coupon',
    'title' => '',
    'value' => '',
    'shipping_module' => '',
  ),
)


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



Starting Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Handling Fee:',
    'text' => '$3.50',
    'class' => 'ot_loworderfee',
  ),
  4 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Starting Tax (total): 1.59
Starting Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
)

Updated Order Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Updated Tax (total): 1.59
Updated Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
  '' => 0,
)


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


Final Subtotal: 0.0000
Final Totals:
array (
  0 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
  ),
  1 => 
  array (
    'title' => 'FedEx (1 x 2.00lbs) (Ground Home Delivery):',
    'text' => '$11.15',
    'class' => 'ot_shipping',
  ),
  2 => 
  array (
    'title' => '4.0% Louisiana Sales Tax:',
    'text' => '$1.59',
    'class' => 'ot_tax',
  ),
  3 => 
  array (
    'title' => 'Total:',
    'text' => '$16.24',
    'class' => 'ot_total',
  ),
)

Final Tax (total): 1.59
Final Tax Groups:
array (
  '4.0% Louisiana Sales Tax' => 1.5904,
  '' => 0,
)
10 Aug 2015, 16:28
#774
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

New clue- the original order had a cap which I removed when adding the new products. When I add cap back to order the subtotal correctly reflects the cap but not the added products. Remove cap and subtotal goes back to zero.

10 Aug 2015, 16:52
#775
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

Once the subtotal is out of sync it will remain out of sync unless you either manually update the database table mentioned previously or the order is deleted and recreated. Continuing to play with the order via Edit Orders will not help until one of those two items is done.

Is this the same order as the one you were trying to edit when you received the "WARNING -" and the associated Zen Cart DEBUG log? If it is, this was probably the cause for the subtotal going out of sync on the order (as the process crashed while modifying the order).

12 Aug 2015, 16:20
#776
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

OK, thank you!

lhungil:

Once the subtotal is out of sync it will remain out of sync unless you either manually update the database table mentioned previously or the order is deleted and recreated. Continuing to play with the order via Edit Orders will not help until one of those two items is done.

Is this the same order as the one you were trying to edit when you received the "WARNING -" and the associated Zen Cart DEBUG log? If it is, this was probably the cause for the subtotal going out of sync on the order (as the process crashed while modifying the order).

07 Sep 2015, 12:24
#777
cefyn avatar

cefyn

New Zenner

Join Date:
May 2007
Posts:
87
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

Using zen cart 1.5.4 , edit orders 4 ,stock by attribute 1.5.4.
In step 1 of adding a product to order , a search box appears. Could someone tell me if there is a way for that function to be told to include the customid column of the products with attributes stock database table and output the item that goes with the customid ?

16 Sep 2015, 21:58
#778
b_noid avatar

b_noid

New Zenner

Join Date:
Sep 2015
Location:
Montreal, Canada
Posts:
5
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Hello everyone!
I've been poking around this thread for about a week now and i can't seem to find why my sub total and total doesn't update.
I reinstalled twice and it still doesn't work.
I use ZC 1.5.4 and as lhungil said, i tried with new order to rule out the out of sync problem with the DB.

If someone can give me a hint on where to look, that would be awesome.

Thanks in advance

Here is the log file :

============================================================
= Edit Orders (4.1.4) Action Log
============================================================
Order ID: 4
Action Requested: update_order
Enabled Order Totals: ot_subtotal;ot_shipping;ot_coupon;ot_group_pricing;ot_tax;ot_gv;ot_total

Order Subtotal: 129.9500
Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Order Tax (total): 0.00
Order Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 19.460012499999998,
)

Requested Products:
array (
  51 => 
  array (
    'qty' => '2',
    'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
    'model' => '',
    'tax' => '14.975',
    'final_price' => '129.95',
  ),
)


============================================================
= Processing Requested Updates to Products
============================================================



Products in Original Order: 
array (
  0 => 
  array (
    'qty' => 1,
    'id' => '477',
    'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
    'model' => '',
    'tax' => '14.9750',
    'price' => '129.9500',
    'final_price' => '129.9500',
    '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: 51 Row ID: 0
Product in Request: 
array (
  'qty' => 2,
  'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
  'model' => '',
  'tax' => '14.975',
  'final_price' => '129.95',
)

Old Product:
array (
  'qty' => 1,
  'id' => '477',
  'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
  'model' => '',
  'tax' => '14.9750',
  'price' => '129.9500',
  'final_price' => '129.9500',
  '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: 129.9500
Old Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Old Tax (total): 0.00
Old Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 19.460012499999998,
)

Removed Product Order Subtotal: 0
Removed Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$0.00',
    'class' => 'ot_subtotal',
    'value' => 0,
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$-19.46',
    'class' => 'ot_total',
    'value' => -19.460012499999998,
  ),
)

Removed Product Tax (total): -19.4600125
Removed Product Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 0,
)

Added Product:
array (
  'id' => 477,
  'qty' => 2,
  'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
  'model' => '',
  'price' => '129.9500',
  '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' => '14.975',
  'tax_description' => 'TPS/TVQ (14.975%)',
  'onetime_charges' => 0,
  'final_price' => '129.95',
)

Added Product Order Subtotal: 259.9
Added Product Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$259.90',
    'class' => 'ot_subtotal',
    'value' => 259.89999999999998,
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$279.36',
    'class' => 'ot_total',
    'value' => 279.36001249999998,
  ),
)

Added Product Tax (total): 19.4600125
Added Product Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 38.920024999999995,
)

Updated Products in Order:
array (
  0 => 
  array (
    'qty' => 2,
    'id' => '477',
    'name' => '30" Lifegard Aquatics Ultra-Slim Blue/White LED Light',
    'model' => '',
    'tax' => '14.9750',
    'price' => '129.9500',
    'final_price' => '129.9500',
    'onetime_charges' => '0.0000',
    'products_priced_by_attribute' => '0',
    'product_is_free' => '0',
    'products_discount_type' => '0',
    'products_discount_type_from' => '0',
  ),
)

Updated Products Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Updated Products Tax (total): 0.00
Updated Products Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 38.920024999999995,
)

Requested Order Totals:
array (
  0 => 
  array (
    'code' => 'ot_shipping',
    'shipping_module' => 'storepickup',
    'title' => 'Store Pickup (Walk In):',
    'value' => '0.0000',
  ),
  1 => 
  array (
    'code' => 'ot_coupon',
    'title' => '',
    'value' => '',
    'shipping_module' => '',
  ),
)


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



Starting Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Starting Tax (total): 0.00
Starting Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 38.920024999999995,
)

Updated Order Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Updated Tax (total): 0.00
Updated Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 38.920024999999995,
)


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


Final Subtotal: 129.9500
Final Totals:
array (
  0 => 
  array (
    'title' => 'Store Pickup (Walk In):',
    'text' => '$0.00',
    'class' => 'ot_shipping',
  ),
  1 => 
  array (
    'title' => 'Sub-Total:',
    'text' => '$129.95',
    'class' => 'ot_subtotal',
  ),
  2 => 
  array (
    'title' => 'Total:',
    'text' => '$149.41',
    'class' => 'ot_total',
  ),
)

Final Tax (total): 0.00
Final Tax Groups:
array (
  'TPS/TVQ (14.975%)' => 38.920024999999995,
)
17 Sep 2015, 00:24
#779
b_noid avatar

b_noid

New Zenner

Join Date:
Sep 2015
Location:
Montreal, Canada
Posts:
5
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

B-Noid:

I've been poking around this thread for about a week now and i can't seem to find why my sub total and total doesn't update.

Nevermind my last post... I finally found my problem! :D

Turns out i didn't delete line 44 of /includes/classes/order_total.php like i was suppose to... :lamo:

$module_file = DIR_WS_MODULES . 'order_total/' . $value;

Thank you for your time and this is a great plugin BTW
Have a good one!

02 Oct 2015, 07:46
#780
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
163
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I've been using ZC for quite a while, and have been using Edit Orders as a staple add-on.
At first I thought this might be related to rewards points, but after installing both the latest version of Rewards Points 2.5e and Edit order 4.1.4. Im beginning to think it's something else.

While editing an order, changing, updating any user information, adding products, or no change made at all, edit order will throw an error of the following after pressing the "update" button:
WARNING: An Error occurred, please refresh the page and try again.

If it's editing user information or adding a product, refreshing the order page will show the changes even after the error will show the changes.
However, trying to delete a product from an order, will throw the same error, but does not actually remove the product from the order.

Debug file shows this:
[01-Oct-2015 23:31:19 America/Los_Angeles] PHP Fatal error: 1054:Unknown column 'p.products_quantity' in 'field list' :: SELECT p.products_quantity FROM products WHERE p.products_id = '5646' ==> (as called by) /home/webuser/shopping/someadmin/includes/functions/extra_functions/edit_orders_functions.php on line 1028 <== in /home/webuser/shopping/includes/classes/db/mysql/query_factory.php on line 155

My configuration is the following:
Zen-Cart v1.5.4 Database Patch Level: 1.5.4 (From Server_info.php)
Edit Order 4.1.4
Reward Points 2.5e
Centos 6 Linux 2.6.32-504.23.4.el6.x86_64
MySQL 5.6.23-log (AWS RDS)
Apache/2.2.15
PHP 5.6.10

I can't seem to figure what's causing this, and kinda stumped on how to go about fixing it. Any insight would be most appreciated!