STS Home | Download | Custom Integration | Sample Sites | Support

Mailing List | Testimonials | FAQ | Bugs | Feature Request | osCommerce

Thank you for
supporting STS!

Frequently Asked Questions (FAQ)

Here are some of the most frequently asked questions about STS.

1) I get the error:

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

Answer:You need to be using the Milestone 2.2 release of STS. STS does not work "out of the box" with the CVS release due to changes that have been made in the /catalog/include/ files in the CVS release. However, you should be able to do the Advanced Install and get it to work by adding the STS capture codes yourself to the CVS files.


2) When I click on Tell A Friend, it takes me to the Shopping Cart page.

Answer: This has been fixed as of STS version 1.9. Please upgrade to the latest version of STS to take advantage of this fix and other new features that are added regularly.


3) At the bottom of each page, I see the characters "</".

Answer: You need to upgrade your server's version of PHP. This was a subtle bug in older versions. Updating your PHP will fix it. You should upgrade it anyway, since if you are running a version with this problem, there are also security fixes that have been added to later versions of PHP that you need to secure your system.


4) Does STS work with Shoppe Enhancement Controller (SEC)?

Answer: Not "out of the box", but some people have hacked SEC a bit to get them to work together with STS 1.8.

  (Check in the forums, as the link that was originally up here is no longer valid)


5) Does STS work with CoolMenu?

Answer: Not yet. It is a common request, and I'll work on it as soon as I can get some time.


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.


7) How to I change the look of the boxes?

Answer: STS does not control how the boxes look. STS only controls where the boxes appear (or don't appear) on your page. To change the look of the boxes, you'll need to change the code that creates them. Do a search on the forums.oscommerce.com for boxes and you'll find plenty of threads and addons that will help you make the changes you desire.


8) How to I change what appears in the $content variable?

Answer: The $content variable is filled by capturing the output of the various OSCommerce programs. STS does not control anything about how OSC makes the pages, it only captures the output and lets you layout your site's look-and-feel easily. You would make changes to the $content variable the same way you would make changes to the default install of OSC.


9) What is the difference between Basic Template System (BTS) and Simple Template System (STS)?

Answer: 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.


9) What kind of HTML can I use in my STS Template files?

Answer: You can use any HTML you want, including Javascript, Flash and Java applets, Cascading Style Sheets, XHTML and DHTML.


10) Can I put executable code in my STS Template files?

Answer: Depends on the type of code.

PHP: No.
Server-side Includes: No.
Client-side Javascript: Yes.
Client-side Flash, Yes.
Client-side Java: Yes.

You can not put any server-side executable code in STS Template files. STS Template files are treated as a simple text file by STS and no executable codes in it are processed by the STS engine.

Any PHP code in a template file will be sent to the browser un-executed in the HTML source code.

Client-side programming such as Javascript, Flash, Java, etc. will be passed on the the browser in the HTML output, and it the clients' browser is then responsible for running it (or not, depending on browser settings).

Read STS FAQ # 11: How does STS Work for more of an explanation of why it does this.

If you want to include new features to your code, you will need to create new template variables in sts_display_output.php, sts_product_info.php or sts_user_code.php. You can then put your new template variables wherever you like in the template file(s).


11) How does STS Work?

Answer: STS works by selectively capturing the output of the various OSC programs and storing key portions of the output in $template["variablename"] variables. It does this through the STS_START_CAPTURE, STS_STOP_CAPTURE and STS_RESTART_CAPTURE functions.

After all the OSC output has been captured, STS reads in the appropriate HTML Template file into memory. It then performs a find-and-replace for each of the $template variables and then sends the updated file to the client's web browser.

It also does a little bit of magic trying to detect javascript code and forms so it can layout the code correctly.


12) How do I get STS to work correctly with my SSL (HTTPS://) server?

Answer: Make sure that all no url's referenced in your template pages start with HTTP:// (ie: http://me.com/catalog/images/blah.gif)

All URL's should start with a slash (ie: /catalog/images/blah.gif) or a a directory (ie: blah.gif).

If you have ANYTHING on an HTTPS: (SSL) page that references an HTTP: address, IE won't display the lock icon. This includes Stylesheets and Javascript include files.


99) Some other misc FAQ's:

How to get the credit card error messages to show up during checkout, when using AuthorizeNet Consolidated for AIM 1.7 contribution and STS.
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=377700

HOW TO CREATE PRODUCT-SPECIFIC TEMPLATES IN STS v2.01
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=377128
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=378616

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.
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=373212

How to add Popup Images on product_info.php.html templates
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=380060

Problem with the credit class/gift voucher contribution not displaying a coupon code error during checkout
http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=409650

 

   Need Help? | About DiamondSea | Sign Up | Support | Login | Legal | Home
Copyright © 2003. Any duplication without written permission prohibited. All Rights Reserved.