Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I got this for an error... does anyone know what I may have done wrong?

 

// STS: ADD: Define Simple Template System files define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php'); define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php'); define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php'); // STS: EOADD1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

It sounds like you added the settings AFTER the

?>

tag in your /includes/configure.php script.

 

The last line in the file should be

?>

 

This code means "this is the end of the PHP programming code".

 

- Brian

Edited by DiamondSea

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Hello,

 

I installed STS on my ecommerce shop and modified the template.html... and then I put a header table with a graphics logo and button, and at the bottom too... it's looks perfect

 

But it makes the shop load pretty slow because every time you load the page, it load all the graphics all over again and again

 

Is there any way so that it won't load all the header and footer graphics everytime you load the page, like a page cache or something...

 

Thanks a lot.

Your browser should be caching the images - the server shouldn't have to do any of it.

 

If you are hitting the "reload" button to test your page layout, that command instructs the browser to reload ALL page elements, including images, which could affect the speed the images come down with.

 

Also, you should have HEIGHT and WIDTH values set for all images in your template, as the browser will use these to layout the page before the page is completely downloaded.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

How do I change all my pages to look like the template I am using for the home page? Do I have to do it mannually or is there a better way of doing it?

If you don't have a specific template defined for a page, it will use the DEFAULT_TEMPLATE to render the page, normally the sts_template.html file.

 

In a typical installation, the sts_template.html file is the only one you need to modify and it will affect all pages.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Before installing STS everything worked fine but after STS I get this in index.php:

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

how come?

Is your /includes/configure.php file set up with the correct settings for your database?

 

When you installed STS, you should have copied some lines at the bottom of the configure-SAMPLE.php file into your working configure.php that define the STS settings.

 

It sounds like you might have copies the SAMPLE file on top of your working configure.php file and clobbered your database settings.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I'll bring this up just one more time since it has been brought up quite a bit.  Has anyone gotten coolmenu or anything else similar to work?

 

-Dave

I have been slammed at work and just moved into a new house, so I've been rather absent lately. I'm hoping to be able to provide a bit more on-board support here soon. Coolmenu support will be one of the next things I work on when I get some free time, but I haven't been able to work on it yet.

 

Please post your questions on here. If I have time to answer them, I will do so online for the benefit of everybody. Please don't email me questions directly as if I don't have time to answer it online and help everybody at once, I don't have time to answer it offline and privately.

 

Thanks! :)

 

- Brian

Edited by DiamondSea

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

OK, so I managed to get STS working and modify the home page of my site. 

 

But what I really want to know is, can STS be used to modify the other pages contained within OSC 2.2, such as login.php.  If this is possible, I would like to know the procedure.

 

Cheers

STS does not allow you to modify the CONTENT of a page, only the LAYOUT of the page design.

 

If you are interested in modifying the CONTENT of the pages, you might want to look at the Basic Template System (BTS) (not written by me, and it has it's own support area) that moves all content areas of the page into separate files to make them easier to modify.

 

Though I haven't tried it yet, BTS and STS should be able to be used together.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Hiya there,, did you make sure that teh file sts_display_output.php was included in the zip?

 

Are you using 1.3 or 1.8? the reason i ask is becuse, just tlike the previous answer i had on the board, there was no file of this name in the 1.3 zip that i downloaded.

You should always download the latest version of STS when installing. When changes are made to the distribution it will be uploaded with a new (higher) number. That prevent things like having things like v1.3, v1.3corrected, v1.3withmissingfile, v1.3a, v1.3b, etc.

 

At the moment, the current version is STS v1.8, but if you go and find a 1.9 version, you should use that one, because it means that I fixed or added something to the package.

 

You can see the changes made with each version in the CHANGELOG.txt file in the package.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I have installed this contribition and it looks like it is working fine. However I don't seem to be able to change the font size in any of the boxes (i.e. category box etc.) I have tried changing the stylesheet but it doesn't make any difference.

 

Can anyone help?

It is at the very first few lines in stylesheet.css. I think it is:

 

Boxtext,.... size:10px

 

Btw, what version of STS are you using? Did you install from a fresh oscommerce? I always have errors when trying to install STS. Might be because I had added on some contributions b4? Pls help.

As I said in my original post I have tried changing various parts of stylesheet.css but none of the changes seem to make any difference.

 

I have stylesheet.css in the Catalog folder is this correct?

Link to comment
Share on other sites

Again....

 

Could you tell me what I'm overlooking? Everything looks great with the STS installed EXCEPT, nothing shows up for the $content tag. What am I missing here?

Link to comment
Share on other sites

I have installed this contribition and it looks like it is working fine. However I don't seem to be able to change the font size in any of the boxes (i.e. category box etc.) I have tried changing the stylesheet but it doesn't make any difference.

 

Can anyone help?

It is at the very first few lines in stylesheet.css. I think it is:

 

Boxtext,.... size:10px

 

Btw, what version of STS are you using? Did you install from a fresh oscommerce? I always have errors when trying to install STS. Might be because I had added on some contributions b4? Pls help.

As I said in my original post I have tried changing various parts of stylesheet.css but none of the changes seem to make any difference.

 

I have stylesheet.css in the Catalog folder is this correct?

Make sure that you are editing the stylesheet that is defined in your sts_template.html (or whatever file you're using) file. Look at the source to your pages (that are created by STS) and see which stylesheet it is referencing.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Make sure that you are editing the stylesheet that is defined in your sts_template.html (or whatever file you're using) file. Look at the source to your pages (that are created by STS) and see which stylesheet it is referencing.

 

- Brian

Haha, thank you, working now!!

 

Another thing I would like to change is instead of the text titles in the boxes, I would like an image - I have found out how to do this by adding the image link into languages/english.php but the first box I have done it to is the 'What's New' box but this has a little arrow next to the title, which when used with and image looks a bit daft. How can I remove this arrow and make the image clickable to the products/new.php page instead?

Link to comment
Share on other sites

Hi i i got a problem on the sts i can.t get the click to enlarge pucture to work i have read the instructions but not sure how to do it would anyone be willing to help me as i got my site nearly done but this slight problem is slowing me down i know you got to add a code to the javascript i tihnk but not sure hehehe

 

 

thxs

Link to comment
Share on other sites

Just a quickie. I'm sure it's already been asked, but I can't find it...

We don't have to keep in the "Copyright © 2003 Simple Template System by DiamondSea.com" notice do we?

Link to comment
Share on other sites

after uploading all the sts files and making the necessary change in the configure.php file I'm getting following error:

 

Warning: main(includes/filenames.php): failed to open stream: No such file or directory in /home/soaps/public_html/teststore/includes/application_top.php on line 53

 

Fatal error: main(): Failed opening required 'includes/filenames.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/soaps/public_html/teststore/includes/application_top.php on line 53

 

Can somebody help me in figuring out what I did wrong?

 

thanks so much

Link to comment
Share on other sites

Just a quickie. I'm sure it's already been asked, but I can't find it...

We don't have to keep in the "Copyright ? 2003 Simple Template System by DiamondSea.com" notice do we?

You don't have to keep it.

 

However, if you can link to http://www.DiamondSea.com somewhere on your site, I'd greatly appreciate it as it will help improve my Google rankings.

 

Thanks!

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

thxs for the support i got a slight problem with the click to enlarge picture and no one seems to know what the problem is or can.t be arsed replying

 

i am a bit new to this so i thought you would tell me where i am going wrong i have read the instructions but can.t seem to do it or if it goes in head etc etc

 

never mind

Edited by admin@choice
Link to comment
Share on other sites

Hi,

I just installed sts and it works great, just one thing, i have this code from my old header.php and i want to use this in the sts template, how do i get this to work?? where do i put all this code, im just not sure cause the template file is a html file.

here is the code

 

<script language=JavaScript>
</SCRIPT>	
<script language=JavaScript src="dropdown/menu_array.js" type=text/javascript></SCRIPT>
<script language=JavaScript src="dropdown/mmenu.js" type=text/javascript></SCRIPT>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
?<tr class="header">
? ?<td rowspan="2" valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'righthere.jpg', 'RightHere I.T.'); ?></td>
? ?<td height="45"></td>
? ?<td></td>
? ?<tr><td class=Cart align="center" valign="middle" width="200">
<?php
if (($cart->count_contents() == "0")) {
echo "Your Cart is Empty!!";
?><img src="images/cart.gif">
<?php
}else{
?>
<?php echo $cart->count_contents(), ' Item(s) '; ?><?php echo $currencies->format($cart->show_total()); ?><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerTop"><img border="0" src="images/cart.gif"></a></td>
<?php
}
?>
</td><td width="200" bgcolor="#006699"></td></tr>
? ?</tr>
</table>

The only real problem is the fact i ahve php code in there, which needs to be used. So if someone call tell me what to do that would be great.

 

Thanks

 

Kristofor

Edited by Kristofor

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Link to comment
Share on other sites

Just a quickie. I'm sure it's already been asked, but I can't find it...

We don't have to keep in the "Copyright ? 2003 Simple Template System by DiamondSea.com" notice do we?

You don't have to keep it.

 

However, if you can link to http://www.DiamondSea.com somewhere on your site, I'd greatly appreciate it as it will help improve my Google rankings.

 

Thanks!

 

- Brian

thanks. I'm building the site for a client, but I will be building a links section in my design company site at some point, so people can see the technologies we use. I'll put you in there.

I'm hugely impressed with it so far, by the way. I just wish STS was there when I built my last OsC site!

Link to comment
Share on other sites

yeh, it is heaps easier. only thing is i can not figure out how to get php code used in the html file, hehehe

 

Oh well

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Link to comment
Share on other sites

Is there a filenames.php in your includes directory?  What version of osCommerce are you using?

 

Hth,

Matt

Would someone be able to point me in the right direction? Please? I've searched for info for this and the filenames.php was not included in the download I got.

 

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...