Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I am about to start playing around with my shop layout and trying to decide whether to go for sts bts or css. i'm worried about installing something i can't use, breaking bits of code and not being able to undo and return to the stock layout.

 

firstly is the installation of sts an easy step by step follow the instructions procedure? my knowledge of php is limited to having to write clare/'s, and deleting whitespace.

 

secondly people talk about sts being easier and just a sort of put the $shopelement on an html page where you want to see them. So does that mean i start off with a blank page and write the full layout in pure html then? I'm just not entirely sure I know enough html to do that. i get on quite well with the dreamweaver approach to drag and drop a rounded box where you want it. could i create a page in dreamweaver, copy and paste the code and add the $thingies where i want them? or am i being silly and it's not that hard when you get into it?

 

if it all breaks and i can't get anything to appear how easy is it to start all over again?

 

any help or advice on where to start would really be appreciated.

Link to comment
Share on other sites

I don't know about BTS but I use STS on my site and yes it's pure html and you add the $whatever in the spots you want. The setup is very easy and worked like a charm. The nice thing about going back to the stock osc if you don't like sts all you do is remove the lines of code you added and delete the html and your done. You can also turn it off in a file(edit) and your back to the stock script look. It comes with a very basic tabled template also so that can get you started.

 

If you can make a page in dreamweaver then you can use sts just fine.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

cheers trendyfashion it's nice to have a vote of confidence.

 

so i really can just do a nice looking dreamweaver page with an 'insert $thingy' here bit of text in my nice boxes or tables, then copy the code and just bung in my $thingies?

 

that actually sounds like something i might even be able to do. i like the fact that i can turn it off easily if i end up messing it up and ending up with a page of errors. or a comedy of errors.

 

fingers crossed.

Link to comment
Share on other sites

I installed sts as per the instructions and then tried to view my page. this is what i got instead

 

Template file doesn't exist: [includes/sts_template.html]

