Forums / All Other Contributions/Addons / How to Add Custom Fields for Materials & Dimensions when adding products?

How to Add Custom Fields for Materials & Dimensions when adding products?

Views: 6,754

Results 41 to 60 of 96
28 Apr 2016, 4:25 PM
#41
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Verify that: includes/extra_datafiles/product_database_names.php

Has been uploaded/reupload it.

Ok that got rid of the error but still can't get the extra fields to come up.

When I enter the Text 1 like "Iron Glass" Text 2 46" x 1" x 31" then update then when I refresh that item in the main site it doesn't come up.

Aslo about this SQL:

SELECT @gid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

INSERT INTO configuration
VALUES (
NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '0', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)

I try to install this on the Database through phpMyAdmin it gave me an error: and I looked in the database it doesn't show it in the database.

28 Apr 2016, 4:30 PM
#42
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

Would be "better" to do in the tools->Install Sql patches area, otherwise need to include the table prefix (DB_PREFIX from includes/configure.php and admin/includes/configure.php)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 4:33 PM
#43
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

If run from the admin, be sure to add a closing ; at the end.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 4:34 PM
#44
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Would be "better" to do in the tools->Install Sql patches area, otherwise need to include the table prefix (DB_PREFIX from includes/configure.php and admin/includes/configure.php)

Ok, It installed fine. But where is it in the Configuration?

28 Apr 2016, 4:48 PM
#45
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

It's wherever Tabbed Products Pro - Config is located, but could also be at admin/configuration.php?gID=0

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 4:54 PM
#46
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

It's wherever Tabbed Products Pro - Config is located, but could also be at admin/configuration.php?gID=0

Actually its not in the Configuration list at all.

28 Apr 2016, 5:05 PM
#47
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

wmorris:

Actually its not in the Configuration list at all.
Goto tools->Developers Toolkit, in the second or third row is a tool to look up configuration keys. Enter: TPP_GLOBAL_EXTRA_FIELDS_ON_TAB

Then search. Should be presented with some options about changing/modifying it.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 5:08 PM
#48
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Goto tools->Developers Toolkit, in the second or third row is a tool to look up configuration keys. Enter: TPP_GLOBAL_EXTRA_FIELDS_ON_TAB

Then search. Should be presented with some options about changing/modifying it.

This is what I got: Error: No Configuration Key or Text was entered to search for ... Search was terminated

28 Apr 2016, 6:17 PM
#49
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

Back to phpmyadmin. Do you know your DB_PREFIX now?

In a sql query, enter:

SELECT configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

Prepending DB_PREFIX to: configuration_group

Like zen_configuration_group...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 6:20 PM
#50
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Back to phpmyadmin. Do you know your DB_PREFIX now?

In a sql query, enter:

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

> 
> Prepending DB_PREFIX to: configuration_group
> 
> Like zen_configuration_group...

From this:

SELECT @gid:=configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';


INSERT INTO configuration
VALUES (
NULL ,  'TPP ñ Extra Product Fields Tab',  ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ',  '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL ,  'zen_cfg_select_option(array(''0'', ''1''),'
)

to

SELECT @gid:=zen_configuration_group_id 
FROM zen_configuration_group
WHERE zen_configuration_group_title= ' Tabbed Products Pro - Config ';


INSERT INTO configuration
VALUES (
NULL ,  'TPP ñ Extra Product Fields Tab',  ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ',  '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL ,  'zen_cfg_select_option(array(''0'', ''1''),'
)
28 Apr 2016, 6:47 PM
#51
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

No, maybe my leaving '...' At the end was confusing.

Only place the DB_PREFIX needs to be applied is when referencing the table which is the bit after FROM everything else is referencing a field from within the table...

So would be:

SELECT configuration_group_id 
FROM zen_configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

If the DB_PREFIX was 'zen_'

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 6:52 PM
#52
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

No, maybe my leaving '...' At the end was confusing.

Only place the DB_PREFIX needs to be applied is when referencing the table which is the bit after FROM everything else is referencing a field from within the table...

So would be:

SELECT configuration_group_id
FROM zen_configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

> 
> If the DB_PREFIX was 'zen_'


Ok, I enter this:

SELECT configuration_group_id
FROM zen_configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ' ;

INSERT INTO configuration
VALUES (
NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)


The phpMyAdmin says:

Error
SQL query: Documentation

SELECT configuration_group_id
FROM zen_configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ' ;
MySQL said: Documentation

#1146 - Table 'xxxxx_zencart.zen_configuration_group' doesn't exist

28 Apr 2016, 7:34 PM
#53
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

Then it would appear that zen_ is not ur DB_PREFIX. Again that prefix is in your setup/configure .php files.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 7:38 PM
#54
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Then it would appear that zen_ is not ur DB_PREFIX. Again that prefix is in your setup/configure .php files.

ok, my database prefix is: define('DB_PREFIX', '');

28 Apr 2016, 9:04 PM
#55
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

So, as said before, please run the query without modification (as your DB_PREFIX is nothing, there is nothing to change in the query I posted a few times ago). Ie. Same query but no zen_

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 9:09 PM
#56
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

So, as said before, please run the query without modification (as your DB_PREFIX is nothing, there is nothing to change in the query I posted a few times ago). Ie. Same query but no zen_

Well when I enter it this way:

SELECT configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';


INSERT INTO configuration
VALUES (
NULL ,  'TPP ñ Extra Product Fields Tab',  ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ',  '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL ,  'zen_cfg_select_option(array(''0'', ''1''),'
)

I got this error:

Error
SQL query: Documentation


INSERT INTO configuration
VALUES (
NULL ,  'TPP ñ Extra Product Fields Tab',  ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ',  '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL ,  'zen_cfg_select_option(array(''0'', ''1''),'
)
MySQL said: Documentation

#1136 - Column count doesn't match value count at row 1
28 Apr 2016, 9:13 PM
#57
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

Well, that was more sql than requested, but did confirm something I was partially expecting.

The sql query hasn't been updated to account for the possibility that there are more fields than it has... so, off to identify the expected columns and provide a correctly formatted sql query (probably already in the forum thread for that plugin, but while we're here...)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Apr 2016, 9:22 PM
#58
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

Enter it this way:

SELECT configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';


INSERT INTO configuration
SET ( configuration_id,
  configuration_title,
  configuration_key,
  configuration_value,
  configuration_description,
  configuration_group_id,
  sort_order,
  last_modified,
  date_added,
  use_function,
  set_function)
VALUES (
NULL ,  'TPP ñ Extra Product Fields Tab',  ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ',  '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL ,  'zen_cfg_select_option(array(''0'', ''1''),'
)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Apr 2016, 3:13 AM
#59
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Enter it this way:

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

INSERT INTO configuration
SET ( configuration_id,
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
last_modified,
date_added,
use_function,
set_function)
VALUES (
NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)


Nope!

INSERT INTO configuration
SET ( configuration_id,
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
last_modified,
date_added,
use_function,
set_function)
VALUES (

NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)
MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( configuration_id,
configuration_title,
configuration_key,
configurati' at line 2

29 Apr 2016, 3:14 AM
#60
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: How to Add Custom Fields for Materials & Dimensions when adding products?

mc12345678:

Enter it this way:

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title= ' Tabbed Products Pro - Config ';

INSERT INTO configuration
SET ( configuration_id,
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
last_modified,
date_added,
use_function,
set_function)
VALUES (
NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)


Nope! phpMyAdmin:

Error
SQL query: Documentation

INSERT INTO configuration
SET ( configuration_id,
configuration_title,
configuration_key,
configuration_value,
configuration_description,
configuration_group_id,
sort_order,
last_modified,
date_added,
use_function,
set_function)
VALUES (

NULL , 'TPP ñ Extra Product Fields Tab', ' TPP_GLOBAL_EXTRA_FIELDS_ON_TAB ', '1', 'Set this to 1 if you want to enable the extra fields on your products', @gid, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''0'', ''1''),'
)
MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( configuration_id,
configuration_title,
configuration_key,
configurati' at line 2