
Originally Posted by
DivaVocals
So I finally have hit a snag using SNAF.. I've always preferred this module of the Column Product Listings mod because Column Product Listing module only converts the category product listing into grid listings, whereas SNAF covers ALL products listings including the Specials, Feature, and New Products listings..
The issue I've run into with SNAF is the tables used to create the grids.. It looks like code that drive this are in these files:
includes/templates/custom_template/common/tpl_columnar_display.php
includes/templates/custom_template/common/tpl_tabular_display.php
I need to convert the tables to a CSS grid like the one used for the category listings in the Column Product Listings mod. Otherwise this mod will be a bit of a bear to deal with in responsive templates..
I've been staring at the code in these two files hoping to "figure it out", but I am waving the white flag and admitting that I haven't a CLUE here.. Hoping that if not niccol, that some kind community member can help me with the changes I need to make..
I prefer flexible product listing over both but that is here nor there.
I have converted the tables for you (done previously):
PHP Code:
<?php
/**
* Common Template - tpl_tabular_display.php
*
* This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $
*/
//print_r($list_box_contents);
$cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
$cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title;
?>
<div width="100%" id="<?php echo 'cat' . $cPath . 'Table'; ?>" class="tabTable">
<?php
for($row=1; $row<sizeof($list_box_contents); $row++) {
$r_params = "";
$c_params = "";
if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params'];
?>
<div <?php echo $r_params; ?>>
<?php
for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
$c_params = "";
$cell_type = ($row==0) ? 'div' : 'div';
if (isset($list_box_contents[$row][$col]['params'])) $c_params .= ' ' . $list_box_contents[$row][$col]['params'];
if (isset($list_box_contents[$row][$col]['align']) && $list_box_contents[$row][$col]['align'] != '') $c_params .= ' align="' . $list_box_contents[$row][$col]['align'] . '"';
if ($cell_type=='div') $c_params .= ' scope="' . $cell_scope . '" id="' . $cell_title . 'Cell' . $row . '-' . $col.'"';
if (isset($list_box_contents[$row][$col]['text'])) {
?>
<?php echo '<' . $cell_type . $c_params . '>'; ?><?php echo $list_box_contents[$row][$col]['text'] ?><?php echo '</' . $cell_type . '>' . "\n"; ?>
<?php
}
}
?>
<br class="clearBoth" />
</div>
<?php
}
?>
</div>
This requires additional css to make work. I do not have a clean version but you can check the source code out here: www[.]zcadditions[.]com/9172013/index.php?main_page=index&cPath=12_13