[prev in list] [next in list] [prev in thread] [next in thread]
List: tep-commits
Subject: [TEP-COMMIT] CVS: catalog/catalog/includes/modules product_listing.php,1.41,1.42
From: Harald Ponce de Leon <hpdl () users ! sourceforge ! net>
Date: 2003-05-27 17:11:28
[Download RAW message or body]
Update of /cvsroot/tep/catalog/catalog/includes/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv30471/includes/modules
Modified Files:
product_listing.php
Log Message:
update the layout of the product listing module
use the updated splitPageResults class
Index: product_listing.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/modules/product_listing.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- product_listing.php 12 Feb 2003 23:55:58 -0000 1.41
+++ product_listing.php 27 May 2003 17:11:26 -0000 1.42
@@ -9,37 +9,21 @@
Released under the GNU General Public License
*/
-?>
-<table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- $listing_numrows_sql = $listing_sql;
- $listing_split = new splitPageResults($HTTP_GET_VARS['page'], \
MAX_DISPLAY_SEARCH_RESULTS, $listing_sql, $listing_numrows);
-// fix counted products
- $listing_numrows = tep_db_query($listing_numrows_sql);
- $listing_numrows = tep_db_num_rows($listing_numrows);
- if ( ($listing_numrows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || \
(PREV_NEXT_BAR_LOCATION == '3') ) ) { + $listing_split = new \
splitPageResults($listing_sql, $HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, \
'p.products_id'); +
+ if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || \
(PREV_NEXT_BAR_LOCATION == '3') ) ) { ?>
+<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="smallText"> <?php echo \
$listing_split->display_count($listing_numrows, MAX_DISPLAY_SEARCH_RESULTS, \
$HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); \
?> </td>
- <td align="right" class="smallText"> <?php echo TEXT_RESULT_PAGE; ?> \
<?php echo $listing_split->display_links($listing_numrows, \
MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], \
tep_get_all_get_params(array('page', 'info', 'x', 'y'))); \
?> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator(); ?></td>
+ <td class="smallText"><?php echo \
$listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> + <td \
class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . \
$listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, \
tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr>
+</table>
<?php
}
-?>
- <tr>
- <td>
-<?php
+
$list_box_contents = array();
- $list_box_contents[] = array('params' => 'class="productListing-heading"');
- $cur_row = sizeof($list_box_contents) - 1;
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
switch ($column_list[$col]) {
@@ -76,23 +60,23 @@
$lc_align = 'center';
break;
}
-
+
if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != \
'PRODUCT_LIST_IMAGE') ) {
$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}
- $list_box_contents[$cur_row][] = array('align' => $lc_align,
- 'params' => \
'class="productListing-heading"',
- 'text' => ' ' . $lc_text . \
' '); + $list_box_contents[0][] = array('align' => $lc_align,
+ 'params' => 'class="productListing-heading"',
+ 'text' => ' ' . $lc_text . ' ');
}
- if ($listing_numrows > 0) {
- $number_of_products = '0';
- $listing_query = tep_db_query($listing_sql);
+ if ($listing_split->number_of_rows > 0) {
+ $rows = 0;
+ $listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
- $number_of_products++;
+ $rows++;
- if (($number_of_products/2) == floor($number_of_products/2)) {
+ if (($rows/2) == floor($rows/2)) {
$list_box_contents[] = array('params' => 'class="productListing-even"');
} else {
$list_box_contents[] = array('params' => 'class="productListing-odd"');
@@ -156,33 +140,25 @@
}
}
- new tableBox($list_box_contents, true);
-
- echo ' </td>' . "\n" .
- ' </tr>' . "\n";
+ new productListingBox($list_box_contents);
} else {
-?>
- <tr class="productListing-odd">
- <td class="smallText"> <?php echo \
(isset($HTTP_GET_VARS['manufacturers_id']) ? TEXT_NO_PRODUCTS2 : TEXT_NO_PRODUCTS); \
?> </td>
- </tr>
-<?php
+ $list_box_contents = array();
+
+ $list_box_contents[0] = array('params' => 'class="productListing-odd"');
+ $list_box_contents[0][] = array('params' => 'class="productListing-data"',
+ 'text' => \
(isset($HTTP_GET_VARS['manufacturers_id']) ? TEXT_NO_PRODUCTS2 : TEXT_NO_PRODUCTS)); \
+ + new productListingBox($list_box_contents);
}
+
+ if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || \
(PREV_NEXT_BAR_LOCATION == '3')) ) { ?>
+<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
- <td><?php echo tep_draw_separator(); ?></td>
- </tr>
-<?php
- if ( ($listing_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || \
(PREV_NEXT_BAR_LOCATION == '3')) ) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="smallText"> <?php echo \
$listing_split->display_count($listing_numrows, MAX_DISPLAY_SEARCH_RESULTS, \
$HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); \
?> </td>
- <td align="right" class="smallText"> <?php echo TEXT_RESULT_PAGE; ?> \
<?php echo $listing_split->display_links($listing_numrows, \
MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], \
tep_get_all_get_params(array('page', 'info', 'x', 'y'))); \
?> </td>
- </tr>
- </table></td>
+ <td class="smallText"><?php echo \
$listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> + <td \
class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . \
$listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, \
tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr>
+</table>
<?php
}
?>
-</table>
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Tep-commits mailing list
Tep-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tep-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic