Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

moving header image on Index.php page


sinryder

Recommended Posts

hello guys i am trying to move the header image ( the one on top right corner ) so it can be right next to the categories text.

 

you can take a look at my site

 

the problem is its on the left side and the categoris are on right , i need it the opposite so the image will be on the right side and categories text on left.

 

the code i moved is this

<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

 

index.php code

 

<?php
 if ($category_depth == 'nested') {
   $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   $category = tep_db_fetch_array($category_query);
?>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="center"><h1><?php echo HEADING_TITLE; ?></h1></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
----------------------  < THIS IS THE WHERE I PLACED THE CODE --------------------
<td valign="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>  

<?php
   if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }

   $number_of_categories = tep_db_num_rows($categories_query);

   $rows = 0;
   while ($categories = tep_db_fetch_array($categories_query)) {
     $rows++;
     $cPath_new = tep_get_path($categories['categories_id']);
     $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
     echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><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) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
     if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
       echo '              </tr>' . "\n";
       echo '              <tr>' . "\n";
     }
   }

 

 

 

 

any help is very much appreciated

 

thankyou

Link to comment
Share on other sites

try to place next to HEADING TITLE

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="center"><h1><?php echo HEADING_TITLE; ?></h1></td>
         <td valign="right"><?php echo tep_image(DIR_WS_IMAGES .     $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
        </tr>
      </table></td>

Link to comment
Share on other sites

try to place next to HEADING TITLE

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
? ? ? ? <tr>
? ? ? ? ? <td valign="center"><h1><?php echo HEADING_TITLE; ?></h1></td>
? ? ? ? ?<td valign="right"><?php echo tep_image(DIR_WS_IMAGES . ? ? $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
? ? ? ? </tr>
? ? ? </table></td>

 

hey , thats where it was before , but i have changed it again , you can take a look.

 

this is where i want it to be:

 

index.JPG

 

thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...