Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hi, Matt.


jaavi

Recommended Posts

Hi, Matt.

 

I have been trying to install the cool menu that apparently you did for Julie, she was kind enough to share it .

I made a file and called it extraheader.php which contained the whole script and put it in the 'catalog/includes' folder and I inserted the call in the header.php and I put the pics in the images folder.

OK, the problem is the code which is in the header does not get called, I had Julie look at it, as she has it already working on her site, this is the answer I got from her.

OK - the short answer is, I haven't a clue why it's not working.

 

You have put everything in the right place. When I view the source code for your page I get this

 

<!-- additional header bit //-->

<!-- additional header bit_eof //-->

 

So basically it just isn't calling the page at all! Or if it is, the code is not producing anything to see, so the source code produces nothing.

 

I tried putting the code directly into the header, which is where I had it originally, but then it just totally ignored the header and didn't even show the banner, so I had to put it back. This is odd, because when I had it in the header it worked perfectly. I just made a separate file for the sake of osc protocols and neatness.

 

All I can think is that it is something to do with the fact that you are using a different version to me. Maybe the code in the extraheader.php file needs to be prettied up to fit in with whichever version you are using.

 

Unfortunately, this is beyond my skills. Matt might be able to help a little more as he wrote the original code.

 

Sorry 

 

If you have any thoughts on this I would really appriciate it.

 

Thanks in advance,

 

Joey.

Link to comment
Share on other sites

Could you post the code that you use to include extraheader.php in header.php and the code in extraheader.php (or at least the initial part of it if it's long)? Also, a link to your site would be helpful.

 

Thanks,

Matt

 

P.S. When you say Cool Menu, I think of a particular osCommerce contribution that has nothing to do with this. Just FYI.

Link to comment
Share on other sites

This url will take you to the Admin and store http://ariojames.com/

 

and the code is

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="headerNavigation">

  <td class="headerNavigation"></td>

<td align="right" height="4" class="headerNavigation"></td>

</tr>

<tr>

<td height ="3"></td>

</tr>

</table>

<CENTER>

              <TABLE ID="NavigationBar3" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=NB_FYHP WIDTH=700>

                  <TR VALIGN=BOTTOM ALIGN=CENTER>

<td><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>"><?php echo ((($current_category_id == 0) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'home-on.gif', 'Home') : tep_image(DIR_WS_IMAGES . 'home-off.gif', 'Home')); ?></a></td>

 

<td><a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=1'); ?>"><?php echo ((($current_category_id == 1) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'freemusic-on.gif', 'FREE sheet music') : tep_image(DIR_WS_IMAGES . 'freemusic-off.gif', 'FREE sheet music & Hradware')); ?></a></td>

 

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=2'); ?>">  <?php echo ((($current_category_id == 2) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'sheetmusic-on.gif', 'Sheet music') : tep_image(DIR_WS_IMAGES . 'sheetmusic-off.gif', 'Sheet musics & oftware')); ?></a></td>

 

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=3'); ?>"> <?php echo ((($current_category_id == 3) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'gifts-on.gif', 'Gifts') : tep_image(DIR_WS_IMAGES . 'gifts-off.gif', 'Gifts & DVD's')); ?></a></td>

 

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=21'); ?>"> <?php echo ((($current_category_id == 21) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'cards-on.gif', 'Cards') : tep_image(DIR_WS_IMAGES . 'cards-off.gif', 'Cards  & Clothes')); ?></a></td>

 

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=1'); ?>"> <?php echo ((($current_category_id == 1) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'cds-on.gif', 'CDs') : tep_image(DIR_WS_IMAGES . 'cds-off.gif', 'CDs & Hrdware')); ?></a></td>

 

<td><a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>"><?php echo (((basename($PHP_SELF) == FILENAME_SPECIALS)) ? tep_image(DIR_WS_IMAGES . 'special-on.gif', 'Special offers') : tep_image(DIR_WS_IMAGES . 'special-off.gif', 'Special offers')); ?></a></td>

 

<td><a href="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo (((basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH)) ? tep_image(DIR_WS_IMAGES . 'search-on.gif', 'Search') : tep_image(DIR_WS_IMAGES . 'search-off.gif', 'Search')); ?></a></td>

 

