Sousa Posted March 21, 2007 Posted March 21, 2007 How can i do this: categorie1 categorie2 categorie3 sub1 sub1 sub1 sub2 sub2 sub2 sub3 sub3 sub3 sub4 sub4 sub4 This is urgent!! Anyone help me! KUBICO from Portugal
Guest Posted March 22, 2007 Posted March 22, 2007 not sure if a contribution exists that does exactly that but if not, look the site map related contributions. Then you could reformat it to show only the categories in columns. Extract the categories code only.
Sousa Posted March 22, 2007 Author Posted March 22, 2007 i can't do this with sitemap. I trym, but no sucess. i only can list categories in vertical. Can anybody help me with this? This is urgent!!! KUBICO from Portugal
Sousa Posted March 26, 2007 Author Posted March 26, 2007 im trying everything but nothing see this $sts->start_capture(); $category = $HTTP_GET_VARS['cPath']; //$cats = array(); //$cats1 = array(); $qd = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' and c.parent_id='0'"; // Execute SQL query and get result $sql_qd = tep_db_query($qd); $rowa = mysql_fetch_array($sql_qd); //echo count($row); // Format results by row echo count($row); $i=0; while ($i <= count($rowa)) { $cPath_now = $rowa['categories_id']; $cat = array( 'cat'.$rowa['categories_id'] => '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_now, 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $rowa['categories_image'], $rowa['categories_name'], SUBCATEGORY_IMAGE_HEIGHT) . '</a>' ); //echo $cPath_now; //echo $i; echo $rowa['categories_id']; echo "<br>"; next($rowa); $i++; } print_r($cat); $sql_sub = "select c.categories_id, c.categories_image, c.parent_id, c.sort_order, cd.categories_name, cd.language_id from categories c, categories_description cd where c.parent_id = '" . $row['categories_id'] ."' and cd.language_id ='" . $languages_id ."' and c.categories_id = cd.categories_id"; $sql_sub_result = tep_db_query($sql_sub); $row_sub = mysql_fetch_array($sql_sub_result); // print_r($row_sub); $cPath_sub = $row_sub['categories_id']; for ($j = 0; $j <= count($row_sub) - j; $j++){ //$cats = array($row_sub['categories_name'] => '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_sub, 'NONSSL') . '">' . $row_sub['categories_name'] . '</a>' ); $cats1 = array('cat'. $cPath_now => array( $row_sub['categories_name'] => '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_sub, 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $row_sub['categories_image'], $row_sub['categories_name'], SUBCATEGORY_IMAGE_HEIGHT) . '</a>' )); } // print_r($cats); $sts->stop_capture('rss'); Can anyone help me, with this? I want to show the categories side by side and subcategories below. cat | cat1 sub1| sub1 sub2| sub2 Please i need this code with urgency. Thanks in advance KUBICO from Portugal
bkellum Posted March 26, 2007 Posted March 26, 2007 This contribution might be what you are looking for: http://www.oscommerce.com/community/contributions,1213 Hope this helped, Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Recommended Posts
Archived
This topic is now archived and is closed to further replies.