Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Info Box formatting


Guest

Recommended Posts

Posted

I have searched the forum & the Knowledge Base too. I found this link http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/44 & it works. The only thing is that when I try to add an image for the background the image is only big as that Header box. I want the header box to expand to the size of the image.

 

I am wanting to make the info box headers bigger so that I can use a background image while using that same method as the link above.

 

Regards,

Jason

Posted

It does not work backwards. You will need to make your left or right side boxes the width of the image you would like to use........... Say you have an image 165 px wide you will need to set your boxesssssssss

 

You will need to set you boxes on that side of the store at 165.

 

INSTRUCTIONS

 

1. Open catalog/includes/application_top.php

2. Find the line (around line 47) that reads

 

// customization for the design layout

define('BOX_WIDTH', 145); // how wide the boxes should be in pixels (default: 125)

 

3. after this, add the following lines ....

 

// customization for the design layout left column

define('BOX_WIDTH_LEFT', 165); // how wide the boxes should be in pixels (default: 125)

 

// customization for the design layout right column

define('BOX_WIDTH_RIGHT', 125); // how wide the boxes should be in pixels (default: 125)

 

 

6. (set your own width preferences (I have used 165 pixels for the left column and 125 pixels for the right) Save file

 

7. Now open the second file to edit: catalog/default.php

8. Find the first line to change at (around line 51) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

9. REPLACE this line, with the following line ....

 

<td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">

 

10. Find the second line to change at (around line 325) that reads

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

11.REPLACE this line with the following line....

 

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">

 

5. save the file and upload your 2 changed files to your active installation.

Posted

You say:

 

7. Now open the second file to edit: catalog/default.php

 

That file doesn't exist. I checked against a fresh download & it isn't there.

Posted

I also need to be able to edit the height of the table cell.

Posted

It wont let me edit the post above. I edited the height on this line...is it OK? That is the part of the link I gave in my first post.

 

class infoBoxHeadingCategories extends tableBox {
function infoBoxHeadingCategories($contents) {
  $this->table_cellpadding = '0';

  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => 'width="100%" class="infoBoxHeadingCategories" height="26"',
									 'text' => $contents[0]['text']));

  $this->tableBox($info_box_contents, true);
}
 }

Posted

Sorry I miss understood, the code is in includes/classes/boxes.php around line 120

 

 

$info_box_contents = array();

$info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"',

'text' => $left_corner),

array('params' => 'width="100%" height="20" class="infoBoxHeading"',

'text' => $contents[0]['text']),

array('params' => 'height="20" class="infoBoxHeading" nowrap',

'text' => $right_corner));

Archived

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

×
×
  • Create New...