Guest Posted April 12, 2006 Share Posted April 12, 2006 Hi everybody, Version 4 is a major release of the excellent STS contribution that you can find here: http://www.oscommerce.com/community/contributions,1524, I started a new thread to not mix with STS v2/v3 questions and because the v2/v3 thread has reached 147 pages! If you have problem with STS v2 or v3, please look here: http://www.oscommerce.com/forums/index.php?sho...c=58541&st=2920 The main advantages of this release are: - Less code and several improvements, so should be faster.. - All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes. - Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules). - Write own module for checkout, create account or else: easy to share like payment modules. - Switch STS on/off from admin. When off, you will see your store like it was before STS installation. - Debug mode still available from URL, but with a code defined by admin => works like a password. - If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors. - Ready for product page caching. Not implemented yet, but doors are open. - Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template). - Installation is still very easy, modifications only at beginning and end of some files. - Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template. - All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications. - Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean. - Possibility to write php script in the templates, like in STS v3. - Compatible with templates made for STS v2 or v3 - Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7, only few small modifications). STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution. Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS. Changelog from STS PLUS v4.0.7: - UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store. - DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php - UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here. - UPDATED examples in sts_user_code.php. - UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead. - UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates. - UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column. You can also have a look at the STS PLUS thread here: http://www.oscommerce.com/forums/index.php?showtopic=187122, as many problems you will face have been discussed there. - Rigadin Quote Link to comment Share on other sites More sharing options...
bkellum Posted April 12, 2006 Share Posted April 12, 2006 Thanks Rigadin! Looking forward to using this new version. Having STS and STS Plus combined once again will help push this contribution to the top of the class for OsCommerce! This contribution should be the "integrated" template system for any new OsCommerce packages. Thank you Brian and Rigadin! :thumbsup: Bill Kellum Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
ianraba Posted April 12, 2006 Share Posted April 12, 2006 Bloody hell, FANTASTIC! Quote Link to comment Share on other sites More sharing options...
scottmason Posted April 12, 2006 Share Posted April 12, 2006 (edited) Ok I've got a question - great contribution by the way and I'm sure when I get it working I won't look back - but I've just installed STS 4 great, in the sts templates folder supplied there are two folders one called FULL and the other called TEST. Now do I customise the sts_template.html file in the FULL or TEST folder? which css file does it read from? do I need to create a new css file in the FULL or TEST folders? Anyway I assumed it was the FULL folder as it seemed it had more in it then made some significant changes to the template like fixed width and center, background colours etc then went to admin and changed the template folder to FULL. But none of the changes take effect on the site. If I put my old folder called MYSITE in the STS folder - which was included in the old version of STS - then change admin to read from that folder, it works, the changes take effect. I'm confused Can you offer any help? cheers Edited April 12, 2006 by scottmason Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hi Rigadin. Thanx You again 4 this great great Contrib!!!! :thumbsup: Unforunatly i have a little bit confusion about Your instal-Doc: You write (for Updaters from STS Plus): - Delete the following file: - includes/modules/sts_inc/sts_column_right.php If I do so, i lost my Content! :blush: With the "includes/modules/sts_inc/sts_column_right.php" its worx fine, like before.. :rolleyes: PEACE! --h- Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 (... )Now do I customise the sts_template.html file in the FULL or TEST folder? which css file does it read from? do I need to create a new css file in the FULL or TEST folders? (... ) I'm confused Can you offer any help? cheers Hi ScottMason! You can put it whereever You like it in Your Tmplates-Folder..! I make a Folder "MyTemplates" and write it in thje Admin as Templatefolder..! (Please see the Dox!) :thumbsup: PEACE! --h- Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hi Rigadin. Thanx You again 4 this great great Contrib!!!! :thumbsup: Unforunatly i have a little bit confusion about Your instal-Doc: You write (for Updaters from STS Plus): If I do so, i lost my Content! :blush: With the "includes/modules/sts_inc/sts_column_right.php" its worx fine, like before.. :rolleyes: PEACE! --h- When updating from STS PLUS to STS4, you have to delete this file but also modify some others. In your particular case, you have not updated includes/column_right.php. At the beginning of this file it should look like this: // START STS 4.1 if ($sts->display_template_output) { $sts->restart_capture ('content'); } else { //END STS 4.1 and you will see your content again. The changes in the files are very small but of course they are important. The doc only tell which file to replace but in fact you should compare before replacing. Here are the changes to do: - includes/application_bottom.php: remove the STS PLUS code at the beginning of the file, this tag is not used anywhere. - includes/header.php: remove the STS PLUS code located at the end of the file. - includes/column_right.php: already mentioned what to do there. + Update files in includes/modules/sts_inc and /sts. Note: the STS contribution is now delivered with 2 template folders: test and full. By default the test folder is used and it contains only one template. Modify this template like you want, as a start. Use the "full" folder when you need examples on how to set templates for some specific pages. In the delivered templates, the stylesheet used is the one located in the catalog folder. I know it's not really nice but there are some ways to change this. Just remember that link to stylesheet is relative to catalog folder when a script is running, and is relative to the template location when editing it. The variable $templatepath can also be used to dynamically build the link to the stylesheet (see the doc for more details). - Rigadin Quote Link to comment Share on other sites More sharing options...
scottmason Posted April 13, 2006 Share Posted April 13, 2006 Hi ScottMason! You can put it whereever You like it in Your Tmplates-Folder..! I make a Folder "MyTemplates" and write it in thje Admin as Templatefolder..! (Please see the Dox!) :thumbsup: PEACE! --h- eh, not quite sure what you mean, Where do I put "MyTemplates" folder and surley admin has to be directed to that folder of the same name. and what about the CSS and the sts_template.html in the FULL folder from the install not working! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hi Rigadin. Thanx You. Very cool works. Quote Link to comment Share on other sites More sharing options...
scottmason Posted April 13, 2006 Share Posted April 13, 2006 Hi Rigadin. Thanx You. Very cool works. Hi how did you get this to work? for instance i changed the Admin to read from the test folder, made some changes to the template.html in the test folder, the changes take effect but the place holders are just showing up as text.. the test folder seems pretty empty to me, it only contains the sts_template.html file, should there be other files in there. I can only get this to work if i put an old mySite folder from STS.v3 and work from that one, if you get what i mean. the documentaton suggests using the test folder, am i missing something really obvious Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hi how did you get this to work? for instance i changed the Admin to read from the test folder, made some changes to the template.html in the test folder, the changes take effect but the place holders are just showing up as text.. the test folder seems pretty empty to me, it only contains the sts_template.html file, should there be other files in there. I can only get this to work if i put an old mySite folder from STS.v3 and work from that one, if you get what i mean. the documentaton suggests using the test folder, am i missing something really obvious Goto http://SITE/admin/modules.php?set=sts&modu...ult&action=edit chahge "test" to "full" Read STS4.doc sorry is my english, i'm from Russia Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hmm.. Header Tags Controller don't works ( Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 (edited) Hmm..Header Tags Controller don't works ( YES! http://www.oscommerce.com/forums/index.php?sho...=187122&st=280# Edited April 13, 2006 by FreeLancer Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 Hi Rigadin.. THANX 4 Your quick help! No its worx very well!!! :thumbsup: PEACE! --h- Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2006 Share Posted April 13, 2006 eh, not quite sure what you mean, Where do I put "MyTemplates" folder and surley admin has to be directed to that folder of the same name. and what about the CSS and the sts_template.html in the FULL folder from the install not working! You see the "../includes/STS_TEMPLATES/" Here are the "TEST"-Folder & the "FULL"-Folder.. Here You can make Your own Templatefolders. If You make "My_Templates" you hav to sign it into Your Admin-Interface of STS "..admin/modules.php?set=sts" --> Template folder Put in: "MyTemplates" (without any "/" ! ) You see..? :thumbsup: --h- Quote Link to comment Share on other sites More sharing options...
scottmason Posted April 13, 2006 Share Posted April 13, 2006 Goto http://SITE/admin/modules.php?set=sts&modu...ult&action=editchahge "test" to "full" Read STS4.doc sorry is my english, i'm from Russia tried that already, still doesn't work, like i said the only way i get this to work is if i use my old folder that i had for STSv3 and change it to that in admin. what are the FULL and TEST folders for? Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted April 13, 2006 Share Posted April 13, 2006 I just installed the STS for the first time, quite an easy installation process, but after installing and trying to open the page I keep getting a blank page, tried it in normal mode and also in debug mode (index.php?sts_debug=debug)... I enabled the mod in my admin (the default one) am I doing something wrong? Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
dr_lucas Posted April 13, 2006 Share Posted April 13, 2006 I forgot to mention that I installed it on my heavily modded store, and it behave the way I described it in the previous post. I just tried to install it on a brand new osC installation and everything seems to be working fine with the STS. I also triple checked all the files that needed to be modified in the catalog section and everything there seems to be as it should. This is the link to my store: (that shows a blank page) http://www.skpiercing.com/index.php?sts_debug=debug And this is the link to my clean osC test site (that shows fine): http://www.skpiercing.com/test/index.php?sts_debug=debug Thanks in advance for any help. Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
Frisser Posted April 13, 2006 Share Posted April 13, 2006 Same problem here. My shop worked fine with STS Plus 4.0.7 but after the upgrade my screen is blank. If I disable STS in the admin the shop is working fine! Double checked everything (i hope...) but it doesn't work.... (I also have headertags installed) Quote Link to comment Share on other sites More sharing options...
dr_lucas Posted April 13, 2006 Share Posted April 13, 2006 Same problem here. My shop worked fine with STS Plus 4.0.7 but after the upgrade my screen is blank. If I disable STS in the admin the shop is working fine! Double checked everything (i hope...) but it doesn't work.... (I also have headertags installed) I got the header tags contribution installed as well (together with some other contributions and personal modifications that I made). Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
Hunabku Posted April 13, 2006 Share Posted April 13, 2006 Greetings fellow STSers - (I recently posted the following in the old STS plus forum an then read about this new forum - so here it is) I've sucessfully utilitized pretty much all of the template features in STS plus, including the recent addition for handling product_info templates specific to given category - works great by the way - thanks Rigadin. However, I can not create a unique template specific to index.php (site home page). This does not seem to be a feature of STS or STS plus or have I missed something obvious here? In my attempts, I have manually edited the index.php code to include a separate(non-template) html file that displays only for the home page. But with STS active my html file occurs at the $content# placeholder along with the rest of the default template and I don't want the template, just the content(separate html file). If I could suppress STS only for index.php(home) display my prayers would be answered.... or does anybody have other strategies that I might employ here? thxs Quote Link to comment Share on other sites More sharing options...
kenada Posted April 13, 2006 Share Posted April 13, 2006 OK after installing STS4.1 I have lost my banner ads, they are turned on, and it even shows that they are seen n the admin, but they do not show up on my store. Any idea? Quote Link to comment Share on other sites More sharing options...
SteveODNet Posted April 13, 2006 Share Posted April 13, 2006 Anybody know if this contribution work with register_globals turned off? Thanks Quote Link to comment Share on other sites More sharing options...
SteveODNet Posted April 14, 2006 Share Posted April 14, 2006 Anybody know if this contribution work with register_globals turned off? Thanks To anwser my own question... yes, it does appear to work with register_globals turned off. So far, anyway. Quote Link to comment Share on other sites More sharing options...
Zolee Posted April 14, 2006 Share Posted April 14, 2006 Hi! Sorry for my bad english. My webshop its new. My footer.php don't displayed. with sts 4.1 enabled. enabled My footer.php: <?php /* $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // START STS 4.1 if ($sts->display_template_output) { include DIR_WS_MODULES.'sts_inc/sts_footer.php'; } else { //END STS 4.1 require(DIR_WS_INCLUDES . 'counter.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="footer"> <td class="footer">??<?php echo strftime(DATE_FORMAT_LONG); ?>??</td> <td align="right" class="footer">??<?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>??</td> </tr> </table> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td> </tr> </table> <?php if ($banner = tep_banner_exists('dynamic', '468x50')) { ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_display_banner('static', $banner); ?></td> </tr> </table> <?php } // START STS 4.1 } // END STS 4.1 ?> Please help me! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.