Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Functions removed from 1.5.8 - discussion

    During what might have been overzealous culling, the following functions were removed from the code base in 1.5.8.

    - zen_draw_products_pull_down
    - zen_draw_products_pull_down_attributes
    - zen_draw_products_pull_down_categories
    - zen_draw_products_pull_down_categories_attributes

    Did this hit one of your plugins? Please comment below.
    That Software Guy. My Store: Zen Cart Modifications
    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.

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

    Default Re: Functions removed from 1.5.8 - discussion

    It will in stock by attributes in one place, I expect to use a function_exists test to work around that issue, though need to look at how the feature is now implemented.

    Github location of what will be problematic is: https://github.com/mc12345678/Stock_...tock.php#L1489
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Functions removed from 1.5.8 - discussion

    Quote Originally Posted by swguy View Post
    During what might have been overzealous culling, the following functions were removed from the code base in 1.5.8.

    - zen_draw_products_pull_down
    - zen_draw_products_pull_down_attributes
    - zen_draw_products_pull_down_categories
    - zen_draw_products_pull_down_categories_attributes

    Did this hit one of your plugins? Please comment below.
    i would disagree with the assessment of "overzealous culling."

    it seems these functions were merely renamed. their function signatures remain unchanged.

    see this commit.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Functions removed from 1.5.8 - discussion

    Thanks for tracking that down.
    We might want to have a compatibility layer so that plugins won't be broken. We could issue a deprecated log. Will noodle on it.
    That Software Guy. My Store: Zen Cart Modifications
    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.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Functions removed from 1.5.8 - discussion

    LOL in the original PR #4083 created by @drbyte, I said, "uhh... we'll break plugins," and Cindy agreed.

    PR #5439 created.
    That Software Guy. My Store: Zen Cart Modifications
    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. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Functions removed from 1.5.8 - discussion

    OK PR 5439 has been merged, so this will be the resolution.

    If you are upgrading a plugin and need these functions, please see
    https://github.com/zencart/zencart/pull/5439/files
    That Software Guy. My Store: Zen Cart Modifications
    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.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Functions removed from 1.5.8 - discussion

    If you are writing software to run on both Zen Cart 1.5.8 and older versions, you can use function_exists to determine the correct function to call, or you can use version checking logic:

    https://docs.zen-cart.com/dev/plugins/version/
    That Software Guy. My Store: Zen Cart Modifications
    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.

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

    Default Re: Functions removed from 1.5.8 - discussion

    Quote Originally Posted by mc12345678 View Post
    It will in stock by attributes in one place, I expect to use a function_exists test to work around that issue, though need to look at how the feature is now implemented.

    Github location of what will be problematic is: https://github.com/mc12345678/Stock_...tock.php#L1489
    Quote Originally Posted by swguy View Post
    If you are writing software to run on both Zen Cart 1.5.8 and older versions, you can use function_exists to determine the correct function to call, or you can use version checking logic:

    https://docs.zen-cart.com/dev/plugins/version/
    I accomplished this using the following: https://github.com/mc12345678/Stock_...75a7eb5934f1b0
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Functions removed from 1.5.8 - discussion

    Very elegant! I didn't even know function pointers were a thing in PHP.

    I think this might be too complicated for the documentation, but thanks for sharing it.
    That Software Guy. My Store: Zen Cart Modifications
    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.

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

    Default Re: Functions removed from 1.5.8 - discussion

    Quote Originally Posted by swguy View Post
    Very elegant! I didn't even know function pointers were a thing in PHP.

    I think this might be too complicated for the documentation, but thanks for sharing it.
    Technically termed variable functions: https://www.php.net/manual/en/functi...-functions.php

    And in this case seemed like a suitable method considering the function definition was the same for both. Otherwise might get complicated if individual if statements were used within the call or might have gotten busy if two separate calls were captured in an if/else situation
    Last edited by mc12345678; 10 Dec 2022 at 08:55 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v156 /includes/functions /admin/includes/functions Why do the same functions exist?
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 2
    Last Post: 8 May 2019, 08:00 AM
  2. v138a Fatal error: Call-time pass-by-reference has been removed functions/functions_lookups
    By targetmarts in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 3 Mar 2018, 03:16 PM
  3. Removed Products are not Removed but Hidden
    By maxmillion02 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 13 Feb 2011, 07:30 PM
  4. restricted coupon not removed when allowable product removed
    By lexxymark in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 11 Aug 2010, 10:22 AM
  5. Help! Removed from Google!
    By K9luvR in forum General Questions
    Replies: 3
    Last Post: 11 Nov 2008, 04:31 PM

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