Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Displaying two additional fields


Recommended Posts

Hello guys,


wanted to ask if someone would tell me how I can display two additional fields whenever user clicks on any of the categories. (i.e., which file to modify?)


I have already altered the OSC database and added two additional fileds in the "products" table -- (one is going to be used as an image field and the second one is a text field -- both varchar to be more specific)


incase if anyone is wondering, this is now how the "CREATE products table" part looks like in my sql file




CREATE TABLE products (

products_id int NOT NULL auto_increment,

products_quantity int(4) NOT NULL,

products_model varchar(12),

products_image varchar(64),

products_price decimal(15,4) NOT NULL,

products_date_added datetime NOT NULL,

products_last_modified datetime,

products_date_available datetime,

products_weight decimal(5,2) NOT NULL,

products_status tinyint(1) NOT NULL,

products_tax_class_id int NOT NULL,

manufacturers_id int NULL,

products_ordered int NOT NULL default '0',

products_ts varchar(12) NOT NULL,

products_tsimage varchar(64) NOT NULL,

PRIMARY KEY (products_id),

KEY idx_products_date_added (products_date_added)



(the text in RED is what I added)


basically, instead of the traditional:


BLANK FIELD (this is where the product image is displayd) | PRODUCT NAME | PRICE | BUY NOW


i want the page to look like this when a user clicks on any of my categories:


BLANK FIELD (this is where the product image is displayd) | PRODUCT NAME | MYFIELD-ONE | MYFIELD-TWO | PRICE | BUY NOW


MYFIELD-ONE is prettymuch straight forward... it will display either "TRUE" or "FALSE" (depending on what I have set it for that particular product) and MYFIELD-TWO will display an image for whatever the name holds. i.e., if "money.gif" is the value for a product, it will display money image from the images directory.


please help...



Link to comment
Share on other sites

The files you need to work on are index.php, /includes/modules/product_listing.php and /admin/categories.php + the language files for these.


This is fairly straightforward if you just follow one of the existing fields such as 'model'.


You will also need to add configuration options in the configuration table of the database for your new fields..... the listing order can be changed in admin>>configuration>>product listing :D



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...