Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I have been searching for the answers for a long time,

 

but ill ask again, does anyone know how to get the "click to enlarge" working in the sts contribution?

 

is there a way i can include the php in the html file

 

something like this maybe ?

 

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

 

if anyone knows how to do it, please let me know.

 

Thanks in advance

Share this post


Link to post
Share on other sites
I have been searching for the answers for a long time,

 

but ill ask again, does anyone know how to get the "click to enlarge" working in the sts contribution?

 

is there a way i can include the php in the html file

 

something like this maybe ?

 

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

 

if anyone knows how to do it, please let me know.

 

Thanks in advance

I sometimes have the same problem with the click to enlarge not working. I always use STS but on some sites I have a problem and some I do not. Here is my fix for the problem . Open up your sts_template file and change

 

This

<head>

<!--$headcontent-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

 

TO this

 

<head>

<!--$headcontent-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

 

This shoud fix the problem.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites
Is there anyway I could have a front page outside of the catalog with specials or whats new using sts, so the content changes the front page every time content in store changes, or is this not possible.

If it is could someone explain how plz?

 

This is the test site I am working on and I would like a page outside of catalog. This is a splash page with just  lizard images and specials or whats new 1 box thats all.

 

http://www.elwyndesignedit.co.uk/testing/cat/

 

This site uses sts1.8, the theme when I have completed it will be release for all to use.

I would like to know if it just possible yea or nah, whatever so I dont carry on wasting any more time searching.

 

Thx :D

Does anyone here have a solution to this problem, or question relating to a splash front page outside catalog folder but pulling data from the sts/osc site I have.? :D


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites
This is all very interesting reading, and I am learning so much, but am having trouble finding the answer I came looking for.

 

I have downloaded the STS file, and would like to test it out... but,

WHERE do I put it exactly??? And do I remove the old index or something???

STS Quickie:

 

Get OSC MS2.2 running first, then just copy the STS files into your /catalog/includes directory, copy the STS lines at the bottom of configure-SAMPLE.php into your configure.php. That completes the basic install. No need to modify any other OSC files.

 

Then just modify the /catalog/includes/sts_template.html file just as you would any other HTML file to change the look of the site. Just move or remove the $variable tags to control what appears where.

 

You can't use STS to change what appears in the place of the $content variable. You have to make your changes the old fashioned way for that.

 

- Brian

I have a new copy of OSC. I have copied the STS files into catalog/includes. I have edited the "configure" file to reflect the new "template" page.

However, instead of using YOUR template, I have a nice page that I put there and NAMED template.html, and placed all the tags (ie $cartbox etc..) in the spots where I wanted to see each item. But when I view the page in my browser, all I see is $cartbox etc..!!

What have I done wrong??

Share this post


Link to post
Share on other sites
Put the javascript code directly between the <head> tags in the sts_template file so it looks like this.

 

<head>

<!--$headcontent-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

 

I must be missing something... I added the above code to the header section of the sts_template.html file. Should I also add this to the product_info.php.html file as well? But I don't think that will give me the link I need for "Click to Enlarge" on the product page. Is a variable defined for this in the product_info.php.html? I can't find it.

Share this post


Link to post
Share on other sites
This is all very interesting reading, and I am learning so much, but am having trouble finding the answer I came looking for.

 

I have downloaded the STS file, and would like to test it out... but,

WHERE do I put it exactly??? And do I remove the old index or something???

STS Quickie:

 

Get OSC MS2.2 running first, then just copy the STS files into your /catalog/includes directory, copy the STS lines at the bottom of configure-SAMPLE.php into your configure.php. That completes the basic install. No need to modify any other OSC files.

 

Then just modify the /catalog/includes/sts_template.html file just as you would any other HTML file to change the look of the site. Just move or remove the $variable tags to control what appears where.

 

You can't use STS to change what appears in the place of the $content variable. You have to make your changes the old fashioned way for that.

 

- Brian

I have a new copy of OSC. I have copied the STS files into catalog/includes. I have edited the "configure" file to reflect the new "template" page.

However, instead of using YOUR template, I have a nice page that I put there and NAMED template.html, and placed all the tags (ie $cartbox etc..) in the spots where I wanted to see each item. But when I view the page in my browser, all I see is $cartbox etc..!!

What have I done wrong??

it must be named sts_termplate.html so try renaming your file with that name

Share this post


Link to post
Share on other sites

Hi Im having some problems with my oscommerce store. Im using the sts template system on the latest version of oscommerce

 

http://alpha.xnoc.net/~ps2lids/catalog/index.php

 

1. The boxes on the right hand side (content) how do I change the top images for these from a standard colour to an image. I have installed an infobox header contribution but it only changed the ones on the left hand side. How do I change the rest of them?

 

2. I have added in a box, called information. The links in this box are going to link to html pages, how do I go about opening them in the main content section of the website. So it looks the a page within the website and not opening a different link?

 

Im quite new to this new software so the easiet way would be the best.

 

Any help would be great

Share this post


Link to post
Share on other sites

Has anybody gotten the "multiple category templates" funtion working? I've been trying for weeks now. Created the directories & files, however they aren't getting picked up.

 

Question: does the path have to include "/catalog/" perhaps? I renamed my "/catalog/" dir to "/shop/"

 

Any comments would be appreciated.

