Three Columns Grid for New and All Products Pages

Description
This is my first attempt at anything like a contribution for zen cart,
and while it is working great for me (three columns of items with fairly
big thumbnails and no display of description) it may not work for you at
all, but ought to give you a jumping off point for making some
additional quick tweaks on your own. Furthermore, it has mostly been
hacked from the post by pjb923 on 19th April 2007,
https://www.zen-cart.com/forum/showthread.php?t=59938 but the forum also
shows many people still struggling with it (as I have) and likewise
probably searching contributions in vain as well.

These two files get placed in your overlay folder:
includes/templates/CUSTOM/templates/tpl_modules_products_all_listing.php
includes/templates/CUSTOM/templates/tpl_modules_products_new_listing.php
where CUSTOM is the name of your template.

They are hardcoded to three columns near the last line of the file;
$row_counter==3 actually counts three columns of items so if
you have tiny thumbs you might like to change this to a higher number
and change the width in the style applied to the class .new_products
when you add it to your stylesheet.

You will also need to make a tiny edit to the header files for these two
pages, includes/modules/pages/products_all/header_php.php
includes/modules/pages/products_new/header_php.php In the raw query
string, find "m.manufacturers_name" and add ", m.manufacturers_id"
after it to capture the data this mod needs for the manufacturer link.

Also I added these definitions to my stylesheet,
includes/templates/CUSTOM/css/stylesheet.css

h3.itemTitle {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
.new_products {
float: left;
width: 32.5%;
text-align: center;
padding: 3px 1px;
}

I also found after many hours of trying to read code that the sequence
of the items shown and spaces after each are managed the zen way, in the
admin pages Configuration -_ New Listing and Configuration -_ All
Listing. I left a single space after all but the last item, and have
disabled the space after the item name since this is now tagged as an h3
header. The last item is to visit Configuration -_ Maximum Values and
set New Products Listing- Number Per Page and Maximum Display of
Products All Page to some attractive multiple of your columns. I used 21.

Zen Cart® Versions v1.3.8
Original Author dweb
Downloads 2,745

Version History

Three Columns Grid for New and All Products Pages   -   Version: 0.1
 
Zen Cart® Versions v1.3.8
Date Added 20 Jul 2009
Author
File Size 7.0 KB
PHP 5.3 Safe? Unknown
Downloads 2,745
 


disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR