osCmax v2.5 User Manual
Results 1 to 5 of 5

Need help changing one box header

This is a discussion on Need help changing one box header within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Thanks for being interested in this question; Yet before you say, " change the infoBoxHeading style in the style sheet ...

      
  1. #1
    New Member
    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0


    Default Need help changing one box header

    Thanks for being interested in this question;
    Yet before you say, "change the infoBoxHeading style in the style sheet";
    I only want to change the backgrounds (and maybe text) headings of the specials box and the shopping cart (both on the right side).

    I've tried changing infoboxheading in the modules/default_specials.php; however that doesn't seem to work.
    I can change all the headings via changing the infoBoxHeading style no problem.

    I think I have looked everywhere, but obviously not.

    Thanks for any help

  2. #2
    Active Member developer_x's Avatar
    Join Date
    Nov 2004
    Location
    Digital Infoway
    Posts
    109
    Rep Power
    0


    Default RE: Need help changing one box header

    If i am not wrong, someone else wanted to do the same. I am not into CSS. So I don't remember the exact answer. Search at forums.oscommerce.com

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default RE: Need help changing one box header

    Just add a new style to the stylesheet and have the box use the new style.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8

  5. #5
    New Member
    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0


    Default

    Thanks, All the above suggestions SHOULD work, but for some reason, I just could not get it to work. So, I used the fast and crude method and got right to the source.

    I created another style in the stylesheet for what I wanted then simply changed the box template, box.tpl.php , in the following manner:

    The code :

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr >
    <td height="14" class="infoBoxHeading"><img src="images/infobox/<?php switch ($corner_left) { case 'square': echo 'corner_right_left.gif'; break; case 'rounded': echo 'corner_left.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
    <td width="100%" height="14" class="infoBoxHeading"><?php echo $boxHeading; ?></td>
    <td height="14" class="infoBoxHeading" nowrap><?php echo $boxLink; ?><img src="images/<?php switch ($corner_right) { case 'square': echo 'pixel_trans.gif'; break; case 'rounded': echo 'infobox/corner_right.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
    </tr>
    </table>



    To:

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr >
    <td height="14" class="infoBoxHeading<?php if ( $boxHeading == 'Specials') {echo 'right';} if ( $boxHeading == 'Shopping Cart') {echo 'right';}?>"><img src="images/infobox/<?php switch ($corner_left) { case 'square': echo 'corner_right_left.gif'; break; case 'rounded': echo 'corner_left.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
    <td width="100%" height="14" class="infoBoxHeading<?php if ( $boxHeading == 'Specials') {echo 'right';} if ( $boxHeading == 'Shopping Cart') {echo 'right';}?>"><?php echo $boxHeading; ?></td>
    <td height="14" class="infoBoxHeading<?php if ( $boxHeading == 'Specials') {echo 'right';} if ( $boxHeading == 'Shopping Cart') {echo 'right';}?>" nowrap><?php echo $boxLink; ?><img src="images/<?php switch ($corner_right) { case 'square': echo 'pixel_trans.gif'; break; case 'rounded': echo 'infobox/corner_right.gif'; break;} ?>" border="0" alt="" width="11" height="14"></td>
    </tr>
    </table>

    Thus directly changing the header box depending on the header title ($boxHeading).
    I will redo this in a more elegant fashion a bit later, but I am in a rush and that's the simplest, most basic way to accomplish this.

    I must say again, the other solutions, should work, but didn't work for me. Thanks again for the solutions.

Similar Threads

  1. Changing Header / navigation to match current site
    By Dialady in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 12-13-2005, 08:37 PM
  2. Changing Background Color of Header
    By knowgangs in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 07-12-2005, 11:32 AM
  3. Need help changing header
    By dave01978 in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 12-14-2004, 01:03 PM
  4. Changing header and footer completely
    By mikeyboy in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 10-09-2004, 06:14 PM
  5. Help needed changing link color in info box header
    By 13Moons in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 03-04-2004, 01:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •