Results 1 to 10 of 1920

Hybrid View

  1. #1
    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 RodG View Post
    ------------------ Updated to avoid the need for the strange syntax current required (my clients have a bit of a problem following the instructions, and would prefer to just enter the coupon code_
    The correct stored format is "<module_title>: <coupon_code>".

    Just a couple warnings about your code:
    • The module title is not static (and may vary depending upon store language and / or modifications).
    • Indexes on an array are not checked to verify they exist before using them (PHP 5.4+ potential issue).
    • It will break when the correct full title is passed (such as a order created by the checkout process).


    Most users have not had any problems understanding the warning which is printed on the top of the screen by Edit Orders and taking the appropriate action. On the other hand, I do like the idea of allowing the entry of just the coupon code. With the upcoming 4.1.3 release, I have been focusing on usability, compatibility, and automatically finding / fixing certain common database issues (caused by errant code in OTHER modules).

    I'll add the updating the handling of ot_coupon to the list for Edit Orders 4.1.3. :o)

    Quote Originally Posted by RodG View Post
    ...
    PRODUCTS_OPTIONS_TYPE_CHECKBOX

    These don't appear to be defined anywhere, so nothing matches. (bug?)
    Not a bug. These are core database entries relating to attributes in the Zen Cart database. Means the store you are working on has some serious database damage... You should re-add the appropriate entries to the database (and verify the SBA code is not incorrectly removing these).

    Quote Originally Posted by RodG View Post
    ...
    ---- replaced the get_attributes_options with this ---------------
    Not needed if you fix the core database entries relating to attributes. Also why did you change the code to use the "product's option's type" name instead of id? What happens if in the future the names are in a localized language? Or someone changes the name?

    Other Thoughts
    Sounds like your client's store has a large number of modifications (both to the database and files) including damage to some of the core Zen Cart database entries relating to attributes... I cannot say what introduced these "changes", but I would make sure it was not the SBA module you are using...

    You will probably want to correct the current issues in the specific store you are working on instead of modifying the "Edit Orders" code (to work around the issues specific to the client's site). Applying bandages instead of stopping the root cause could cause problems down the road (such as when a new version of Zen Cart or Edit Orders is released).



    NOTES: If the SBA module includes something to indicate it's presence (like EO_VERSION identifies Edit Orders is installed and which version)... And the SBA module does not break existing Zen Cart core attribute handling... I'm more than willing to add some additional code / code blocks to help "support" the SBA module... So if you do find what exactly is changed by the SBA module during the product selection and checkout process... Contributions are welcome (but expect them to be looked at to ensure they do not introduce unnecessary risks). :o)
    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

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Edit Orders v4.0 Support Thread

    Quote Originally Posted by lhungil View Post
    The correct stored format is "<module_title>: <coupon_code>".
    Thanks.

    Quote Originally Posted by lhungil View Post
    Just a couple warnings about your code:
    • The module title is not static (and may vary depending upon store language and / or modifications).
    • Indexes on an array are not checked to verify they exist before using them (PHP 5.4+ potential issue).
    • It will break when the correct full title is passed (such as a order created by the checkout process).
    I find your 3rd point the most disconcerting. I'll need to check this before the client discovers this before I've taken steps to mitigate it :)

    Quote Originally Posted by lhungil View Post
    Most users have not had any problems understanding the warning which is printed on the top of the screen by Edit Orders and taking the appropriate action.
    I could dispute this and suggest that most users simply haven't reported or commented about the issue, or that most users have probably never even attempted to use the discount coupons when editing an order. :)

    Quote Originally Posted by lhungil View Post
    On the other hand, I do like the idea of allowing the entry of just the coupon code. With the upcoming 4.1.3 release, I have been focusing on usability, compatibility, and automatically finding / fixing certain common database issues (caused by errant code in OTHER modules).

    I'll add the updating the handling of ot_coupon to the list for Edit Orders 4.1.3. :o)
    This is partially why I provided the info about how I 'solved' the problem and asked about the possible repercussions :)
    I kinda figured that my solution was a little *too* easy.

    Quote Originally Posted by lhungil View Post
    Sounds like your client's store has a large number of modifications (both to the database and files) including damage to some of the core Zen Cart database entries relating to attributes...
    You're not wrong there. This site has been a major headache since the 1st day I started working on the upgrade.
    In hindsight if I were to do this one again I would have started with a fresh install of V1.5.1 and basically rebuilt it from scratch.

    I can normally do such upgrade in a matter of hours. This one has had me going around in circles for weeks. (Thankfully the client has been very understanding and quite generous).

    I cannot say what introduced these "changes", but I would make sure it was not the SBA module you are using...

    Quote Originally Posted by lhungil View Post
    You will probably want to correct the current issues in the specific store you are working on instead of modifying the "Edit Orders" code (to work around the issues specific to the client's site). Applying bandages instead of stopping the root cause could cause problems down the road (such as when a new version of Zen Cart or Edit Orders is released).
    I agree 100%. I thought I *had* fixed all the 'current issues' (without any code patches) until this reported problem (which on first inspection appeared to be a simple bug in the code).
    Thanks to you guys I now have another lead to follow up on. :)

    FWIW, in regards to the missing CONSTANTS in the DB configuration table, I had a *very quick* look at this before calling it quits last night, and discovered that these entries are created (re-created?) when I went to the attributes controller and created some new entries. Alas, there still seems to be an issue (using unmodified code), so there is still a little more to the puzzle. I hope to get back onto it further later today. I suspect it is probably related to the fact that the current entries still have missing or incorrect data somewhere. At least now I have a means of comparison. :)

    I seriously don't like the idea of adding bandaids/patches, especially with code modules that I'm unfamiliar with.

    Cheers
    Rod

 

 

Similar Threads

  1. v150 Super Orders v4.0 Support Thread for ZC v1.5.x
    By DivaVocals in forum Addon Admin Tools
    Replies: 818
    Last Post: 9 Jul 2026, 10:12 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

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