Page 77 of 188 FirstFirst ... 2767757677787987127177 ... LastLast
Results 761 to 770 of 1878
  1. #761
    Join Date
    Apr 2015
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    Default Re: 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 ..

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

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

    so the code looks like this now...

    Code:
    // 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
    Last edited by Andy_M; 2 Jul 2015 at 04:29 AM.

  2. #762
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

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

  3. #763
    Join Date
    Apr 2015
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    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

  4. #764
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,360
    Plugin Contributions
    23

    Default 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.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  5. #765
    Join Date
    Nov 2009
    Location
    West Yorkshire, UK
    Posts
    13
    Plugin Contributions
    0

    Default 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

  6. #766
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

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

  7. #767
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    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?

  8. #768
    Join Date
    Jul 2014
    Location
    New Orleans LA
    Posts
    26
    Plugin Contributions
    0

    Default 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

  9. #769
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by jerrygarciuh View Post
    ...
    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.

    Quote Originally Posted by jerrygarciuh View Post
    ...
    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).
    Last edited by lhungil; 9 Aug 2015 at 07:12 PM.

  10. #770
    Join Date
    Jul 2014
    Location
    New Orleans LA
    Posts
    26
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    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.

    Name:  2015-08-09 16_30_13-https___baumerfoods.com_products_bfiadmin_edit_orders.php_page=1&oID=11435&a.jpg
Views: 184
Size:  12.8 KB

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

    Appreciate the help!

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 804
    Last Post: 18 Apr 2025, 12:04 AM
  2. v150 Orders Status History -- Updated By [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 29 Jul 2019, 07:05 PM
  3. Edit Orders v3.0 for ZC 1.3.9 [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 656
    Last Post: 18 Apr 2016, 06:28 PM
  4. v139h Super Orders v3.0 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1018
    Last Post: 28 Apr 2014, 11:38 PM
  5. RE: Super Orders v3.0 Support Thread
    By Johnnyd in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Jun 2011, 09:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR