osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Sub-category pics

This is a discussion on Sub-category pics within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; My shopping cart has several categories and Subcategories ( as most of the carts do!). When I click on a ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-23-2003, 07:49 PM
Member
 
Join Date: Dec 2002
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Dumb_Question
Default Sub-category pics

My shopping cart has several categories and Subcategories ( as most of the carts do!). When I click on a particular category in the left column,it reads "Displaying 0 to 0 (of 0 products) ". is it supposed to do that. I would like to have subcategory pics on the page when someone clicks on a particular category link.

appreciate your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 09-11-2003, 01:41 PM
Member
 
Join Date: Nov 2002
Location: Pennsylvania
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
|3ackdraft
Default

I think if I understand your question, you want to display items, and then the items sub-categories.

You will need to edit the following:

locate the following in index.php (MS2) or default.php (MS1)
Quote:
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
</tr>
Then just above this you will paste the following:
Quote:
<tr>
<td>

<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr>
<?php
if(isset($cPath)){
if(ereg('_',$cPath)){
$category_links=array_reverse($cPath_array);
$cat_to_search=$category_links[0];
} else{
$cat_to_search=$cPath;
}

//check to see if there are deeper sub categories within the current category
$categories_query = tep_db_query("select c.categories_id,cd.categories_name,c.categories_im age,c.parent_id from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.parent_id = '".$cat_to_search."' and c.categories_id=cd.categories_id and cd.language_id='".$languages_id."'order by sort_order ,cd.categories_name");

if(tep_db_num_rows($categories_query)>0){
$rows=0;
while($categories=tep_db_fetch_array($categories_q uery)){
$rows++;
$cPath_new=tep_get_path($categories['categories_id']);
$width=(int)(100/MAX_DISPLAY_CATEGORIES_PER_ROW).'%';
echo '<td align="center" class="smallText" style="width: ' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name']) . '</a><br><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a> </td>' . "\n";
if((($rows/MAX_DISPLAY_CATEGORIES_PER_ROW)==floor($rows/MAX_DISPLAY_CATEGORIES_PER_ROW))&&($rows!= tep_db_num_rows($categories_query))){
echo'</tr>'."\n";
echo'<tr>'."\n";
}
}
}
}
?>
</tr>
</table>

</td>
</tr>
Hope this is what you were looking for.

|3ackdraft
__________________
There\'s something about fireman, day and night they are always fireman!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Adding Category Descriptions in Category List for each Cat. el1jones osCMax v2 Customization/Mods 1 03-15-2006 01:37 AM
mo pics winkscustoms osCMax v1.7 Discussion 0 03-20-2005 07:08 PM
Showing pics above the description on category page Christy osCMax v1.7 Discussion 0 08-03-2004 08:27 PM
Align pics in category headers? fridgemags osCMax v1.7 Discussion 0 06-08-2004 11:29 AM
"edit category" pics gone bushman osCMax v1.7 Discussion 0 08-29-2003 09:06 AM


All times are GMT -8. The time now is 07:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax