Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Formatting in left column


milesfides

Recommended Posts

Hello,

 

I want to add text in the left column below the boxes, but the text ends up on top of the column.

 

I tried using <br> in the code, but still the text appears on the top, albeit with a break above.

 

truly must be a simple solution, can anybody help?

Link to comment
Share on other sites

Hello,

 

I want to add text in the left column below the boxes, but the text ends up on top of the column.

 

I tried using <br> in the code, but still the text appears on the top, albeit with a break above.

 

truly must be a simple solution, can anybody help?

 

Create a new infobox and include it in column_left.php!

Light, in the absence of eyes, illuminates nothing.

Link to comment
Share on other sites

Was considering that, but I actually want to control the font of this text separately from the other infoboxes.

You can do whatever you want with it, the font etc will be whatever style from the stylesheet you choose to set. Look at other infoboxes to get an idea of what to do.

 

Here's an example.

 

          <tr>
           <td>
<?php

$info_box_contents = array();
   $info_box_contents[] = array('text' => 'WhooHoo, It Works');
     $info_box_contents[] = array('params' => 'class="productListing-data"',
                                             'text' => '<p><font size="20">Hello World"</font><p>');
   new infoBox($info_box_contents);
?>

           </td>
         </tr>

 

In the includes/boxes folder

Light, in the absence of eyes, illuminates nothing.

Link to comment
Share on other sites

You can do whatever you want with it, the font etc will be whatever style from the stylesheet you choose to set. Look at other infoboxes to get an idea of what to do.

 

Here's an example.

 

 ? ? ? ? ?<tr>
? ? ? ? ? ?<td>
<?php

$info_box_contents = array();
? ?$info_box_contents[] = array('text' => 'WhooHoo, It Works');
? ? ?$info_box_contents[] = array('params' => 'class="productListing-data"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' => '<p><font size="20">Hello World"</font><p>');
? ?new infoBox($info_box_contents);
?>

? ? ? ? ? ?</td>
? ? ? ? ?</tr>

 

In the includes/boxes folder

 

 

that's an intriguing solution. i suppose this code overrides the stylesheet.css settings?

 

If I'm reading the code correctly, the following is the line of code that applies the font change:

 

$info_box_contents[] = array('params' => 'class="productListing-data"',

'text' => '<p><font size="20">Hello

World"</font><p>');

 

If that is correct, I need a little help interpreting "class" - is this a file that should be in the folder "class"? What is "productListing-data" - is that the title of the new box i would be creating?

Link to comment
Share on other sites

that's an intriguing solution. i suppose this code overrides the stylesheet.css settings?

 

If I'm reading the code correctly, the following is the line of code that applies the font change:

 

$info_box_contents[] = array('params' => 'class="productListing-data"',

                                            'text' => '<p><font size="20">Hello

World"</font><p>');

 

If that is correct, I need a little help interpreting "class" - is this a file that should be in the folder "class"? What is "productListing-data" - is that the title of the new box i would be creating?

class is a style you set in the stylesheet you can create a new style very easily to suit your needs. So you can set the font in the stylesheet class (look at catalog/stylesheet.css and you'll understand) the font will override the stilesheet but a new class (without the font tag) is better (as that was just an example) once you look at the stylesheet it will be clearer!

Light, in the absence of eyes, illuminates nothing.

Link to comment
Share on other sites

class is a style you set in the stylesheet you can create a new style very easily to suit your needs. So you can set the font in the stylesheet class (look at catalog/stylesheet.css and you'll understand) the font will override the stilesheet but a new class (without the font tag) is better (as that was just an example) once you look at the stylesheet it will be clearer!

 

 

Perhaps I don't have the assumptions clear. Here's what I've assumed to be correct:

 

1) we can't apply different fonts to separate boxes in the stylesheet

 

2) thus we go to includes/boxes and edit the appropriate *boxname*.php.

 

If the above assumptions are correct, let me suggest an example of a box i already have, the familiar categories.php file.

 

Here is a similar code to yours, found at the very bottom:

 

}

tep_show_category($first_element);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

 

How must I edit the code to apply a font change within the box?

Link to comment
Share on other sites

Yeah, once you get the idea, then you can really start to break out and customize things. You can create classes for just very specific things, or you can break items that are in a class in a stock osc setup, and create a new set of classes to get more control of how you want your site to look. You can even extend this line of thought to the includes files, for example on my site map, I have a column_left_blah blah.php that is specific to just that page, which leaves out the category tree (as per chemo's suggestion). You can take control of almost any aspect of the site!

 

Jeremy

Link to comment
Share on other sites

Perhaps I don't have the assumptions clear. Here's what I've assumed to be correct:

 

1) we can't apply different fonts to separate boxes in the stylesheet

 

2) thus we go to includes/boxes and edit the appropriate *boxname*.php.

 

If the above assumptions are correct, let me suggest an example of a box i already have, the familiar categories.php file.

 

Here is a similar code to yours, found at the very bottom:

 

}

  tep_show_category($first_element);

 

  $info_box_contents = array();

  $info_box_contents[] = array('text' => $categories_string);

 

  new infoBox($info_box_contents);

?>

 

How must I edit the code to apply a font change within the box?

 

'class="productListing-data"'

 

From my post above tells the 'box' what style from the stylesheet to use. You can pretty much customise anything by creating a new style in the stylesheet for your new box.

Light, in the absence of eyes, illuminates nothing.

Link to comment
Share on other sites

There is also a contribution (or 2 or 3) written to already customise each and every box either using css or images. All boxes can be the same or every one of them can be different. Save yourself a lot of headache and time of having to write the code yourself. :)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...