rosemary Posted July 31, 2006 Posted July 31, 2006 Does anyone know . . . silly way to start a question here . . . Would someone please tell me what the following lines found in ..\includes\modules\product_listing.php file do in terms of laying out the product list (when you click on a particular category or sub-category)? --------------------------------------------------------------------------------------------------------------- $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); $list_box_contents = array(); 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)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } -------------------------------------------------------------------------------------------------------------- Furthermore . . . * Where is the class object "splitPageResults" constructed or defined? * Why is there a need for the 2 style classes "productListing-even" and "productListing-odd"? The 2 in the stylesheet is identical :blink: * What is this "floor($rows/2)" doing? I basically do not understand the condition, or the logic of the condition, that is being tested here with the 2nd "if" statement. Any enlightenment is appreciated! And how about helping me be a better fisherman ;) . . . is there any documentation on the core code? Thanks for any suggestions, comments, and advice. Rose
rosemary Posted July 31, 2006 Author Posted July 31, 2006 Oh, BTW, I had looked through the downloaded documentation several times. This documentation is helpful for making minor cosmetic changes. But for people who want to really dig in deep to make major modifications, the info is kind of lacking. Therefore any advice and directions, are appreciated. Rose Does anyone know . . . silly way to start a question here . . . Would someone please tell me what the following lines found in ..\includes\modules\product_listing.php file do in terms of laying out the product list (when you click on a particular category or sub-category)? --------------------------------------------------------------------------------------------------------------- $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); $list_box_contents = array(); 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)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } -------------------------------------------------------------------------------------------------------------- Furthermore . . . * Where is the class object "splitPageResults" constructed or defined? * Why is there a need for the 2 style classes "productListing-even" and "productListing-odd"? The 2 in the stylesheet is identical :blink: * What is this "floor($rows/2)" doing? I basically do not understand the condition, or the logic of the condition, that is being tested here with the 2nd "if" statement. Any enlightenment is appreciated! And how about helping me be a better fisherman ;) . . . is there any documentation on the core code? Thanks for any suggestions, comments, and advice. Rose
rosemary Posted August 4, 2006 Author Posted August 4, 2006 Does anybody have any ideas or insights about my inquiry about the aforementioned snippet of code in product_listing.php? Thanks for re-reading. Rose Oh, BTW, I had looked through the downloaded documentation several times. This documentation is helpful for making minor cosmetic changes. But for people who want to really dig in deep to make major modifications, the info is kind of lacking. Therefore any advice and directions, are appreciated. Rose
Recommended Posts
Archived
This topic is now archived and is closed to further replies.