Page 75 of 188 FirstFirst ... 2565737475767785125175 ... LastLast
Results 741 to 750 of 1878
  1. #741
    Join Date
    May 2015
    Posts
    2
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Hello Lhungil,

    unfortunately, I'm still not so familiar with Zencart. Please, can you give me some more details? A have a problem with the price only when I try to change an order. I uploaded an image that shows you the difference of prices when I change "Cash on Delivery" from 7,9981 to 8,9981 (the same thing changing Insured Shipping). I think the field "ot_cod_fee" is not calculated. I also noticed that Zen Cart properly calculates the order without Edit order. If you need, I can attach the "log" created by edit orders.

    Thank you for your reply.
    Name:  before-after2.jpg
Views: 206
Size:  24.8 KB

  2. #742
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by JDanielsita View Post
    Hello Lhungil,

    unfortunately, I'm still not so familiar with Zencart. Please, can you give me some more details? A have a problem with the price only when I try to change an order. I uploaded an image that shows you the difference of prices when I change "Cash on Delivery" from 7,9981 to 8,9981 (the same thing changing Insured Shipping). I think the field "ot_cod_fee" is not calculated. I also noticed that Zen Cart properly calculates the order without Edit order. If you need, I can attach the "log" created by edit orders.

    Thank you for your reply.
    Name:  before-after2.jpg
Views: 206
Size:  24.8 KB
    lhungil has already answered your question, but let me try and re-phrasing it.

    The issue is not with Edit Orders, the issue is with the Insured Shipment and Cash on Delivery order total modules.

    Insured Shipment and Cash on Delivery are not correctly re-calculating the COD or Insured Shipment totals when you edit the order using Edit Orders.

    Again.. This is not an issue with Edit Orders, this is an issue with your two order total modules (Insured Shipment and Cash on Delivery

    Installed order total modules are responsible for returning the correct data when an order is edited. Insured Shipment and Cash on Delivery are not working when loaded from the Zen Cart administration interface, and therefore they will not work with Edit Orders. Do you have any related Zen Cart logs? If so you should post them..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #743
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,312
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    It seems as though when the values for non-built-in order totals are updated, the changes are not reflected in the final cart total - are the values which are entered on the screen not used? It looks like the order total module in question are rerun and those values are used. The fields in the orders_total show my edit updates but the final total doesn't match.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #744
    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 swguy View Post
    It seems as though when the values for non-built-in order totals are updated, the changes are not reflected in the final cart total - are the values which are entered on the screen not used? It looks like the order total module in question are rerun and those values are used. The fields in the orders_total show my edit updates but the final total doesn't match.
    Changes to the order total are calculated by individual Order Total Modules (and displayed / stored in the database by "ot_total"), not Edit Orders. This means when a third party Order Total module fails to return valid data or update $order->info['total'] as needed... The total for the order will not be updated.

    The most common cause of issues reported regarding the total not being correct are Order Total modules not designed as "Standalone", but instead depending upon other modifications to the Zen Cart store front. The modifications needed to Zen Cart administrative interface (for these modules to work) are often not provided to end users. Edit Orders is an administrative tool (run from the Zen Cart administrative interface), so when run these third party Order Total modules do not function as expected or in some cases outright crash.

    Another common cause is the third party Order Total module always recalculating (and not using the value from the database). Currently this can be addressed by the third party order total looking at the Global variable $order->totals at the start of the Order Total module's "process" function (or checking the database manually). When the value has been altered via Edit Orders, the altered value will be present (while the "process" function is being called).


    There are some changes coming in the next version of Edit Orders (which may help some). This includes a reworked responsive interface, automatic removal of Order Total modules not returning a value when run, fields can be togged between "editable" or "automatically calculated", utilization of the additional PCI Compliance structures added in Zen Cart 1.5.4+ (when run under Zen Cart 1.5.4+), additional notifiers, an installer capable of merging required core files automatically during installation, and more. There is no ETA for the next release at this time.


    Abbreviated list of steps in the Current Process (in regards to order totals):
    1. User edit's Order Total value / name.
    2. User clicks "update".
    3. The Mock Shopping cart is loaded (reads data from $order - not fully implemented at this time).
    4. Some verification, validation, and sanitization is performed.
    5. Order, Order Status, Order Status History, Order Totals, etc are loaded from the database.
    6. Global and Session variables are populated (to match the shopping_cart page).
    7. Some special handling is applied based on DISPLAY_PRICE_WITH_TAX.
    8. Order Total modules are run (and the result saved in the Global and Session variables).
    9. Any Order Total modules not returning a value are removed from the Global and Session variables (Edit Orders 4.1.5+; not yet released).
    10. Order Total values in the database are updated (from the Global and Session variables).
    11. User's Order Total value / name in the Global and Session variables are updated (or added if not present).
    12. The Order Total information in the database is updated from the Global and Session variables.
    13. The order is reloaded (from the database).
    14. The Order Total modules are run again (so they can apply any changes and to allow ot_subtotal, ot_tax, ot_coupon, and ot_total to recalculate).
    15. Any Order Total modules not returning a value are removed from the Global and Session variables (Edit Orders 4.1.5+; not yet released).
    16. Order Total values in the database are updated (from the Global and Session variables).
    17. The Edit Orders page is reloaded (to display the updated order).
    Last edited by lhungil; 6 May 2015 at 05:47 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #745
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,312
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    Changes to the order total are calculated by individual Order Total Modules (and displayed / stored in the database by "ot_total"), not Edit Orders. This means when a third party Order Total module fails to return valid data or update $order->info['total'] as needed... The total for the order will not be updated.
    What I'm asking for is: if I update the value of the order total dollar amount, can you use this instead of using what the OT Module returns? Like an override capability.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #746
    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 swguy View Post
    What I'm asking for is: if I update the value of the order total dollar amount, can you use this instead of using what the OT Module returns? Like an override capability.
    Some thoughts based on this question... Feel free to add to the list...


    Stop relying on the Order Total modules and have Edit Orders do the math?
    The answer is no.

    Doing so would be going backwards to the way Edit Orders 4.0.x operated.

    Edit Orders 4.0.x did it's own math, calculations, etc (to allow overrides)... Order Total Modules were not loaded (and the code completely ignored including: settings, tax handling, and other behaviors)... The value (dollar amount) of order totals were always "added" (resulting in third party "discount" modules adding to the total instead of subtracting)... And in general leading to admin users needing to double check everything or risk wrong pricing (and the wrath of upset customers).

    Product and attribute pricing was manually calculated instead of using the existing Zen Cart code (and some of the calculation rules were ignored). When adding a product to an existing order, the pricing did not always match the price shown to customers on the website. Again forcing admin users to spend valuable time double check everything or risk wrong pricing (and the wrath of upset customers).

    Invalid data was sometimes injected into the database relating to orders (adding shipping to an existing order always failed to result in correctly normalized data). This could cause issues with core portions of Zen Cart as well as third party modules and code (for example code synchronization with other inventory / accounting software).

    I'd be surprised if there were not other issues as well, but those are the ones I remember (off the top of my head).


    End users manually override the value (dollar amount) of third party order totals?
    The problem is: the Order Total system in Zen Cart was not designed to allow end users to "override" dollar amounts (and the API does not include methods to allow overrides). As such, 90% of the Order Totals are not written to take into account they may be overridden.

    So if we want to allow overriding the value (dollar amount) of an order total... Until all third party Order Total modules are coded to check for and use an override (and adjust $order->info as appropriate)... Problems with the "Total" (ot_total) and "Tax" (ot_tax) will ensue.

    I've thought about adding a "Mock Order Total Module" to better support overriding the value (dollar amount) of an order total... But at a glance I forsee problems with this approach... For example: how does the mock know how tax should be handled? How does the mock know when to add to total vs. subtract from total?

    Another thought was to disable editing / overriding the value (dollar amount) of an order total unless the module defines a public variable such as "$override_allowed" (and implements the necessary functionality)... Ugly, but could lead into being added to the core API, so a potential route...

    The above are some (of the many reasons) I've been tempted many times to switch Edit Orders 4.1.x back to "automatic calculation only" (no overrides allowed) for all order total modules... Prior to the first public release this was added back in due to OVERWHELMING DEMAND by alpha test participants (along with special handling for most of the "core" order total modules included with Zen Cart).


    End user to manually override the value (dollar amount) of all order totals?
    I am planning to add this functionality into a future release. Once certain items are overridden, the user will be forced to manually override "Tax" (ot_tax) and "Total" (ot_total). This should help by allowing people to manually update the values.

    Long term, I suspect it would be better to just enforce "automatic calculations only" for the value (dollar amount) of all order totals. Or make changes to the Zen Cart API and the core Zen Cart code handling orders and order totals.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

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

    Default Re: Edit Orders v4.0 Support Thread

    Other thoughts
    Long term, I believe it would be beneficial to refactor the existing Zen Cart code handling pricing, the shopping cart, orders, and order processing. Perhaps creating an API and smaller classes separating handling of the database domain, business logic, and display logic. Sprinkle in plenty of notifier hooks and abstraction (and smaller methods to enable better code reuse).

    Wish I had more time to start down this path (or help walk down this path).
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #748
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,312
    Plugin Contributions
    125

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post

    End user to manually override the value (dollar amount) of all order totals?
    I am planning to add this functionality into a future release. Once certain items are overridden, the user will be forced to manually override "Tax" (ot_tax) and "Total" (ot_total). This should help by allowing people to manually update the values.
    Totally fair. Your gun, your bullet, your foot. :)
    In the mean time, it might make sense to make those figures NOT editable since editing the values doesn't really work. (You can edit the labels, just not the values.)
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

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

    Default Re: Edit Orders v4.0 Support Thread

    Fair enough (gun smithing in process).

    Will be a fair amount of work, so perhaps it would not be a bad idea to just disable the fields for third party modules (most of the stock Zen Cart OT modules can be successfully edited).

    Just to be clear (to everyone), there is no ETA for the changes we have been discussing.

  10. #750
    Join Date
    Jun 2013
    Location
    Melbourne, Australia
    Posts
    12
    Plugin Contributions
    0

    Default Re: Edit Orders v4.0 Support Thread

    Hi

    Just a quick note for anyone having the same problem as I did today. Hopefully this may save someone from much unnecessary stress.

    In summary: a blank page after install without error messages in the log.

    For you information, I have successfully installed this module about three times before this 'interesting' experience today, and can assure anybody thinking about Edit Orders that it is a 'Must Have' module!.

    I have zc 1.5.4 installed (I successfully updated a 1.3.9 database). I had successfully installed several plugins and mods, but none overwrote any of the core files in Edit Orders 4.1.4. After logging into Admin, I then uploaded the install files as in the directions. When I went back to Admin and clicked a link the page went blank. There were no success or failure messages. Also, when checking the log files, none were created.

    After much searching of this thread and after three re-installs I experimented. I removed the two install files from the server. I then clicked on Admin and the 'Admin Log In' page came up! I successfully logged in and Edit Orders was available. When updating an order I received the error message, and there was an error message in the log this time. So, I edited the edit_orders_functions.php file as in this post within this thread.

    Tested and all appears to now be working!

    Would appreciate if anyone can tell me why this happened though.

 

 

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