I've added without problems many new fileds in my products page like this:
hhttp://www.dvdmart.it/shop/007-il-mondo-non-basta-p-91410.html
now i'm trying to add many of these fiels in products_all listing, featured, new etc.
my work:
includes/modules/product_listing.php
near line 30:
case 'PRODUCT_LIST_NAME':
$lc_text = TABLE_HEADING_PRODUCTS;
$lc_align = '';
$zc_col_count_description++;
break;
case 'PRODUCT_LIST_MYFIELD':
$lc_text = TABLE_HEADING_MYFIELD;
$lc_align = '';
$zc_col_count_description++;
break;
near line 100:
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;
case 'PRODUCT_LIST_MYFIELD':
$lc_align = '';
$lc_text = $listing->fields['products_myfieldsqlname'];
break;
includes/modules/pages/index/main_template_vars.php
near line 136:
// create column list
$define_list = array(
'PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MYFIELD' => PRODUCT_LIST_MYFIELD,
near line 163:
switch ($column_list[$i])
{
case 'PRODUCT_LIST_MODEL':
$select_column_list .= 'p.products_model, ';
break;
case 'PRODUCT_LIST_MYFIELD':
$select_column_list .= 'products_myfieldsqlname, ';
break;
includes/index_filters/default_filter.php
near line 28, 43, 58, 73:
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_myfieldsqlname,
near line 117:
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_MYFIELD':
$listing_sql .= "p.products_myfieldsqlname" . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
near line 122:
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_MYFIELD':
$listing_sql .= "p.products_myfieldsqlname" . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
includes/modules/template/MYTEMPLATE/template/tpl_modules_products_all_listing.php
near line 42:
if (PRODUCT_ALL_LIST_MODEL != '0' and zen_get_show_product_switch($products_all->fields['products_id'], 'model')) {
$display_products_model = '<b>' . TEXT_PRODUCTS_MODEL . '</b>' . $products_all->fields['products_model'] . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_MODEL, 3, 1));
} else {
$display_products_model = '';
}
if (PRODUCT_ALL_LIST_MYFIELD != '0' and zen_get_show_product_switch($products_all->fields['products_myfieldsqlname'], 'myfield')) {
$display_products_myfield = '<b>' . TEXT_PRODUCTS_MYFIELD . '</b>' . $products_all->fields['products_myfieldsqlname'] . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_MYFIELD, 3, 1));
} else {
$display_products_myfield = '';
}
near line 141:
if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_MYFIELD') {
echo $display_products_model;
}
if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_LIST_MYFIELD') {
echo $display_products_myfield;
}
near line 177:
if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_LIST_MODEL') {
echo $display_products_model;
}
if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_LIST_MYFIELD') {
echo $display_products_myfield;
}
includes/languages/MYTEMPLATE/english etc
define('TEXT_PRODUCTS_MYFIELD', 'My extra products field');
in my database i've added:
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (1200, 'Show my myfield', 'PRODUCT_ALL_LIST_MYFIELD', '2506', 'bla bla bla', 21, 13, NULL, '2006-07-05 13:59:40', NULL, NULL);
Nothing appear here:
http://www.dvdmart.it/shop/products_all.html
whats wrong?
Thanks!