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://forums.oscommerce.com/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://forums.oscommerce.com/index.php?showtopic=187122, as many problems you will face have been discussed there.
- Rigadin



...