rdjeurope Posted October 17, 2012 Posted October 17, 2012 Hello all i installed the contribution main_categories in my oscommerce shop version 2.2 www.silla-mesa-sofa.es to show the categorie images on my frontpage. the problem i have is, to set it up with just two collums i cant find the solution for this in the install description they say the following: Main Categories as Thumbnails on Index Page 3 Sep 2009 Updated to display just like the other information boxes that appear at the bottom of a page (such as new products) so that simple CSS changes will update this box as well. Corrected to use the subcategory image width and height rather than small product image width and height. Uses the Categories To List Per Row defined in administration to determine how many categories to list in a row. and.... Check the index page, only main categories will appear. You can edit design by editing main_cats.php file located in includes/modules/ i dont understand whatt they mean because on the following code i cant find how to modify the numbers of collums: Can anybody help me please??? <!-- main_categories - EM-STUDIO.info//--> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; $info_box_contents = array(); $result = tep_db_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.parent_id = '0' AND c.categories_id = cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' ORDER BY sort_order "); while($data = tep_db_fetch_array($result)){ $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="' . $width . '" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($data['categories_id'])) . '">' . tep_image(DIR_WS_IMAGES . $data['categories_image'], $data['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $data['categories_name']); $col ++; if ($col == MAX_DISPLAY_CATEGORIES_PER_ROW) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- main_categories_eof //--> main_categories_1_2_3_4_5_6_7_8_9.zip
multimixer Posted October 17, 2012 Posted October 17, 2012 From what the addon say and from the code, you can set this in your admin using setting "display categories per row", that's under "admin>configuration>maximum values" My community profile | Template system for osCommerce - New: Responsive | Feedback channel
rdjeurope Posted October 17, 2012 Author Posted October 17, 2012 From what the addon say and from the code, you can set this in your admin using setting "display categories per row", that's under "admin>configuration>maximum values" thanks for the solution.... its working now
Recommended Posts
Archived
This topic is now archived and is closed to further replies.