1. in the language files you use enter definitions
in my case it would be
PHP Code:
define('TABLE_HEADING_EDITION', 'Edition');
define('TABLE_HEADING_COLOR', 'Color');
define('TABLE_HEADING_TYPEMTG', 'Type');
define('TABLE_HEADING_CASTINGCOST', 'Casting Cost');
define('TABLE_HEADING_RARITY', 'Rarity');
2. in /main_template_vars.php find the part that adds a column and add it
PHP Code:
'TABLE_HEADING_EDITION' => TABLE_HEADING_EDITION,
in the switch section:
PHP Code:
case 'PRODUCT_LIST_EDITION':
$select_column_list .= 'p.products_edition, ';
break;
3. in the product listing you use... add this
PHP Code:
case 'PRODUCT_LIST_EDITION':
$lc_text = TABLE_HEADING_EDITION;
$lc_align = 'left';
$zc_col_count_description++;
break;
and then finally under...
PHP Code:
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
$lc_align = '';
switch ($column_list[$col]) {
PHP Code:
case 'PRODUCT_LIST_EDITION':
$lc_align = 'left';
$lc_text = ' '.$listing->fields['products_edition'];
break;
4. Run SQL to add values to configuration table!!:
PHP Code:
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description,
configuration_group_id, sort_order, date_added ) values (
'Display Product Edition', 'PRODUCT_LIST_EDITION, '4', 'Do you want to display the Product Edition?', 8, 5, now());
after all this you should have a new column created and the new field data loaded.
I had everything set up but forgot about the configuration *double facepalm*.
0 comments:
Post a Comment