Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Adding columns to the product list


Recommended Posts

Heyo. I've been looking for about the last 2 hours and can't find anything related to this, so I'm posting. My apologies if I'm covering old ground here.


Anyway, what I need to do is add a couple of columns to the product list (or table, or whatever it is called when default.php generates a list of products after you click on a category). Presently the list is only name and price (where name happens to be a link to the product_info.php script)


What I need to do is add in Model and Quantity to this table. I should add here that I didn't install the oscommerce solution for this site, I'm being called in to maintain it after the fact. My php skills are threadbare, but I've programmed in enough other languages that I can follow the code (relatively) well enough with the help of the function descriptions I found on www.php.(com|org|whateveritwas).


Oh ... i wrote down the version of oscommerce we're using, it seems to be an older one ... hold on <goes digging through wallet> ... stuff, I left the scribble in my diary ... I think the version of default.php was v1.77 from sometime in 2002. I'll find it and post it definitely if anyone needs to know.


I dug through the code and found the section that seemed to define the column entries. It made an array of elements along the lines of (i don't have the exact code handy, so I can't remember the exact names here, if they're important, I'll look them up and post specifics)



, ... etc etc


It then iterated through this array, and if PRODUCT_ITEM_WHATEVER was set, then it'd add a relevant piece of code to a variable that I think goes to the select statement later on. (I wasn't able to find said select statement, otherwise I might have just tried adding the code I need in there).


OK, So can anyone help me please? I reacon I have to find where PRODUCT_ITEM_<stuff> is defined, and do something for _QUANTITY and _MODEL, but I havne't been able to follow to where these are defined (the web provider in question has thwarted any attempts at a recursive grep by not allowing me access to a gnu grep, nor to the bash or sh shells to do a for loop :? ). Is this right, or am I barking up completely the wrong tree?


Hope somebody can help

-- Matt Sk (etc)

Link to comment
Share on other sites

I want to remove this. how do I do it? (It confuses customers into thinking that ALL the products are in the "New Products" box,)


Also, would you know how to show BOTH categories and products in the middle field on the table page?


Sorry I can't help, but from the way you're talking you know how to do some of this stuff :)

- - - -

Sometimes, ignorance is bliss.

Link to comment
Share on other sites

  • 3 weeks later...

I think what you're trying to do is part of the Admin section of MS1 and later (at least-- I haven't used any earlier versions). Both the Model and Quantity are supported.


See this post for details:




Now what I'm looking for is a way to add my own fields to this, so I can show extra info in this listing... and format it my own way. Any suggestions?



Link to comment
Share on other sites


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

  • Create New...