Zen Cart Logo
Forums / Contribution-Writing Guidelines / Configuration group values

Configuration group values

Views: 8,345

Results 1 to 6 of 6
12 Mar 2015, 18:06
#1
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Configuration group values

Can someone define what "25, 59," refer to and if designing another what values are acceptable/correct??

VALUES ('Define About Us Status', 'DEFINE_ABOUT_US_STATUS', '1', 'Enable the Defined About Us Link/Text?<br />0= Link ON, Define
Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 59, NOW(),
NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
12 Mar 2015, 19:01
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Configuration group values

kobra:

Can someone define what "25, 59," refer to and if designing another what values are acceptable/correct??

VALUES ('Define About Us Status', 'DEFINE_ABOUT_US_STATUS', '1', 'Enable the Defined About Us Link/Text?<br />0= Link ON, Define
Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 59, NOW(),
NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');

In a default Zen Cart configuration, they *usually *refer to the configuration_group_id and sort_order, respectively (but you haven't included the full SQL INSERT statement).

Note, however, that the VALUES should ***always ***be preceded by a list of associated fields; if not, then any field additions (like the numinix "tabbed configuration") to the Zen Cart configuration table will yield a database error when the query is run.
12 Mar 2015, 21:53
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Configuration group values

Thanks - here is the full statement and I was wondering if "25" is the group id if additional pages added could use the same group??
And why the sort order of "59" is there as this seems quite high

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) 
VALUES ('Define About Us Status', 'DEFINE_ABOUT_US_STATUS', '1', 'Enable the Defined About Us Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 59, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
12 Mar 2015, 23:33
#4
swguy avatar

swguy

Administrator

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

Re: Configuration group values

kobra:

Thanks - here is the full statement and I was wondering if "25" is the group id if additional pages added could use the same group??

If you go to Admin->Configuration->Define Page Status you will see the various other pages.

12 Mar 2015, 23:42
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Configuration group values

swguy:

If you go to Admin->Configuration->Define Page Status you will see the various other pages
I am trying to create NEW pages other than the ones that currently exist just as the about_us page is created which is why I am asking this

12 Mar 2015, 23:45
#6
swguy avatar

swguy

Administrator

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

Re: Configuration group values

You can add them in using the same logic shown in the INSERT statement in post 3 above. Just do a select MAX on the cid for that gid and bump it by 1 to get your new value.