Warning: fopen(STS_DEFAULT_TEMPLATE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 82

Can't open Template file: [sTS_DEFAULT_TEMPLATE]

Warning: filesize(): Stat failed for STS_DEFAULT_TEMPLATE (errno=2 - No such file or directory) in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fread(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fclose(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 87

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

anyone know what i should do? the files are there, is it just a matter of changing permissions or what?

Link to comment
Share on other sites

all figured out now. basically there was only a template.html not default_template as well and one of the other files wasn't defined in configure. so i renamed template to default_template, then 10 mins later remembered to call it default_template.html (i have forgotton the suffix on so many occasions)

 

seems to be a continous theme though this file doesn't exist problem.

 

for anyone else having this problem firstly check in the configure.php if the files are defined, copy and paste other lines. then make sure the files are in your includes folder.

Link to comment
Share on other sites

yeah that's the thing that foxed me, the file to upload is the sts_template, but I think it also wanted an sts_default_template too.

 

but i managed to tweak and actually work though every file does not exist post on this thread and figure out how to solve it. quite a learning curve really.

 

now the fun starts when i can really tart my shop up.

Link to comment
Share on other sites

OK so to start me off I have got a random sample template from the site you recommeded trendy fashion. Cheers for that

 

Now I want along the top a nice catagory menu as well as the catagory and subcatagories on the left. So I'll put $catagory box on the left somewhere and that'll just bring it all up fine and dandy.

 

And for the top I'll change the gifs or jpegs to say all the catagories. But where do i put the $urlcat_x_y_z using the cpath variable (is that the full url or just the cPath=189&osCsid=ab019a273bf91539f4665e7776c52cf8)

 

<p><img width=740 height=23 id="_x0000_i1037"

src="..\..\..\..\..\..\My%20Downloads\Clare\water\top1.gif"></p>

 

does it go before the <img or after gif">?

Link to comment
Share on other sites

Glad your getting somewhere now. I still don't know what you are saying about the default template cause that is the sts_template.html.

 

If you are going to use the $category command on left then there would be no need for to use the $url_cat unless you want to place access to the same thing twice.

 

If you want to use the $url_cat with a top navigation images then the $url_cat would be the hyperlink in the image....Here is an example from my store.

 

This is for my category "Mens" in my clothing store.

 

<A href="$urlcat_Mens"><IMG

src="images/button1.jpg"></A>

 

So when that button is clicked it will open up the subcategories where I have the $content call. If you have no sub cats then it will open the product listings and display them where the $content call is. Of course that code is the basic without and alt, height and width ect..I just cut it to the basics so its easy to see.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

ah i see. if i do have subcats then i presume $content will bring up the subcats then.

 

ok so using a tempate i'll put all the $shopelement bits in place. now i know that sts doesnt change the info boxes (thats manufacturer, what's new.. right?). so what is the contribution that works well with sts that can do that? i quite fancy something like http://www.shortestories.com/ that is in mystore at the mo.

 

oh and looking at the simple easy to use layout of that site i think i fancy having main catagories on the top. and then on the side a list of the subcatagories. does $catmenu: A drop-down list of available categories (defined in sts_user_code.php) bring up the subcatagories for whatever catagory i'm in then? and by defined in sts_user_code.php is that something i have to do or will it do it? like in http://www.drnatura.com/ the bullets would be a simple way of displaying my subcats.

 

or am i getting carried away?

Link to comment
Share on other sites

I installed sts as per the instructions and then tried to view my page. this is what i got instead

 

Template file doesn't exist: [includes/sts_template.html]

Warning: fopen(STS_DEFAULT_TEMPLATE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 82

Can't open Template file: [sTS_DEFAULT_TEMPLATE]

Warning: filesize(): Stat failed for STS_DEFAULT_TEMPLATE (errno=2 - No such file or directory) in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fread(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fclose(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 87

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

anyone know what i should do? the files are there, is it just a matter of changing permissions or what?

It looks like you didn't copy the defines from the bottom of your configure-SAMPLE.php file into your production configure.php file.

 

The give-away is that it is showing STS_DEFAULT_TEMPLATE in the error message and not the value it should have, sts_template.html .

 

- 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 installed sts as per the instructions and then tried to view my page. this is what i got instead

 

Template file doesn't exist: [includes/sts_template.html]

Warning: fopen(STS_DEFAULT_TEMPLATE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 82

Can't open Template file: [sTS_DEFAULT_TEMPLATE]

Warning: filesize(): Stat failed for STS_DEFAULT_TEMPLATE (errno=2 - No such file or directory) in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fread(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 86

 

Warning: fclose(): supplied argument is not a valid stream resource in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 87

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/fazer6/public_html/toys/includes/sts_display_output.php on line 93

 

anyone know what i should do? the files are there, is it just a matter of changing permissions or what?

It looks like you didn't copy the defines from the bottom of your configure-SAMPLE.php file into your production configure.php file.

 

The give-away is that it is showing STS_DEFAULT_TEMPLATE in the error message and not the value it should have, sts_template.html .

 

- 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

Yeah man, think you are all excited now and thinking to far ahead. From the conversations we have had I would say just get it to run in both your website and in the admin. Play around with the site, try some minor changes and stuff and you will get used to the file layout and stuff then you can try making bigger changes. Remeber since you have the sts system installed it's all html now baby except for the things you said like changing the box looks and things like that.

 

Plus make sure you look at this..it has answers to most of peoples questions.

Wiki Docs

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

OPEN ISSUES and FAQ REQUEST:

 

To help the many people who now seem to be using STS, I'd like to get more "in the loop" as I've been off the forums for a while.

 

I want to create an STS FAQ page. If you have a question (and preferably an answer to go with it) that you'd like to see in the FAQ, please post it here with the words "STS FAQ" in the message somewhere (so I can find it easier).

 

If you know of a problem or bug with STS, please post a message here with the words "STS BUG" in it (so I can find it easier).

 

IF there is a particular feature desired (yes, I know, CoolMenu, CoolMenu, CoolMenu! ;) ) post it here with the words "STS FEATURE" in the post.

 

Hopefully I'll be able to make life easier for everybody using it by consolidating the key information in a thread less than 60 pages long. :o

 

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

STS BUG.....tell a friend adds to cart instead of going to the taf page. The fix is in this forum somewhere, I used it and it worked great. I just looked for the fix and cannot find it but it may have been the one on page 52 of this post.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Wow, long thread.

Anyways, I need some help. I 'm using STS v1.8 and after doing everything it says in the Readme (I Hope :() I get this when trying to run my shop:

 

Warning: main(includes/filenames.php): failed to open stream: No such file or directory in /home/krazyowl/public_html/test/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/krazyowl/public_html/test/includes/application_top.php on line 53

 

I have very little experiance with PHP so help would be appreciated.

Link to comment
Share on other sites

Wow, long thread.

Anyways, I need some help. I 'm using STS v1.8 and after doing everything it says in the Readme (I Hope :() I get this when trying to run my shop:

 

Warning: main(includes/filenames.php): failed to open stream: No such file or directory in /home/krazyowl/public_html/test/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/krazyowl/public_html/test/includes/application_top.php on line 53

 

I have very little experiance with PHP so help would be appreciated.

Are you using the OSCommerce Milestone (MS) 2.2 release or a different one.

 

STS 1.8 only works with the MS2.2 release of OSC.

 

Incidentally, please post a reply telling me what version of OSC you are using, so I can update my FAQ page with the answer for your questions (I see this one a lot).

 

- 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

Using MS2.2, STS 1.8, and Dynamic DHTML Menu.

Having a random problem with the menu. Every few clicks produces a java script error:

Char:2

Error: MENU_ITEMS is undefined

 

The page will load, but without the DHTML menu. I noticed when this happens one of the buttons on the page will link to menu_items.js.php

I suspect STS is clipping off the java script calls inside sts_template.html. Here is what I have pasted into the header of sts_template.html:

<link rel="stylesheet" href="menu.css">

<script language="JavaScript" src="menu.js"></script>

<script language="JavaScript" src="menu_items.js.php"></script>

<script language="JavaScript" src="menu_tpl.js"></script>

<script language="JavaScript">

<!--//

new menu (MENU_ITEMS, MENU_POS, MENU_STYLES);

//-->

</script>

 

 

Any thoughts?

 

Thanks in advance,

 

Chris

Link to comment
Share on other sites

UPDATE:

 

Forgot to add this information my previous post (2 above this one).

 

The error generated on any page points to this line:

 

<script language="JavaScript"> <------THIS LINE ERRS (line 17)

<!--//

new menu (MENU_ITEMS, MENU_POS, MENU_STYLES);

//-->

Edited by Chris_C
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...