Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    929
    Plugin Contributions
    9

    Default Configuration Group ID

    PHP 8 / ZC 2.1.0

    I'm pretty sure I know the answer to this but when creating a module that stores configuration values, is there any obligation to using configuration_group_id 6 for storing those keys? Like right now with USPSr, for example, I'm currently using a GID set to 6, am I obligated to using 6 for those, or can I set it to (and this is admittedly bad code) MAX(configuration_group_id) + 1 as the value?

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,814
    Plugin Contributions
    31

    Default Re: Configuration Group ID

    I understand that any constants that are not intended/don't need to be user-modified are "hidden" in 6.
    If they don't warrant their own page, they could be added to a relevant existing group/page.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,490
    Plugin Contributions
    126

    Default Re: Configuration Group ID

    Shipping modules generally organize their own keys so that they show up when you go to Admin > Modules > Shipping > module name.

    You can certainly create a new shipping group though if you want need one; many plugins do this. See for example, Ultimate SEO URLs.

    https://www.zen-cart.com/downloads.php?do=file&id=132

    But if I add a new constant that's related to shipping but not module specific (minimum order size for country X, as an example), I would put it in the existing shipping configuration group, group 7 (Admin > Configuration > Shipping/Packaging).
    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. #4
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    929
    Plugin Contributions
    9

    Default Re: Configuration Group ID

    Quote Originally Posted by torvista View Post
    I understand that any constants that are not intended/don't need to be user-modified are "hidden" in 6.
    If they don't warrant their own page, they could be added to a relevant existing group/page.
    Quote Originally Posted by swguy View Post
    Shipping modules generally organize their own keys so that they show up when you go to Admin > Modules > Shipping > module name.

    You can certainly create a new shipping group though if you want need one; many plugins do this. See for example, Ultimate SEO URLs.

    https://www.zen-cart.com/downloads.php?do=file&id=132

    But if I add a new constant that's related to shipping but not module specific (minimum order size for country X, as an example), I would put it in the existing shipping configuration group, group 7 (Admin > Configuration > Shipping/Packaging).
    With regards to both of these, I broadly had that idea. But I'm also noticing that in the configuratin_group table, there is also a "visible" field. The idea that I had in mind was "create a new group, add the configuration keys to that group, and make the group invisible (visible = 0)". This way they're still visible to the module itself in Admin > Modules > Shipping but doesn't appear anywhere else in the menu (ala what Ultimate SEO does).

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,490
    Plugin Contributions
    126

    Default Re: Configuration Group ID

    If you don't want it to be visible, I'd say just stick it in group 6 and save the trouble. But it's your call.
    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.

 

 

Similar Threads

  1. Configuration group values
    By kobra in forum Contribution-Writing Guidelines
    Replies: 5
    Last Post: 13 Mar 2015, 12:45 AM
  2. v150 How to get an entry into Configuration Menu Group?
    By Stuff4Toys in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 10 Apr 2014, 05:29 PM
  3. v150 My Store tab not shown in configuration group in admin
    By pizza392 in forum General Questions
    Replies: 1
    Last Post: 15 Jul 2012, 06:54 PM
  4. v150 Configuration group not updated automatically in admin
    By pizza392 in forum General Questions
    Replies: 1
    Last Post: 8 Jul 2012, 02:04 PM
  5. Email to a customer group, how to create the group?
    By elishama3 in forum General Questions
    Replies: 2
    Last Post: 1 Aug 2008, 05:08 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