Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Colum_right creating an empty box


gamemaniak1

Recommended Posts

hello guys, i tried to use the search option but it didn't manage to find anything.I read oscommerce manual but i really can't get how to add a new box.I understood that i must create a new include, like ad.php then call it from colum_right...Ok that's clear for me.But what code should i put in ad.php so i can creat a stupid empty box, and put inside whatever i want, like Calender, or weather, or AD.....

 

Please excuse my English....

Any help will be appreciate

Link to comment
Share on other sites

Hello.

 

I'm no oscommerse wizz kid but here's how I'd do it.

 

In your columns_right box put the following line somewhere amongst the other ones:

 

require(DIR_WS_BOXES . 'hello.php');

 

Then create a new file called 'hello.php' and place it in the includes/boxes folder.

 

The minimum code to create a new box would be :

 

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new CategoriesBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

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

 

new InformationBox($info_box_contents);

?>

</td>

</tr>

 

This will create a box in your right column headed 'Greeting!' and the text 'hello' in it. To get whatever you want in the box just replace the 'hello' bit in the code with your html. If you dont want a heading get rid of the first 3 lines after the <?php.

 

Hope that helps.

 

Ben.

Link to comment
Share on other sites

Oops sry I'm not that great! I have put my modified code in .. not the original. I have heavily modified my code... below is the original, unmodified version :

 

<tr>

<td>

<?php

$info_box_contents = array();

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

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

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

 

new infoBox($info_box_contents);

?>

</td>

</tr>

 

Really sorry. The above should work. Its from directly from the original fresh install files.

 

Ben.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...