View Full Version : Can I install sts on oscmax?

10-22-2011, 09:48 AM

After seeing this post http://www.oscmax.com/forums/new-oscommerce-contributions/24925-simple-template-system-sts.html
I tried to install sts on osc max. Is this possible?

It is impossible to perform the manual edits to install this mod on oscmax. So I am guessing not.
If this is the case, then more information that the word "more" is required in that post.

I really do hope it is avaiable.

If not, is there any way to install a standard template in oscmax? I did a lot of work on the osc default template
and simply want to use this in my store, but because there is already some template system installed it seems,
I cannot.

Is there anyway to remove what is there or install sts?

10-22-2011, 02:45 PM
osCmax already uses a 'competing' template system called BTS (which has been enhanced in osCmax), so to answer your question: NO.

10-23-2011, 12:25 AM
BTS and STS do two completely different things.

Short Version: BTS for programmers, STS for designers.

Long Version:
BTS doesn't really change the OSC code, but it moves all the display code into separate files from the "logic" code to make it easier for a programmer to modify HOW OSC displays things. BTS is great if you want to modify OSC functionality yourself, but it can also make it difficult to add on contributions afterwards because the code you would normally just compare when adding the contribution's changes has now been split into two different files, the "logic" files and the "display" files.

STS makes a some small changes to the application_top.php, application_bottom.php and column_left.php and column_right.php scripts to capture their output, which then allows STS to map that output into $variables that you can place on your HTML template page.
You can't change WHAT OSC displays with STS, but you can control WHERE it displays it, and put a simple "wrapper" around your $content area to make it look the way you want to.

Bottom line: They're both great packages, but have different uses.

However, I think at some point you could run STS templates in osCmax along side BTS.

In includes/configure_bts.php you will find:

if (is_file(DIR_WS_INCLUDES . 'configure_sts.php')) include(DIR_WS_INCLUDES . 'configure_sts.php');

However, this is before my time and I can not find any reference to the configure_sts.php file on the SVN.

Perhaps Michael may be able to remember.

Furthermore, if you have the design of your store done - css coded, etc. Then creating a new template for osCmax is really very simple. (much easier than osCommerce). All you really need is to edit the stylesheet.css and main_page.tpl.php in your new template folder - BTS does the rest for you!


10-23-2011, 11:23 AM
Thanks for the replies. I am getting my head around editing templates, and having a really hard time.

I've managed to build the basic template and copy over the styles by editing box.tpl.php

Here is the file....

$Id: box.tpl.php 1449 2011-05-30 12:09:47Z cottonbarn $

osCmax e-Commerce

Copyright 2000 - 2011 osCmax

Released under the GNU General Public License

if (!defined ('DIR_FS_CATALOG')) die ("Access denied.");
/* infobox template */

<div class="ui-widget infoBoxContainer">
<div class="ui-widget-header infoBoxHeading"> <?php echo $boxHeading; ?></div>
<div class="ui-widget-content infoBoxContents"><?php if (isset($boxLink)) echo $boxLink; ?></div></div>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?>
<div class="ui-widget-content infoBoxContents"><?php if (isset($boxContent_attributes)) echo $boxContent_attributes; ?>><?php echo $boxContent; ?></div>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?>

The problem is that now although the content boxes appear as they should, I have random > and align="center"> appearing all over the sidebars.

I see that this is because the table I have removed is part build in the content file that is pulled. I'd like to remove all tables form the site in preference for div tags to better optimise and hopefully get better search engine rankings.

However, I am having a hard time finding exactly which files needs editing (for example, which file is the log in box which is appearing in the right sidebar?)
And also how exactly to completely remove the tables, as it seems that sometimes they are built into the php code.

Can anyone help / show me where to go.

10-25-2011, 04:20 PM
To fix this issue I had to remove <?php if (isset($boxContent_attributes)) echo $boxContent_attributes; ?> from box.tpl.php

Not sure if this has broken anything yet, but all looks good so far. I don't have tables in my sidebar anymore!

That's a good thing for SEO optimisation, so maybe someone one day will find this documented issue useful.... but as I said, I am not
sure I have not broken anything by doing this yet.

10-26-2011, 04:39 AM
I am trying hard to install sts but failed.What is the problem I dont know. Anybody also help me.

Read post #2