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

BG color only in categorie box

This is a discussion on BG color only in categorie box within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, Does any one out there now how to change background color ONLY in the categorie box. Iknow how to ...

      
  1. #1
    New Member
    Join Date
    Nov 2004
    Posts
    13
    Rep Power
    0


    Default BG color only in categorie box

    Hi,

    Does any one out there now how to change background color ONLY in the categorie box.

    Iknow how to do it in styles but when i change there it changes all the boxes.

    warm regards kjelle

  2. #2
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default RE: BG color only in categorie box

    all boxes use the same class, so just create a new one and use that in the catergory box

  3. #3
    New Member
    Join Date
    Nov 2004
    Posts
    13
    Rep Power
    0


    Default BG color only in categorie box

    Thx Arpit for your answer,

    sounds so easy but where do i change the class for the categorie box.

    i tried to change this tag in the categories.php in boxes folder.

    new infoBoxHeading($info_box_contents, true, false);

    i changed the infoBoxHeading to a new one i had made in the styles but did not work.

    If you can help me with this you are a star, i have tried for days but no luck.

    warm regards kjell

  4. #4
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default

    ok hope your ready for this,

    files that need to editing but before we begin, plz backup your files:

    catalog/stylesheet.css
    catalog/includes/boxes/categories.php
    catalog/includes/classes/boxes.php
    in catalog/stylesheet.css
    add your new class

    Code:
    .kjell{
    background: #668FBB;
      font-family: Verdana, Arial, sans-serif;
      font-size: 20px;
    
    }
    in catalog/includes/boxes/categories.php
    change
    Code:
    new infoBox($info_box_contents);
    to
    Code:
    new infoBoxCat($info_box_contents);
    in catalog/includes/classes/boxes.php
    add
    Code:
    class infoBoxCat extends tableBox 
      {
        	function infoBoxCat($contents) 
    		{
    	      $info_box_contents = array();
        	  $info_box_contents[] = array('text' => $this->infoBoxContentsCat($contents));
    	      $this->table_cellpadding = '1';
        	  $this->table_parameters = 'class="infoBox"';
    	      $this->tableBox($info_box_contents, true);
        	}
    
    		function infoBoxContentsCat($contents) 
    		{
        	  $this->table_cellpadding = '3';
    	      $this->table_parameters = 'class="kjell"';
        	  $info_box_contents = array();
    	      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
        	  for ($i=0, $n=sizeof($contents); $i<$n; $i++) 
    		  {
    	        $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                               'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                               'params' => 'class="boxText"',
                                               'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
        	  }
    	      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
        	  return $this->tableBox($info_box_contents);
       	 	}
      }
    hope you have made backups and now upload the files, you show be all set [/code]

  5. #5
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default

    and remember, these changes to the core code will inhibit you from going to new releases in the future

  6. #6
    New Member
    Join Date
    Nov 2004
    Posts
    13
    Rep Power
    0


    Default BG color only in categorie box

    Hello Arpit,

    You are fantastic Thanks,

    i will send the link of the page soon so you can see how u helped me.

    i just have to do .htaccess on the admin page.


    Thanks again

    Lots of warm regards from Kimberley & Kjell

  7. #7
    New Member
    Join Date
    Nov 2004
    Posts
    13
    Rep Power
    0


    Default

    Hello Arpit,

    I am sorry but i wonder if you can help me again, i think i am going crazy i cant understand the styles.

    here you can see the site is not ready but soon.. http://www.surfthemambo.com/surf-shop/

    i just wonder where i can find the borders on the specials and new products boxes on the front page.
    i actully want to remove the border and the heading on this boxes.

    but i can't find it anywhere, i have looked at every table and css style but nothing.

    warm regards kjell

    Ps. maybe somebody else know about this also

  8. #8
    Active Member
    Join Date
    May 2003
    Posts
    148
    Rep Power
    0


    Default

    comment out the line,
    new infoBoxHeading($info_box_contents, true, false);
    for the boxes you want to remove the heading, and for the border, its in the classes/boxes.php
    function infoBoxCat($contents)
    {
    $info_box_contents = array();
    $info_box_contents[] = array('text' => $this->infoBoxContentsCat($contents));
    $this->table_cellpadding = '1';
    $this->table_parameters = 'class="infoBox"';
    $this->tableBox($info_box_contents, true);
    }
    where it says class="infoBox", you want to change that class to have no borders

  9. #9
    New Member
    Join Date
    Nov 2004
    Posts
    13
    Rep Power
    0


    Default BG color only in categorie box

    Arpit,

    What can i say.

    Thousends of thanks, you hav great day

    warm regards Kimberley

Similar Threads

  1. Please Help Change Color of Box
    By joanstead in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 12-01-2005, 07:22 AM
  2. Link color
    By cewncew in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 01-12-2005, 12:57 PM
  3. Different bgcolor in categorie box
    By kjelle11 in forum osCMax v1.7 General Mods Discussion
    Replies: 0
    Last Post: 01-11-2005, 01:55 AM
  4. how do i change Bgcolor only in categorie box
    By kjelle11 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-10-2005, 02:41 AM
  5. Categorie Question how to show...
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 10-14-2002, 03:13 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
  •