Page 128 of 179 FirstFirst ... 2878118126127128129130138178 ... LastLast
Results 1,271 to 1,280 of 1787
  1. #1271
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by marton_1 View Post
    OK great, sorry to make work.
    You're not making work, you're helping to improve EO.

    Look in your store's /admin/edit_orders.php, finding the following code section at around line 388:
    Code:
                                
                                // Handle the case where the product was deleted
                                // from the store. This should probably never be done.
                                // Removing the product will cause issues with links
                                // on invoices (order history) and will not allow the
                                // price(s) or tax(es) to be recalculated by Zen Cart.
                                if (!isset($new_product['price'])) {
                                    $new_product['price'] = $old_product['price'];
                                    $new_product['tax'] = $old_product['tax'];
                                    if ($new_product['tax'] > 0) {
                                        // Should match what is set by eo_get_product_taxes()
                                        // When no description is present in the database but
                                        // a tax rate exists on a product.
                                        $new_product['tax_description'] = TEXT_UNKNOWN_TAX_RATE . ' (' . zen_display_tax_value($new_product['tax']) . '%)';
                                    }
    
                                    $new_product['products_discount_type'] = $old_product['products_discount_type'];
                                    $new_product['products_discount_type_from'] = $old_product['products_discount_type_from'];
                                    $new_product['products_priced_by_attribute'] = $old_product['products_priced_by_attribute'];
                                    $new_product['product_is_free'] = $old_product['product_is_free'];
                                }
    
                                // Adjust the product information based upon the
                                // data found in update_products
                                $new_product = array_merge($new_product, $product_update);
    and make the change highlighted below:
    Code:
                                
                                // Handle the case where the product was deleted
                                // from the store. This should probably never be done.
                                // Removing the product will cause issues with links
                                // on invoices (order history) and will not allow the
                                // price(s) or tax(es) to be recalculated by Zen Cart.
                                if (!isset($new_product['price'])) {
                                    $new_product['price'] = $old_product['price'];
                                    $new_product['tax'] = $old_product['tax'];
                                    if ($new_product['tax'] > 0) {
                                        // Should match what is set by eo_get_product_taxes()
                                        // When no description is present in the database but
                                        // a tax rate exists on a product.
                                        $new_product['tax_description'] = TEXT_UNKNOWN_TAX_RATE . ' (' . zen_display_tax_value($new_product['tax']) . '%)';
                                    }
    
                                    $new_product['products_discount_type'] = $old_product['products_discount_type'];
                                    $new_product['products_discount_type_from'] = $old_product['products_discount_type_from'];
                                    $new_product['products_priced_by_attribute'] = $old_product['products_priced_by_attribute'];
                                    $new_product['product_is_free'] = $old_product['product_is_free'];
                                }
    
                                // Adjust the product information based upon the
                                // data found in update_products
                                $new_product = array_merge($product_update, $new_product);
    The issue is that the updated line was resulting in the previous product ($product_update) information (most importantly, the calculated price) was overwriting the newly-calculated price!

    I'll get this issue (and the correction) up on the EO GitHub site, noting that the issue has been around since at least v4.1.5! Thanks for the catch.

  2. #1272
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by marton_1 View Post
    OK great, sorry to make work.
    I did not even notice that! Thank you! Fix seems to do the trick.

  3. #1273
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Wow, that was a lightning quick fix

    Works great!

    "been around since at least v4.1.5" LOL!

    Sorry for my delay in replying, I had an unrelated customer problem.

    I really must learn PHP. I had my first computer programming job 55 years ago but I have some sort of internal resistance to learning modern computer languages that do not require me to write some pages of definitions before I even start coding

  4. #1274
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by marton_1 View Post
    Wow, that was a lightning quick fix

    Works great!

    "been around since at least v4.1.5" LOL!

    Sorry for my delay in replying, I had an unrelated customer problem.

    I really must learn PHP. I had my first computer programming job 55 years ago but I have some sort of internal resistance to learning modern computer languages that do not require me to write some pages of definitions before I even start coding
    Thanks for the report back ... customer issues always take first priority!

    I still remember the first time I was introduced to C code and thinking "How could anyone ever figure out that funkiness?".

  5. #1275
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    I've just submitted v4.3.3 of EO to the Zen Cart plugins for review and will post back here, once it's available. This release contains changes associated with the following issues, as identified by the GitHub issue number from https://github.com/lat9/edit_orders:

    #67: Display message if insufficient product quantity is available.
    #70: Product's price not updated if attributes changed.
    #71: Align "notifications" with Zen Cart 1.5.6 and later.

  6. #1276
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    I've just submitted v4.3.2 of EO to the Zen Cart plugins for review, containing changes associated with the following GitHub issues:

    #66: Load EO functions only for EO's use.
    #68: Log-file formatting updates.
    #69: Attributes "lost" from ordered products when an order is updated.

    See https://github.com/lat9/edit_orders for details. I'll post back here when it's available for download from the ZC Plugins.
    Quote Originally Posted by lat9 View Post
    I've just submitted v4.3.3 of EO to the Zen Cart plugins for review and will post back here, once it's available. This release contains changes associated with the following issues, as identified by the GitHub issue number from https://github.com/lat9/edit_orders:

    #67: Display message if insufficient product quantity is available.
    #70: Product's price not updated if attributes changed.
    #71: Align "notifications" with Zen Cart 1.5.6 and later.
    EO v4.3.3 (containing the above changes) is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=1513

  7. #1277
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Edit Orders v4.0 Support Thread

    I've got EO v4.3.4-beta1 available if anyone wants an early peek: https://github.com/lat9/edit_orders/...g/v4.3.4-beta1

    That version currently contains changes associated with the following GitHub issues:

    #65: Enable `ot_onetime_discount` to both add to and deduct from an order's total.
    #72: Additional notifications for plugin support.
    #73: Tax-handling corrections, enables proper integration with plugin order-totals.
    #74: Correct PHP 7.1+ warning

    Please note that change#73 could be disruptive for stores using Quantity Discounts. I've validated the integration using v1.12 of that plugin, with the edit suggested by this posting in the QD support thread.

    Unless I hear of issues, I'll be packaging this up as v4.3.4 of EO later in the week.

  8. #1278
    Join Date
    Oct 2015
    Posts
    5
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    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


    Code:
    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

  9. #1279
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Edit Orders v4.0 Support Thread

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


    Code:
    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
    First question: does this file exist? Warning: include_once(includes/modules/shipping/canadapost.php): failed to open stream: No such file or directory

    There may be some database remnant that is causing this issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #1280
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    46
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lat9 View Post
    ...make the change highlighted below:
    Code:
                                // Adjust the product information based upon the
                                // data found in update_products
                                $new_product = array_merge($product_update, $new_product);
    The issue is that the updated line was resulting in the previous product ($product_update) information (most importantly, the calculated price) was overwriting the newly-calculated price!

    I'll get this issue (and the correction) up on the EO GitHub site, noting that the issue has been around since at least v4.1.5! Thanks for the catch.

    array-merge "merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. If the input arrays have the same string keys, then the later value for that key will overwrite the previous one"

    (source: http://php.net/manual/en/function.array-merge.php)

    $new_product must be overwritten by $product_update (but not vice versa - as exactly $product_update contains information about new price got from $_POST)

    Thus, why the previous version is not correct ??

    Code:
                                // Adjust the product information based upon the
                                // data found in update_products
                                $new_product = array_merge($new_product, $product_update);
    (I have got issue with price update exactly with latest code version, but never with previous...)

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 797
    Last Post: 23 Mar 2024, 06:51 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