241 Posted October 1, 2004 Author Share Posted October 1, 2004 Ok, finnaly I understand that this is the correct place for this question. Can I combine this contribution, with "Graphical Infobox Headers"?? Graphical Infobox Headers allow to use graphical headers for all side info tables, and it's aviable here: http://www.oscommerce.com/community/contri...h,table+infobox It's possible?? If not, how can I do? Thank you. <{POST_SNAPBACK}> You have come to the right place and yes you can combine the contributions in 10 seconds. This is the support for the contribution and where the answers can be gained. catalog/includes/boxes/categories.php locate code <!-- categories //--> <tr> <td> <?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new infoBoxHeading($info_box_contents, true, false); and change to <!-- categories //--> <tr> <td> <table width="144" border="0" cellspacing="0" cellpadding="1" class="infoboxborder"> <tr> <td> <table width=100% border=0 cellpadding=0 cellspacing=0 class="infoBoxContents"> <tr> <td colspan=3 width="100%"> <img src="images/boxes/table_categories.jpg"></td> </tr> <tr> <td width="100%"> <?php $aa = 0; // $info_box_contents = array(); // $info_box_contents[] = array('align' => 'left', // 'text' => BOX_HEADING_CATEGORIES // ); // new infoBoxHeading($info_box_contents, true, false); then locate new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> and change to new infoBox($info_box_contents); ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> <!-- categories_eof //--> Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
isabel Posted October 1, 2004 Share Posted October 1, 2004 Thanks 241, I'm very happy with this answer. Quote Link to comment Share on other sites More sharing options...
xPATRIOTSx Posted October 12, 2004 Share Posted October 12, 2004 Can this contribution be used in a way to set a background image for the text instead of using the bullets? Here's an example to give you an idea: Quote Go New England Patriots!!!! Link to comment Share on other sites More sharing options...
dblake Posted October 12, 2004 Share Posted October 12, 2004 (edited) Just replace the bullet with what image you want and table it up for your effect. Example: <table><tr><td><img src=leftroundcircle.gif></td><td bgcolor=colorofcircle><a href=category link> Then find the </a>and put </td><td><img src=rightroundcircle.gif></td></tr></table> Something like that. -Dennis Edited March 6, 2005 by 241 Quote Link to comment Share on other sites More sharing options...
xPATRIOTSx Posted October 12, 2004 Share Posted October 12, 2004 (edited) Just replace the bullet with what image you want and table it up for your effect. Example: <table><tr><td><img src=leftroundcircle.gif></td><td bgcolor=colorofcircle><a href=category link> Then find the </a>and put </td><td><img src=rightroundcircle.gif></td></tr></table> Something like that. -Dennis <{POST_SNAPBACK}> Ah ok, so it's 2 images, left and right, and ties in with the background, correct? Edited March 6, 2005 by 241 Quote Go New England Patriots!!!! Link to comment Share on other sites More sharing options...
dblake Posted October 13, 2004 Share Posted October 13, 2004 Correct. Aww the power of tables :) -Dennis Quote Link to comment Share on other sites More sharing options...
iwik Posted October 24, 2004 Share Posted October 24, 2004 I'd been trying to twiddle with my code myself to try and get it to do a background image within table cells for the categories, rather than using complete images for a few days now, and now this contribution coupled with that little bit of coding there does the job perfectly. I can't believe I never found this contrib sooner. Using the coding you guys have provided and tweaking it just a little, I also managed to make my infobox have one particular background for the main category cells, and another for the subcategory cells. Similar to this photoshop mockup of what I wanted to achieve: Thanks so much Steve & Dennis! Quote Link to comment Share on other sites More sharing options...
Guest Posted November 17, 2004 Share Posted November 17, 2004 When I turn on the cache option (in admin) the category list does not show on the index.php page. i reset boxe categorie. the pb persist. it possible to modifie cache.php for ignore boxe categorie ? thanks Quote Link to comment Share on other sites More sharing options...
241 Posted November 17, 2004 Author Share Posted November 17, 2004 (edited) When I turn on the cache option (in admin) the category list does not show on the index.php page. i reset boxe categorie. the pb persist. it possible to modifie cache.php for ignore boxe categorie ? thanks <{POST_SNAPBACK}> As previously posted in this support thread HERE this has nothing to do with this contribution. :-" It is not this contribution that is causing an issue with cache, if you remove this contribution you will still have an issue with cache this is due to your setup and not this contribution. :thumbsup: Edited November 17, 2004 by 241 Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
cheyenne Posted January 22, 2005 Share Posted January 22, 2005 Hi you all there, I am new here so maybe I am asking a stupid question. When I do copy the file, the new category box shows nicely on the index page but on the other pages it is not showing. Why? What do I have to do to fix it? Thanks Quote Link to comment Share on other sites More sharing options...
241 Posted January 22, 2005 Author Share Posted January 22, 2005 provide a link to the issue so that we can see what it is :thumbsup: Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
cheyenne Posted January 22, 2005 Share Posted January 22, 2005 provide a link to the issue so that we can see what it is :thumbsup: <{POST_SNAPBACK}> I didn't upload the file on the hostserver. I just copied it local so I can test it local on my computer. Do you think it can made a difference by uploading it to the server? I have my own server local installed on an another pc. Quote Link to comment Share on other sites More sharing options...
241 Posted January 22, 2005 Author Share Posted January 22, 2005 I didn't upload the file on the hostserver. I just copied it local so I can test it local on my computer. Do you think it can made a difference by uploading it to the server? I have my own server local installed on an another pc. <{POST_SNAPBACK}> No it should not make a difference, the link was to be able to visually see what was happening. Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
cheyenne Posted January 22, 2005 Share Posted January 22, 2005 No it should not make a difference, the link was to be able to visually see what was happening. <{POST_SNAPBACK}> I made a copy of the original categories file and uploaded the modified one to the server just to see what would happened. And it works, every page shows the contribution. I am very happy and I thank you again for this nice contribution. If I understand well you have to upload your page to your hostserver so you can it work into the whole site?Is there any other way you can test your files locally before you upload them? I can test the page local but not how it works on the other pages of the site locally. How can I fix this? Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2005 Share Posted January 22, 2005 As previously posted in this support thread HERE this has nothing to do with this contribution. :-" It is not this contribution that is causing an issue with cache, if you remove this contribution you will still have an issue with cache this is due to your setup and not this contribution. :thumbsup: <{POST_SNAPBACK}> i fixed the bug in catalog/includes/functions/cache.php search for: function tep_cache_categories_box add ,$foo,$id,$aa the function will look like this: function tep_cache_categories_box($auto_expire = false, $refresh = false) { global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string,$foo,$id,$aa; Enable your cache if not enabled it's all! Quote Link to comment Share on other sites More sharing options...
bglkk Posted January 24, 2005 Share Posted January 24, 2005 (edited) Hi: Just for kicks, I've merged Alpha Ray's code for changing the background of the Categories box into this great contribution. This version lets you have bullets, lines, and a different background color for the box. Alpha Ray's code can be found here: http://www.oscommerce.com/forums/index.php?sho...ndpost&p=528149 Here's the merged code. I'm not a programmer, so there may be a better way to do this--but it's working on my site. Note: This also requires adding several new stylesheet definitions (TD.infoCatBoxHeading, .infoCatBox, .infoCatBoxContents, and .CatboxText), as detailed in Alpha Ray's post. <?php /* $Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ function tep_show_category($counter) { global $foo, $categories_string, $id, $aa; for ($a=0; $a<$foo[$counter]['level']; $a++) { if ($a == $foo[$counter]['level']-1) { $categories_string .= "<font color='#ff0000'> </font>"; } else { $categories_string .= "<font color='#ff0000'> </font>"; } } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $categories_string .= "<hr>"; } else {$aa=1;} } $categories_string .= '<nobr><a nowrap href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' ';; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= "<b><font color='#ff0000'>"; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</font></b>'; } // if (tep_has_category_subcategories($counter)) { // $categories_string .= '->'; // } $categories_string .= '</nobr></a>'; // if (SHOW_COUNTS == 'true') { // $products_in_category = tep_count_products_in_category($counter); // if ($products_in_category > 0) { // $categories_string .= ' (' . $products_in_category . ')'; // } } $categories_string .= '<br>'; if ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $aa = 0; class infoCatBox extends tableBox { function infoCatBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoCatBox"'; $this->tableBox($info_box_contents, true); } function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoCatBoxContents"'; /* $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); */ $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="SearchCatText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class infoCatBoxHeading extends tableBox { function infoCatBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($right_arrow == true) $this->table_row_parameters = 'onclick="javascript:window.location=\''.$right_arrow.'\'"' . ' onmouseover="this.style.cursor=\'hand\'"'; /* if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } */ $left_corner = ' '; if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } $right_corner = false; if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="infoCatBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="infoCatBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoCatBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); new infoCatBoxHeading($info_box_contents, false, false); $categories_string = ''; $tree = array(); // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '>' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); // WebMakers.com Added: All products or All Products Multiple Purchase // new infoBox($info_box_contents); // WebMakers.com Added: Show All Products Listing if (SHOW_ALL_PRODUCTS_BOX=='1') { $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'); } // WebMakers.com Added: Show multiple product listing add for all products if (SHOW_PRODUCT_LISTINGS_MULTI_ADD_BOX=='1') { // All Products Multiple Purchase $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_PRODUCTS_ALL, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCT_ALL . '</a>'); } new infoCatBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> Edited March 6, 2005 by 241 Quote "Buy the ticket, take the ride..." -HST Link to comment Share on other sites More sharing options...
Spots Posted March 1, 2005 Share Posted March 1, 2005 Hi Steve...I don't know if you are still reading this support thread but i recently dled the categories box bullet and line contrib. Works great but i have a few mods that i want to do. I don't want a bullet but i really just want the line. How do i do that? What do i delete? Also is there a way to make the line extend through the entire categories box? And can i control the color of this line? Thanks! Quote Link to comment Share on other sites More sharing options...
241 Posted March 1, 2005 Author Share Posted March 1, 2005 Hi Steve...I don't know if you are still reading this support thread but i recently dled the categories box bullet and line contrib. Works great but i have a few mods that i want to do. I don't want a bullet but i really just want the line. How do i do that? What do i delete? Also is there a way to make the line extend through the entire categories box? And can i control the color of this line? Thanks! <{POST_SNAPBACK}> this line contains the bullett image $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' '; this line is the horizontal line $categories_string .= "<hr>"; to change the colour change to $categories_string .= tep_draw_separator('pixel_silver.gif', '125', '1'); Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Spots Posted March 1, 2005 Share Posted March 1, 2005 thanks steve for the response. I'm not allowed to just take the image line out right? When i tried to just delete the line $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' '; my categories dissappeared. Also what do i do to $categories_string .= "<hr>"; ?? Am i supposed to replace it with $categories_string .= tep_draw_separator('pixel_silver.gif', '125', '1'); because when i tried that, the lines were misaligned and it kinda looked like this Categories ----------------------category ----------------------cateogry ----------------------category Hope that makes sense. Thanks Quote Link to comment Share on other sites More sharing options...
241 Posted March 1, 2005 Author Share Posted March 1, 2005 thanks steve for the response. I'm not allowed to just take the image line out right? <{POST_SNAPBACK}> change $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' '; with $categories_string .= '"> '; and change $categories_string .= "<hr>"; with $categories_string .= tep_draw_separator('pixel_silver.gif', '100%', '1'); Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
ifccnb Posted March 2, 2005 Share Posted March 2, 2005 Hello Steve, I have a question about your "Categories Box Bullet and Line" and "Infobox Admin" contributions. Is there a compatibility issue with the two? I'm using OCS 2.2ms2 and have installed Contribs in this order: OnTheFly_GDThumbs_1_5 Infobox_Admin_ms2_2.2 These contribs are working fine. Next I tried installing the "Categories Box Bullet and Line" and ran into a snag.... Your categories.php file is very different from my working copy due to the infobox admin MOD. I tried to merge the difference in the two files using the "beyond Compare2" program. I thought I did a thorough job but when I tested it live only my first listed category shows up with none of my other categories or sub categories. It's the only thing listed... one, uno category :D Perhaps you can take a quick glance at my merged categories.php code. Any advice would be greatly appreciated. :thumbsup: <?php /* $Id: categories.php,v 1.23 2002/11/12 14:09:30 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ if ( (USE_CACHE == 'true') && !defined('SID')) { echo tep_cache_categories_box(); } else { function tep_show_category($counter) { global $foo, $categories_string, $id, $aa; for ($a=0; $a<$foo[$counter]['level']; $a++) { if ($a == $foo[$counter]['level']-1) { $categories_string .= "<font color='#ff0000'> </font>"; } else { $categories_string .= "<font color='#ff0000'> </font>"; } } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $categories_string .= "<hr>"; } else {$aa=1;} } $categories_string .= '<nobr><a nowrap href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $foo[$counter]['path']; } $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); $categories_string .= '">' . tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif', '') . ' ';; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= "<b><font color='#ff0000'>"; } // display category name $categories_string .= $foo[$counter]['name']; if ( ($id) && (in_array($counter, $id)) ) { $categories_string .= '</font></b>'; } // if (tep_has_category_subcategories($counter)) { // $categories_string .= '->'; // } $categories_string .= '</nobr></a>'; // if (SHOW_COUNTS == 'true') { // $products_in_category = tep_count_products_in_category($counter); // if ($products_in_category > 0) { // $categories_string .= ' (' . $products_in_category . ')'; // } } $categories_string .= '<br>'; if ($foo[$counter]['next_id']) { tep_show_category($foo[$counter]['next_id']); } } ?> <!-- categories //--> <tr> <td> <?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; // add links to products with no category $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = 0 and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' order by pd.products_name " ); while ($no_category = tep_db_fetch_array($product_query)) { $no_cat_product_id = $no_category['products_id']; $no_cat_products_name = $no_category['products_name']; $myref = "<a href=" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $no_cat_product_id) . '>' . $no_cat_products_name . '</a><br><br>'; $categories_string .= $myref; } // end links to products with no category ... code continued... $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); // WebMakers.com Added: All products or All Products Multiple Purchase // new infoBox($info_box_contents); // WebMakers.com Added: Show All Products Listing if (SHOW_ALL_PRODUCTS_BOX=='1') { $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a>'); } // WebMakers.com Added: Show multiple product listing add for all products if (SHOW_PRODUCT_LISTINGS_MULTI_ADD_BOX=='1') { // All Products Multiple Purchase $info_box_contents[] = array('align' => 'center" valign="top', 'text' => '<hr><a href="' . tep_href_link(FILENAME_PRODUCTS_ALL, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCT_ALL . '</a>'); } new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> Quote Link to comment Share on other sites More sharing options...
Spots Posted March 2, 2005 Share Posted March 2, 2005 (edited) Hi steve, sorry to be such a pain. 2 questions If you look at lingerie you'll see that the lines for the categories box don't extend to the left and right border of the box. Is there a way to make this line extend all the way? Also i think i would like to add a little more space between each of my categories. So instead of Categories lingerie lingerie lingerie I want Categories lingerie lingerie lingerie Where can i edit this part? Oh and lastly, i tried to make my own "pixel_pink" by opening photoshop and just making a 1 px x 1px image and filling it in with pink. After i did this, it didn't extend all the way (hence the black lines) How do i make a pixel pinK? =) Thanks!!! Edited March 2, 2005 by Spots Quote Link to comment Share on other sites More sharing options...
ifccnb Posted March 6, 2005 Share Posted March 6, 2005 Hello, Is it possible to modify the code to show the category count in parenthesis, like the default categories box displayed before the mod? thank you for your time... Quote Link to comment Share on other sites More sharing options...
241 Posted March 6, 2005 Author Share Posted March 6, 2005 Hello, Is it possible to modify the code to show the category count in parenthesis, like the default categories box displayed before the mod? thank you for your time... <{POST_SNAPBACK}> yes remove the comment out tags // if (SHOW_COUNTS == 'true') { // $products_in_category = tep_count_products_in_category($counter); // if ($products_in_category > 0) { // $categories_string .= ' (' . $products_in_category . ')'; // } } to give this if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
ifccnb Posted March 6, 2005 Share Posted March 6, 2005 Thanks for the quick tip Steve... Nice MOD, looks great. I have a question about using this MOD in conjuction with the InfoBox Admin MOD. I have gotten each of them to work when installed seperately but not together... I run into a problem when I do a file compare for the changes in: /catalog/includes/boxes/categories.php there are alot of differences in the code... I'll understand if you don't have the time to tackle my issue, but I was wondering if anyone got these two mods working together? thanks in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.