Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

A quick way to modify the look of OSC


Dragonmom

Recommended Posts

When I install OSC for people, they have different requirements. Some people want only one column- some on the left, some on the right. You can do a lot with the stylesheet, of course. But for my own site for instance, I wanted a border around the column_left, and a border around the main content, and no column_right.

This entailed removing the require for the coulumn_right on every pagefile in OSC. It also meant I had to work out the extra html, figure out where it went, and add it in, in three places per file... Each time finding the spot, I might add, since I'm too cheap to purchase BBEdit...

And THEN I thought I'd like to try switching column_left to the right side.

And THEN I faced the same process with another client.

So here's what I did.

On each any /catalog/ page file, such as account_details.php, find this;

 ? <tr>
? ?<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
? ?</table></td>
<!-- body_text //-->

and copy it into a new file, called left.php

find that section on every file, and replace it with;

<?php require(DIR_WS_INCLUDES . 'left.php'); ?>

Now go to the bottom of the file and find this;

 ? ?<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
? ?</table></td>
?</tr>
</table>

and put all of that into a file called right.phpand replace, on every file, with this;

<?php require(DIR_WS_INCLUDES . 'right.php'); ?>

Put the two new files into the /catalog/includes/ directory, and define them in /includes/filenames.php (copying the format you will see there, if you have never defined a file before)

wallah!

now the task of editing the visual side of your site has been made a little easier. There are two little files to work on- BACK THEM UP before you mess with them, as the dang tables structure in OSC page files is torturous to navigate. If you mess one file up, all your pages will go screwy. On the other hand, if you get it right- you only need to do it once!

 

Also, it's a very very good idea to do a search and replace all on every page file. You want to find every instance of the <td> tag, and define it; <td class="main"> especially if you want to use contrasting backgrounds like I did...

Don't forget to do the same for the boxes /catalogs/includes/boxes/ and the modules /catalog/includes/modules/

Hope it helps somebody!

psst... wanna buy a wand?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...