Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add column to productlisting

Add column to productlisting

Views: 1,390

Results 1 to 7 of 7
11 Jun 2014, 1:01 PM
#1
tomdonker avatar

tomdonker

New Zenner

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

Add column to productlisting

Is it possible to add a different column than the standard options like, productphoto, article name, and price?
I'd like to add a column where I can add the lengths of the plants.

Can't find it on the forum :S

www<dot>nietwoekerendebamboe<dot>nl/bamboe/

11 Jun 2014, 1:56 PM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,785
Plugin Contributions:
21

Re: Add column to productlisting

Yes, it is possible, but it's not very easy. Especially if you want to allow to sort by that field... I think I've seen a post about this, but can't seem to find it now...

If you only want to display that info, for example, below the truncated description, I'd go with a custom function in extra_functions directory that would collect that info from the database (assuming it's stored in a separate field or even table) and then echo it below the description. You would call that function from includes/modules/YOUR_TEMPLATE/product_listing.php

12 Jun 2014, 2:06 PM
#4
tomdonker avatar

tomdonker

New Zenner

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

Re: Add column to productlisting

Thanks for the fast reply's.
Gonna try the last option.

12 Jun 2014, 6:42 PM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,785
Plugin Contributions:
21

Re: Add column to productlisting

stevesh:

You might take a look at this:

http://www.zen-cart.com/downloads.php?do=file&id=1495

Are you sure, stevesh? I haven't used that mod for a loooong time, but last time I used it, it was only usable on product_info page, not product_listing as the OP asked for... Or am I missing something here? :lookaroun

12 Jun 2014, 7:41 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Add column to productlisting

No, I'm not sure. I've only tested that mod a little. This in the description of the mod suggests it may at least offer a place to start:

Secret Product - mark a product as secret and then make your product listing and info pages not display the product unless your conditions are met.

12 Jun 2014, 7:58 PM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Add column to productlisting

tomdonker:

Is it possible to add a different column than the standard options like, productphoto, article name, and price? ...
I've done this in the past using product attributes and a custom product_listing module. It basically replicated how a "print" catalog usually lists "product variants". This also makes searching and custom filters much easier to implement. But "table based" website product listings are not very friendly for smaller screens (IMHO).

Lately I'm more in favor of avoiding table layouts for product listings. I usually format product listings more in line with how search engines and other major e-commerce players. This ensures the visitor gets a "familiar" interface, supports small screens (mobile), and reduces the number of clicks required for a purchase. These also do not require any custom coding (just attributes defined for the stuff you want to show customers and a template displaying product listings this way).

Otherwise you will be probably need to do some custom coding to store the extra column information and modify the output from the product_listing module.