Share this post


Link to post
Share on other sites
Has anybody gotten the "multiple category templates" funtion working? I've been trying for weeks now. Created the directories & files, however they aren't getting picked up.

 

Question: does the path have to include "/catalog/" perhaps? I renamed my "/catalog/" dir to "/shop/"

 

Any comments would be appreciated.

 

*FIXED* - sts_templates directory working

 

Problem: DO NOT APPLY the "2 Apr 2004 - Error Fixed" and/or the "8 May 2004 - STS with Category Meta Tags & Article Manager" contributions.

 

If you simply use STS v.2.01 released Feb 5, 2004, the sts_templates directory will work.

 

Apparently there is a problem that broke this functionality in the last 2 additions to this contribution.

 

Perhaps somebody over at DiamondSea could tend to this...

Edited by SeanLee

Share this post


Link to post
Share on other sites

Does?nt anyone have any suggestions on this one? ;)

I would like to have the "my account", "check out" and the "cart contents" in graphical buttons instead of text links. Support for multiple languages is a must.

 

 

thx B)

Share this post


Link to post
Share on other sites
Does?nt anyone have any suggestions on this one? ;)

I would like to have the "my account", "check out" and the "cart contents" in graphical buttons instead of text links. Support for multiple languages is a must.

 

 

thx B)

So why can't you use $myaccountlogo $cartlogo and $checkoutlogo ?

Share this post


Link to post
Share on other sites

Hi all,

I would like to use the search function in te header, does somebody knows how to do this?

THANKS!!

latersssss,

Chris

Share this post


Link to post
Share on other sites
Hi all,

I would like to use the search function in te header, does somebody knows how to do this?

THANKS!!

latersssss,

Chris

To move any of the boxes or links listed in you sts_template.html file you just put them where you want them to show up. If you want your search box in the header then find

 

$searchbox

 

and move to where you want it to be.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

Can anyone please explain how the "Click to Enlarge" feature is supposed to work with STS? When I click on the link, it just takes me back to the home page. How do I make it show a larger image of the single product from the Product page? What files do I need to modify?

Share this post


Link to post
Share on other sites

well.. i have to say...

 

ABOUT TIME :D

 

for the "2 Apr 2004 - Error Fixed" update.. i've been working on trying tro fix this for four weeks..

 

now all i have to work out is why my product_info.php.html isnt working... although it'll prob be another four weeks..

 

anyone know?

Edited by adiwillow

Share this post


Link to post
Share on other sites

Does anyone know if STS works well with Master Products and Paypal IPN mods? I have all three installed and everyone but STS is working fine. The template shows up but none of the content shows. Just curious if anyone has had success using all three.,

 

Thanks!

 

Mark Bianchi

Dayton, OH

Share this post


Link to post
Share on other sites

What's the easiest way to create new pages for your store using STS? For example an 'about us' page, 'company news' page, etc. Just creating an html template with content and then linking to it doesn't work.

Share this post


Link to post
Share on other sites

Any idea when the ability to add templates for each individual product will be added to this contribution?

 

Anybody done this already?

Share this post


Link to post
Share on other sites
What's the easiest way to create new pages for your store using STS? For example an 'about us' page, 'company news' page, etc. Just creating an html template with content and then linking to it doesn't work.

You have to copy one of the existing pages and rename it. Say conditions.php and then rename it to faqs.php .You also need to do the one in your lang directory. Once you have done that you need to add the page to your sts_displayoutput file so you can use it in your template. Again you just copy the info from one of the lines like the one below and change the info to match what you want.

 

$template['shipping'] = '<a href=' . tep_href_link(FILENAME_SHIPPING) . ' class="headerNavigation">' . BOX_INFORMATION_SHIPPING . '</a>';

 

you will need to add the definitions in the appropriate places like your english.php and maybe your filenames.php.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

im trying to create a new box under sts 1.8 and i can't seem to find what im looking for in here. i added the new box to sts_user_code.php and sts_display_output.php and i created the new file in the boxes folder modifying some of the code from the information box. i added $pricingbox to the sts_template.html file and it shows up in every page except for my index.php page. im so confused!

Edited by noarchal

Share this post


Link to post
Share on other sites

are there any sts files or folders that should be blocked with our robots.txt. file?

Share this post


Link to post
Share on other sites

How do I get "Click to Enlarge" to work? I see it working on other sites with STS, but I can't get it working on mine. When I click on "Click to Enlarge", it takes me back to my home page. How do I fix this?

Share this post


Link to post
Share on other sites

Getting this error what am I doing wrong

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/pconnor/public_html/shop/includes/application_top.php on line 511

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pconnor/public_html/shop/includes/application_top.php on line 511

Share this post


Link to post
Share on other sites
Getting this error what am I doing wrong

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/pconnor/public_html/shop/includes/application_top.php on line 511

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pconnor/public_html/shop/includes/application_top.php on line 511

From the STS FAQ:

 

6) I get the error message:

 

Fatal error: Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /pathtoyourwebsite/catalog/includes/application_top.php on line 511

 

Answer: You did not copy the define statements at the bottom of your configure-SAMPLE.php file into your production configure.php file in your /catalog/includes/ directory.

 

Cheers!

 

- 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://forums.oscommerce.com/index.php?showtopic=58541

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×