Forums / Templates, Stylesheets, Page Layout / Adding a custom column to Product Listing

Adding a custom column to Product Listing

Views: 683

Results 1 to 4 of 4
10 Oct 2011, 4:39 AM
#1
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Adding a custom column to Product Listing

So, there are a bunch of standard columns in the Product Listing table:

PRODUCT_LIST_MODEL,
PRODUCT_LIST_NAME,
PRODUCT_LIST_MANUFACTURER,
PRODUCT_LIST_PRICE,
PRODUCT_LIST_QUANTITY,
PRODUCT_LIST_WEIGHT,
PRODUCT_LIST_IMAGE

So let's say I want to add the music genre as a column into the Product Listing table, and only show it when I'm showing a particular category in my shop (the music category).

Are these the steps I have to make:

  1. Add a new configuration entry with configuration_group_id = 8
  2. Add this new configuration entry into includes/modules/pages/index/main_template_vars.php (how do I override this?)
  3. Add to includes/modules/<template>/product_listing.php

... I'm lost. :unsure:

10 Oct 2011, 9:15 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Adding a custom column to Product Listing

You will need to edit the module file. I did this for a client some years ago (to have a column for Model Number), but I can't quite recall all the details.

If I have time later I will try to look in my archives for the procedure.

20 years a Zencart User

10 Oct 2011, 2:16 PM
#3
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: Adding a custom column to Product Listing

Ok. Thanks!

11 Oct 2011, 9:41 AM
#4
kamion avatar

kamion

New Zenner

Join Date:
Mar 2011
Posts:
93
Plugin Contributions:
0

Re: Adding a custom column to Product Listing

Anyone can help point my in the right direction?