Forums / Contribution-Writing Guidelines / Configuration Group ID

Configuration Group ID

Views: 4,471

Results 1 to 5 of 5
5 Mar 2026, 1:00 AM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

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?

5 Mar 2026, 9:45 AM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

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...

5 Mar 2026, 10:04 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

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.

5 Mar 2026, 12:53 PM
#4
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Configuration Group ID

torvista:

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.

swguy:

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 Mar 2026, 4:10 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

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.