ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Adding a column to the product list view?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding a column to the product list view?

 Post Reply Post Reply
Author
Message
padreick View Drop Down
Newbie
Newbie
Avatar

Joined: 20-February-2012
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote padreick Quote  Post ReplyReply Direct Link To This Post Topic: Adding a column to the product list view?
    Posted: 27-February-2012 at 3:25pm
At the end of the day, I'd like to add a "Length" column to pages that appear like this http://www.toolsxp.com/toolsxp/pc/11-00-OC-c28419.htm
 
Is it possible to add custom columns to the list view? Is there an easy way to add fields to the ProductCart database? I have all the information in Excel spread sheets, could I "hijack" a field I don't use from the PC database, use the import wizard to upload the data, and then change how the title appears on the page?
 
What would be the best way to go about this?
 
I've tried a few things, but I'm picking up where a previous tech left off and I'm still pretty lost on the relationship between viewprd, viewprdCode, viewprdO, viewprodL, etc.
 
Any help would be great, thanks.
 
Edit for clarification when I say "Hijack a field" - I don't use "Short Category Description 1" from my PC database. Could I use the import wizard to fill that with length data, add a Short Category Description 1 column to my product list, and then edit it so the column title appears as "Length?"


Edited by padreick - 27-February-2012 at 3:39pm
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 27-February-2012 at 3:58pm
First, let me resolve your question about the relationship between those files.
 
viewPrd.asp is the main product page.  It uses other "included" files to fill it out.
 
viewPrdC.asp, viewPrdL.asp and viewPrdO.asp represent 3 switch-selectable formats (image left, image right and centered image) that you can choose for a product detail page.

viewPrdCode.asp contains a bunch of functions and subroutines.  Each of them perform some task such as printing the product name, the sku number, the "tell a friend" button, or some other common element that gets displayed to the page.
 
viewPrdC.asp, viewPrdL.asp and viewPrdO.asp make calls to the subs and functions in viewPrdCode.asp in order to generate the finished product page.
 
But what you are showing us here is not related to those files - you are showing us the category page (viewCategories.asp).  It uses files such as pcShowProductH.asp, pcShowProductL.asp and pcShowProductM.asp in order to control its respective formats which are also switch-selectable.  Your page above is using pcShowProductM.asp (M = multiple add to cart) to display content.
 
Now, on to your question.  The act of adding a field to the products table, for an experienced developer, is not hard.  Emphasis on experienced developer.  When it comes to a newbie doing that, not so easy.
 
And adding columns to the products table is one of the most common requests we get.  You first add a column to the database (using a tool such as MS SQL Studio), then you add support for that column to the product admin tools.  Then you have to query that new data from the database and display it to whatever page you want. 
 
We do something like that on 2 out of 3 development projects that we perform for our clients.  It is so common that when we built the v4.5 version of our tabbed product page mod, we decided to address that very situation:
http://www.greybearddesign.com/productcart/tabbed-product-page/
 
In that mod we added 12 fields for tabs and their respective override tab titles, but we also built support for 9 additional dead-ended fields.  I refer to these as "dead-ended" because they go nowhere other than into the products table.  What one uses those for is up to the individual merchant. 
 
So we have 3 textarea fields, 3 simple text fields, and 3 checkbox on/off flags.  The product admin tools have been altered to support those fields, as has the CSV/XLS import tool. 
 
What happens next?  After installing this mod, and populating one of those "simlpe text fields" with your length data, you (or a develoer) would then alter viewCategories.asp to retrieve that field, and then pcShowProductH.asp to display it.
 
Does that help?
 
 
 
Back to Top
padreick View Drop Down
Newbie
Newbie
Avatar

Joined: 20-February-2012
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote padreick Quote  Post ReplyReply Direct Link To This Post Posted: 27-February-2012 at 6:12pm
Yes, absolutely, thank you for taking the time to write such a thorough response. That's how my thought process was working, but you saved me a lot of trial and error figuring out the specifics or if it would even work. Thanks for being so active on this forum, it is an immense help.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.