Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2018
    Posts
    11
    Plugin Contributions
    0

    Default Minor bug in notify_admin_product_collect_info_extra_inputs

    ZC 1.5.8

    For new products the product type is in $pInfo->product_type (singular)

    For editing existing products it's in $pInfo->products_type
    Last edited by cstdenis2; 1 Nov 2022 at 02:46 AM. Reason: Got them backwards.

  2. #2
    Join Date
    Feb 2018
    Posts
    11
    Plugin Contributions
    0

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    Also master_categories_id is 0 for new products even tho the category is selected before the product creation and displayed in the UI as the master category.

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

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    Thanks for these reports - would you please open an issue in Github so we can track them?

    https://github.com/zencart/zencart/issues
    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.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    Sigh. The use of the product_type (singular) element is pervasive throughout the various scripts (and sanitizations) associated with a product's addition/update.

    As such, the best I can propose for any kind of compatibility is to update the various collect_info.php module comments for the notification to indicate that a watching observer should look first (via isset) for the product_type element and fall back to the products_type element otherwise.

    Note that I've not (yet) looked at the issue with the master_categories_id for new products.

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    As always, I would say make code correct and damn the torpedoes/document a breaking change in the same PR.
    No-one should test an update on a production site, so they have been warned. Such is progress.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Minor bug in notify_admin_product_collect_info_extra_inputs

    Quote Originally Posted by torvista View Post
    As always, I would say make code correct and damn the torpedoes/document a breaking change in the same PR.
    No-one should test an update on a production site, so they have been warned. Such is progress.
    Not my style! Having further reviewed the code, the quickest path to success is to simply copy the products_type value to another field named product_type for a to-be-updated product.

 

 

Similar Threads

  1. [NOT A BUG] Minor bug in account edit template
    By jdcncsolutions in forum Bug Reports
    Replies: 3
    Last Post: 2 May 2010, 01:37 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