Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image Map Help


Guest

Recommended Posts

Allright, so I'm setting up my first osCommerce store and so far its going okay. I have it setup to where there is a seperate menu image for each category and then it calls that category's menu image (tabs) so you can tell which category you are browsing.

 

Now to what I need help with is the image map. I'm not sure where to put what and in which files and how to get the exact cordinates?

 

If getting the image map to work has to do with what I did to get the menu image to change then here's how I did it...

 

I added the following to application_top.php :

 if (strlen($cPath) > 0) {

  $cPath_array = tep_parse_category_path($cPath);

  $cPath = implode('_', $cPath_array);

  $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];

$primary_category_id = $cPath_array[0];

$menu_number = $primary_category_id;

} else {

  $current_category_id = 0;

$menu_number = '0';

}

 

I added the following to header.php :

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><img src="images/menu<?php echo $menu_number ?>.gif"><td>
 </tr>
</table>

 

Here's a link to the site if you need to look at what I'm talking about .. just click the different categories at the bottom of the left column for now : http://connections.fidesigns.com/catalog/

Link to comment
Share on other sites

I thought I had figured it out but it doesn't seem to working so can someone take a look at what I did and see where I went wrong ...

 

I added this to the header.php where the image goes :

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><img src="images/menu<?php echo $menu_number ?>.gif" alt="Connections Skate Shop" usemap="#menu0" /><td>
 </tr>
</table>

 

and then I added this to the very end of footer.php :

<map id="menu0" name="menu0">
<area shape="rect" coords="2,10,95,39" href="index.php?cPath=21" title="Custom Built, Razors, Deshi, Rollerblade, K2, And More" />
</map>

 

I thought this would get the "skates" button to work and I realize that if it had work it would've lost the SID but I wanted to see if I was going in the right direction.

 

Thanks in advance for any help...

 

~Danny Egan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...