osCommerce 2.3 – Information Boxes

2.3 has quite an interesting new feature which should make it much easier for store owners to change the look of their shop.

The Information Boxes (that is those in the left and right column of most osCommerce sites) can now be turned on and off and swapped positions from directly in the shop admin. Previously the shop owner (or developer/designer) had to amend /includes/column_left.php and or /includes/column_right.php to achieve the same.

So, how does it work?

Enter your admin area > modules > boxes – here you will see the admin functions to change the boxes;

In a new installation of osCommerce 2.3, all the infoBoxes in the left column have a sort order starting with 1 and the right column infoboxes have a sort order starting with 5. Easy to see what goes where? The LOWER the number the more towards the top of the column. In other words a box with a sort order of 1000 would be above a box with a sort order of 1050 – hope this makes sense?

How to turn an infoBox off?

Easy. Let’s turn off the Manufacturers box. Click the Manufacturers box and press the [-Remove Module] button;

How to move an infoBox more towards the top (or bottom) of the column?

As previously explained, you will need to change the sort order! Let’s move the “whats new” box from it’s present position to a new position above the “search” box, but below the “categories” box. First thing to work out is the present sort orders of the search and categories box. Search = 1030 and Categories = 1000. Thus to get our box in between those two, we can use any number from 1001 to 1029. I’d suggest exactly halfway at 1015. Select the “Whats New” box and press the [edit] button. This will give you the small editing box;

Look for sort order, and change the value to 1015, then press [save].

Go to your site and refresh your browser. The Whats New box is now between the Categories box and the Search Box;

How to move a box from one column to the other?

Easy! Again decide where you want your box by choosing a new sort order. Let’s say I want the “Search” box to be moved from left column to right column and to go at the top of the right column. Presently at the top of the right column is the shopping cart, so we know that the search box needs a LOWER number than the “shopping cart” box (5000). Let’s say 4900. Select the “Search” box, and press [edit] button. Again this brings up the editing box;

This time, change the sort order to 4900 and ALSO select “Right Column”. then [save]. Go to your site and refresh your page, and the Search box is now placed at the top of the right hand column;

Conclusion

It’s now easier for the Store Owner to change the look of his site.

12 Replies to “osCommerce 2.3 – Information Boxes”

  1. J – as far as I can see that does not happen. That would require a code change in /includes/template_bottom.php as there is no logic to remove the containing div if there is no boxes available to it;

    < div id="columnRight" class="grid_4" >
    < ? php echo $oscTemplate->getBlocks(‘boxes_column_right’); ? >
    < /div >

    Of course once this is removed, you then need to change this;

    < div id="bodyContent" class="grid_16 push_4" >

    in /includes/template_top.php to cover the gap that is caused by the removal of the right column.

  2. J – todays Github update now changes this so that if a column has NO boxes, it automatically removes itself.

  3. The columns go away if nothing is contained in them (happy day no more editing all root files to remove the dumb right column).

  4. It would only have been a quick edit to template_bottom.php to remove the column(s) sitewide in the new osc 🙂

  5. Mike – there is a contribution that can do this, I can’t remember the name of it though.

  6. What I want to do is have an infobox which is not tied to either the left or the right column. I was rather hoping to be able to pop it into the header band and the footer band?

  7. There is a contribution for header & footer content modules, but I felt it was too restrictive in the way it assumed you wanted your header and footer area divided up in 3 areas or so.

    The dynamic template system referenced above is the one I’m using and happy with. I only need to convert more of my custom 2.2 boxes to use the 2.3.1 way to make full use of it. Now my column left is a mix of both. It works, but it is not standard and would potentially confuse other developers working on the site.

Leave a Reply

Your email address will not be published. Required fields are marked *