<td><?php echo '<a href="http://4xact.com/xact lingerie" target="blank">' . tep_image(DIR_WS_IMAGES . 'thepit-off.gif', 'The Pit forum') . '</a>'; ?></td>

                  </TR>

              </TABLE>

</CENTER>

 

And in the header.php I inserted the following call

<!-- additional header bit //-->

<?php require(DIR_WS_INCLUDES . 'extraheader.php'); ?>

<!-- additional header bit_eof //-->

 

But when you view the source it only shows as this:

<!-- additional header bit //-->

<!-- additional header bit_eof //-->

Thanks again,

 

Joey.

Link to comment
Share on other sites

Try it like this:

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="headerNavigation">
  <td class="headerNavigation"></td>
<td align="right" height="4" class="headerNavigation"></td>
</tr>
<tr>
<td height ="3"></td>
</tr>
</table>
<CENTER>
              <TABLE ID="NavigationBar3" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=NB_FYHP WIDTH=700>
                  <TR VALIGN=BOTTOM ALIGN=CENTER>
<td><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>"><?php echo ((($cPath_array[0] == 0) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'home-on.gif', 'Home') : tep_image(DIR_WS_IMAGES . 'home-off.gif', 'Home')); ?></a></td>

<td><a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=1'); ?>"><?php echo ((($cPath_array[0] == 1) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'freemusic-on.gif', 'FREE sheet music') : tep_image(DIR_WS_IMAGES . 'freemusic-off.gif', 'FREE sheet music & Hradware')); ?></a></td>

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=2'); ?>">  <?php echo ((($cPath_array[0] == 2) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'sheetmusic-on.gif', 'Sheet music') : tep_image(DIR_WS_IMAGES . 'sheetmusic-off.gif', 'Sheet musics & oftware')); ?></a></td>

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=3'); ?>"> <?php echo ((($cPath_array[0] == 3) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'gifts-on.gif', 'Gifts') : tep_image(DIR_WS_IMAGES . 'gifts-off.gif', 'Gifts & DVD\'s')); ?></a></td>

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=21'); ?>"> <?php echo ((($cPath_array[0] == 21) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'cards-on.gif', 'Cards') : tep_image(DIR_WS_IMAGES . 'cards-off.gif', 'Cards  & Clothes')); ?></a></td>

<td> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=1'); ?>"> <?php echo ((($cPath_array[0] == 1) && (basename($PHP_SELF) == FILENAME_DEFAULT)) ? tep_image(DIR_WS_IMAGES . 'cds-on.gif', 'CDs') : tep_image(DIR_WS_IMAGES . 'cds-off.gif', 'CDs & Hrdware')); ?></a></td>

<td><a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>"><?php echo (((basename($PHP_SELF) == FILENAME_SPECIALS)) ? tep_image(DIR_WS_IMAGES . 'special-on.gif', 'Special offers') : tep_image(DIR_WS_IMAGES . 'special-off.gif', 'Special offers')); ?></a></td>

<td><a href="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH); ?>"><?php echo (((basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH)) ? tep_image(DIR_WS_IMAGES . 'search-on.gif', 'Search') : tep_image(DIR_WS_IMAGES . 'search-off.gif', 'Search')); ?></a></td>

<td><?php echo '<a href="http://4xact.com/xact lingerie" target="blank">' . tep_image(DIR_WS_IMAGES . 'thepit-off.gif', 'The Pit forum') . '</a>'; ?></td>
                  </TR>
              </TABLE>
</CENTER>

Hth,

Matt

Link to comment
Share on other sites

OK, if you have CPanel, you can password protect the whole admin directory very easily. If not, you can apparently use .htaccess to do the same thing. I never did it so I don't know but I had a little search and found this thread.

 

http://www.oscommerce.com/forums/index.php?sho...=0entry252207

 

I don't really understand what this guy actually did but apparently he made it work. Maybe you could try PM-ing him.

 

HTH

Link to comment
Share on other sites

I was thinking to password protect it, but this hosting is just my testing ground, so I don't have a password protection available to me, I was thinking to change the location of the whole admin folder, that way it would be concealed.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...