Zen Cart: How to add new columns to all product list

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

To add new column to all product list, for example, 2 new columns: size, application

1, Add new columns to products table.

2, Add columns to select statement: includes/modules/pages/products_all/header_php.php

$products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name,
p.products_image, p.products_price, p.products_tax_class_id,
p.products_date_added, m.manufacturers_name, p.products_model,
p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id, p.application, p.size
FROM ” . TABLE_PRODUCTS . ” p
LEFT JOIN ” . TABLE_MANUFACTURERS . ” m ON(p.manufacturers_id = m.manufacturers_id),
” . TABLE_PRODUCTS_DESCRIPTION . ” pd
WHERE p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languageID ” . $order_by;

3, Find out what configuration_group is PRODUCT_ALL_LIST:

select * from configuration where configuration_key like 'PRODUCT_ALL_LIST%';

4, Add new configuration values:

insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description,
configuration_group_id, sort_order, date_added ) values (
‘Display Product Size’, ‘PRODUCT_ALL_LIST_SIZE’, ‘4101′, ‘Do you want to display the Product Size?’, 23, 5, now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description,
configuration_group_id, sort_order, date_added ) values (
‘Display Product Application’, ‘PRODUCT_ALL_LIST_APPLICATION’, ‘3101′, ‘Do you want to display the Product Application?’, 23, 5, now());

5, Edit configuration values:

Admin–>Configuration–>All listing:

6, Add the following lines to includes/languages/english

define('TEXT_PRODUCTS_SIZE','Size: ');
define(’TEXT_PRODUCTS_APPLICATION’,'Application: ‘);
define(’HEADING_TITLE’,'All Products’);

Technorati :
Del.icio.us :

Popularity: 2%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word