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

Question about column heading color change

This is a discussion on Question about column heading color change within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hey, I did check over forum but didnt found anything usefull to make it work. So i would like to ...

      
  1. #1
    Lurker
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0


    Default Question about column heading color change

    Hey,
    I did check over forum but didnt found anything usefull to make it work.

    So i would like to make that left and right column would have different
    background heading colors.

    I checked left_column and right_column and box.tpl but i dont have much clue how to make it work althought i have some experience in php...

    Please help me with it, thank you

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Question about column heading color change

    Know HTML and CSS? Use CSS and left/right column to specify colours you want.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Lurker
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0


    Default Re: Question about column heading color change

    That would be amazing but its not that simple... that code is to much coded if you ask me... i tried lot of things but dont know how ....

    column_left.php
    PHP Code:
    <?php
    /*
    $Id: column_left.php 3 2006-05-27 04:59:07Z user $

      osCMax Power E-Commerce
      http://oscdox.com

      Copyright 2006 osCMax

      Released under the GNU General Public License
    */

    // BOF: MOD - INFO BOXES - now pulled dynamically as per setting in admin 
    /*
      if ((USE_CACHE == 'true') && empty($SID)) {
        echo tep_cache_categories_box();
      } else {
        include(DIR_WS_BOXES . 'categories.php');
      }

      if ((USE_CACHE == 'true') && empty($SID)) {
        echo tep_cache_manufacturers_box();
      } else {
        include(DIR_WS_BOXES . 'manufacturers.php');
      }

      require(DIR_WS_BOXES . 'whats_new.php');
      require(DIR_WS_BOXES . 'search.php');
      require(DIR_WS_BOXES . 'information.php');
    */
      
    $column_query tep_db_query('select configuration_column as cfgcol, configuration_title as cfgtitle, configuration_value as cfgvalue, configuration_key as cfgkey, box_heading from ' TABLE_THEME_CONFIGURATION ' order by location');
      while (
    $column tep_db_fetch_array($column_query)) {

        
    $column['cfgtitle'] = str_replace(' ''_'$column['cfgtitle']);
        
    $column['cfgtitle'] = str_replace("'"''$column['cfgtitle']);

        if ( (
    $column[cfgvalue] == 'yes') && ($column[cfgcol] == 'left')) {
          
    define($column['cfgkey'],$column['box_heading']);

          if ( 
    file_exists(DIR_WS_BOXES $column['cfgtitle'] . '.php') ) {
            require(
    DIR_WS_BOXES $column['cfgtitle'] . '.php');
          } 
        }
      }
    // EOF: MOD - INFO BOXES - now pulled dynamically as per setting in admin 
    ?>
    what this helps me ?

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Question about column heading color change

    Edit your HTML template not the raw php code file. 95%+ of all your HTML coding is in your HTML template directory.

    IE: main_page.tpl.php

    look for:
    HTML Code:
    <!-- body //-->
    <table border="0" width="100%" cellspacing="3" cellpadding="3">
      <tr>
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <?php
    // Hide Left Column if not to show
    if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {
    ?>
    <!-- left_navigation //-->
    <?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
    <!-- left_navigation_eof //-->
    <?php
    }
    ?>
        </table></td>
    <!-- content //-->
        <td width="100%" valign="top"><?php
         require (bts_select ('content')); // BTSv1.5
      ?></td>
    <!-- content_eof //-->
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <?php
    // Hide column_left.php if not to show
    if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF =='false') {
    ?>								
    <!-- right_navigation //-->
      <?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
    <!-- right_navigation_eof //-->
    <?php
    }
    ?>  		 
        </table></td>
      </tr>
    </table>
    <!-- body_eof //-->
    For Left modify:

    HTML Code:
     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <?php
    // Hide Left Column if not to show
    if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {
    ?>
    <!-- left_navigation //-->
    <?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
    <!-- left_navigation_eof //-->
    <?php
    }
    ?>
        </table></td>
    Right:
    HTML Code:
     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <?php
    // Hide column_left.php if not to show
    if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF =='false') {
    ?>								
    <!-- right_navigation //-->
      <?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
    <!-- right_navigation_eof //-->
    <?php
    }
    ?>  		 
        </table></td>
    Add a CSS style to the TABLE or TD or add a DIV and then define it in your stylesheet.css file (which is also in your template directory).
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Lurker
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0


    Default Re: Question about column heading color change

    Thanks for your co-operation,
    so i tried to make that

    HTML Code:
    <td width="<?php echo BOX_WIDTH; ?>" valign="top" style="background-color:#555;" ><table border="0" width="130px" cellspacing="0" cellpadding="2">
    <?php
    // Hide Left Column if not to show
    if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {
    ?>
    <!-- left_navigation //-->
    <?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
    <!-- left_navigation_eof //-->
    <?php
    }
    ?>
        </table></td>
    i know i made background 444444

    but i want to change heading of heading boxes on left side and right side to be different i hope now you understand me.
    Attached Images Attached Images

  6. #6
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Question about column heading color change

    Grom,

    In order to change the heading box colour you will need to change the infoBoxHeading class within your style sheet.

    This will change the colour for all of your box headers.

    In order to change the specific box heading colour you will need to create "boxes" for them.

    eg. Go to catalog/templates/<your template>/boxes

    where you will find a file called box.tpl - this controls the html for all of the boxes. In order to create bespoke ones you will need to copy this file and rename it to match the box name - BTS should do the rest ... (eg. Categories.tpl would be the menu on the left)

    If you then open the new file - look for

    Code:
    <td width="100%" height="14" class="infoBoxHeading"><?php echo $boxHeading; ?></td>
    Change to (or similar)

    Code:
    <td width="100%" height="14" class="SpecialsinfoBoxHeading"><?php echo $boxHeading; ?></td>
    Then simply go to your stylesheet and add the class for SpecialsinfoBoxHeading

    I have not done this before but I think it should work,

    Good luck with it,

    Regards,
    pgmarshall
    _______________________________

  7. #7
    Lurker
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0


    Default Re: Question about column heading color change

    Allright i changed all necessary in stylesheet and classes i added boxleft.tpl in the folder where box.tpl is...
    and now lets say i want to change this box heading
    whats_new.tpl
    HTML Code:
    <?php
    /*
    $Id: whats_new.php 3 2006-05-27 04:59:07Z user $
    
      osCMax Power E-Commerce
      http://oscdox.com
    
      Copyright 2006 osCMax
    
      Released under the GNU General Public License
    */
    
    // Most of this file is changed or moved to BTS - Basic Template System - format.
    
    
      if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
    ?>
    <!-- whats_new //-->
    <?php
        $boxHeading = BOX_HEADING_WHATS_NEW;
        $corner_left = 'square';
        $corner_right = 'square';
        $boxContent_attributes = ' align="center"';
        $boxLink = '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
        $box_base_name = 'whats_new'; // for easy unique box template setup (added BTSv1.2)
        $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)
    
        $random_product['products_name'] = tep_get_products_name($random_product['products_id']);
        $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
    // BOF Separate Pricing Per Customer
    // global variable (session) $sppc_customer_group_id -> local variable customer_group_id
    
      if(!tep_session_is_registered('sppc_customer_group_id')) { 
      $customer_group_id = '0';
      } else {
       $customer_group_id = $sppc_customer_group_id;
      }
        
           if ($customer_group_id !='0') {
        $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $random_product['products_id'] . "' and customers_group_id =  '" . $customer_group_id . "'");
          if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
            $random_product['products_price'] = $customer_group_price['customers_group_price'];
          }
         }
    // EOF Separate Pricing Per Customer
        if (tep_not_null($random_product['specials_new_products_price'])) {
          $whats_new_price = '<span style="text-decoration:line-through">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span><br>';
          $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
        } else {
          $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
        }
    
        $boxContent = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a> | ' . $whats_new_price;
    
    
    
    
    
    include (bts_select('boxes', $box_base_name)); // BTS 1.5
        $boxLink = '';
        $boxContent_attributes = '';
    ?>
    <!-- whats_new_eof //-->
    <?php
      }
    ?>
    what do i have to change... i tried to change this
    $box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2)
    but no effect at all...

Similar Threads

  1. Another background color question
    By ripebanana in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 05-20-2009, 08:46 AM
  2. color change?
    By metalman923 in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 03-11-2008, 04:20 PM
  3. change color
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 5
    Last Post: 09-29-2003, 04:54 PM
  4. Where to change the heading text in product_listing.php???
    By johnnyosc in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 02-18-2003, 09:32 PM
  5. OsCommerce Modification: How to Change Opening heading?
    By someone in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 11-25-2002, 07:16 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
  •