Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One more problem with SubCategory


nonamers

Recommended Posts

I open one of my category's and found that at main window first SubCategory is linked to index.php

How can I fix it?

Somebody help me PLZ!!!

PS. I am ssory about my Enlish, I am not English speaking. I adding screenshot for you to see how I see it.

 

indexhw.jpg

Link to comment
Share on other sites

I am ssory... But where I can find it ?

Here is my site http://parfumplus.com.ua/

 

Your linked Images: Main takes you to ekna, your link enka takes you to index.php

 

I believe the problem is in your image display linking structure.

 

Women is cPath=14

ekna is cPath=14_18

Main is cPath=14_17

 

The links work correctly from the Categories box on the left, and the breadcrumb navigation. Something is bad in your Categories Image Box.

Link to comment
Share on other sites

...

The links work correctly from the Categories box on the left, and the breadcrumb navigation. Something is bad in your Categories Image Box.

I got it =)

But how can I fix it ?

I am trying to find answer for a long time ... =(

Link to comment
Share on other sites

  • 2 weeks later...

I am having the same problem. Did you find a solution?

 

I don't know about you, but I'm finding that the first subcat is index.php, and the second links to where the first should, the third links to where the second should, and so on...

 

However, I cannot find a single clue as to what's causing this amongst the code!

 

Any help would be great!

 

Thanks,

 

RR

Link to comment
Share on other sites

It simply just goes to the index.php page, when it should be going to the actual subcat. The next subcat goes to where the previous subcat should have. The second subcat goes to www.mysite.com/index.php?cPath=67_170.

 

I've looked through index.php but can't see where it's adding this index.php link automatically to every subcat page. I'm guessing it's something to do with a number within the code, rather than the position of the link, or so forth.

 

Most likely in the below code...?

 

	
$number_of_categories = tep_db_num_rows($categories_query);
$rows = 0;
while ($categories = tep_db_fetch_array($categories_query)) {

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';

$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';



  $rows++;
  $cPath_new = tep_get_path($categories['categories_id']);
  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  echo '               

	<td  align="center" width="' . $width . '">
               <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                       <td style="height:16px " align="center" class="vam"><span>'.$p_name_sub.'</span></td>
                   </tr>
                   <tr>
                       <td style="height:95px " align="center" class="pic" >'.tep_draw_prod_pic_top().''.$p_pic_sub.''.tep_draw_prod_pic_bottom().'</td>
                   </tr>
               </table> 
	</td>
  ' . "\n";
			  if ($col!=(MAX_DISPLAY_CATEGORIES_PER_ROW-1)){
			  echo '
					<td class="bg_line_y">'.tep_draw_separator('spacer.gif', '1', '1').'</td>					
					';
			  }
			 else{	

  if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
	echo '              
</tr><tr><td class="bg_line_x" colspan="'.(MAX_DISPLAY_CATEGORIES_PER_ROW + MAX_DISPLAY_CATEGORIES_PER_ROW -1).'">'.tep_draw_separator('spacer.gif', '1', '10').'</td></tr>' . "\n";
	echo '              <tr>' . "\n";
  }
}
if ($col==MAX_DISPLAY_CATEGORIES_PER_ROW-1){
$col=0;
}else{
$col++;
}
}

Link to comment
Share on other sites

No. Rename includes/boxes/categories.php to something like categories_backup.php. Then upload from a new copy of oscommerce, includes/boxes/categories.php and see what happens . Just upload one file, a new includes/boxes/categories.php. It could simply be a typo somewhere.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

No. Rename includes/boxes/categories.php to something like categories_backup.php. Then upload from a new copy of oscommerce, includes/boxes/categories.php and see what happens . Just upload one file, a new includes/boxes/categories.php. It could simply be a typo somewhere.

 

The area which is affected isn't the box in a column, it's in the main body of the page. I will try your suggestion, but I'm certain that I'd be altering an entirely different section.

 

Thanks,

 

RR

Link to comment
Share on other sites

In catalog/index.php try moving

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';

below this part.

$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

Not sure if that will fix it so be sure to back up first

Link to comment
Share on other sites

In catalog/index.php try moving

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';
$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';

below this part.

$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

Not sure if that will fix it so be sure to back up first

 

I love you and I want to have your babies!!!

 

Thank you so much!

 

I've looked at the code, but can't understand why it would make it work that way round, but it's done the trick! Thanks alot, once again!

Link to comment
Share on other sites

I love you and I want to have your babies!!!

 

Thank you so much!

 

I've looked at the code, but can't understand why it would make it work that way round, but it's done the trick! Thanks alot, once again!

You were creating the links with the $cPath_new before you set the $cPath_new. Which is why we moved below.

 

P.S About the babies, no thanks. :lol:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...