Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

i've installed oscommerce 2.2 & STS 4.2

why the placeholders $headertext didn't display anything?

Like i put $headertext at infobox_information_header.php.html

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src=/images/m13.gif width=4 height=28></td>
  <td bgcolor=#566268 width=203><span style="padding-left: 5px"></span><span class=ch5>$headertext</span></td>
	</tr>
</table>

Edited by Renepahey
Link to comment
Share on other sites

OK Bill I thought I'd get creative and have some fun with OCS and STS4.2. Since my server is my sons I have a ton of space I can play with so I renamed my orginal catalog to catalogold and then install a fresh version of ocs and sts 4.2 just to play with. Used the old database and diffinatly made dual backups of both the old catalog and the db.

 

So far everything seems to be working properly. But my question is do you alter the test template or the full template? Or for that mater would it be more benificial to just make a new template and call it something like mytemplate?

 

Thanks - Guy

Link to comment
Share on other sites

i've installed oscommerce 2.2 & STS 4.2

why the placeholders $headertext didn't display anything?

Like i put $headertext at infobox_information_header.php.html

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src=/images/m13.gif width=4 height=28></td>
  <td bgcolor=#566268 width=203><span style="padding-left: 5px"></span><span class=ch5>$headertext</span></td>
	</tr>
</table>

 

Hey Rene I think you have to have the headers controler contribution installed before it will work but not sure.

Link to comment
Share on other sites

Are you using a stop character at the end of your placeholders?

 

By adding a stop character at the end of placeholders, like $content$ or $content# instead of just using $content, the sorting of the big array containing all the placeholders variables is not needed anymore.

 

To do so, you have to open your template, add the same end character to all placeholders. For example: "$", then tell the system to use this end character. This is done by defining a constant in the template. Add this code at the beginning of your template to indicate you are using an end char:

 

<?php DEFINE ('STS_END_CHAR', '$'); ?>

 

For content templates, add this instead of the above code:

 

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>

 

Hope this helps,

 

Bill Kellum

 

Hmm I have tried inserting stop character, doesn't seem to make a difference.

 

http://www.milagro-herbs.com/catalog/?sts_debug=debug

 

I don't have any idea why the $content variable isn't capturing any data. :(

Link to comment
Share on other sites

i've installed oscommerce 2.2 & STS 4.2

why the placeholders $headertext didn't display anything?

Like i put $headertext at infobox_information_header.php.html

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src=/images/m13.gif width=4 height=28></td>
  <td bgcolor=#566268 width=203><span style="padding-left: 5px"></span><span class=ch5>$headertext</span></td>
	</tr>
</table>

Rene, $Headertext is a placeholder for the "Infobox Templates for STS" contribution. I did not implement the "Infobox Templates for STS" into the STS v4.2 install folders, therefore; you will have to download the "Infobox Templates for STS" contribution and follow the install instructions that I provided in the STS v4.2 User Manual under STS add-ons.

 

I have also provided the author's email address for support for "Infobox Templates for STS".

 

The reason that I did not integrate the contribution into STS v4.2 was that my goal was to establish a stable release of STS v4.1 and to make it more user friendly.

 

Hope this helps,

 

Bill Kellum

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

OK Bill I thought I'd get creative and have some fun with OCS and STS4.2. Since my server is my sons I have a ton of space I can play with so I renamed my orginal catalog to catalogold and then install a fresh version of ocs and sts 4.2 just to play with. Used the old database and diffinatly made dual backups of both the old catalog and the db.

 

So far everything seems to be working properly. But my question is do you alter the test template or the full template? Or for that mater would it be more benificial to just make a new template and call it something like mytemplate?

 

Thanks - Guy

Guy, thanks for the comments.

 

I would suggest making a backup copy of all of the original templates (the "sts templates" folder) first. Then, start off with just using one template for your entire site. You can do this by simply using the one template (sts_template.html) in the "test" folder.

 

You will eventially notice that this "one" template will not meet the needs of your growing shop. You may want to make your shop have its own template for the "main page" (the $content). To do this, you will want to go to your shops "admin" panel, click on "modules", and then "sts". You will need to "install" the "index" and "product info" modules.

 

Now you can edit the templates in the "full" folder to match your shops design. Follow the instructions in the User Manual to accomplish this or give me a holler if you still have questions on this.

 

Thanks for giving STS v4.2 a try! I'm sure you will find it a lot FASTER than version 2 that you have been using.

 

Good luck,

 

Bill Kellum

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

Hmm I have tried inserting stop character, doesn't seem to make a difference.

 

http://www.milagro-herbs.com/catalog/?sts_debug=debug

 

I don't have any idea why the $content variable isn't capturing any data. :(

Sorry to hear you are still having problems.

 

Can you post the contents of the template that you are using?

 

Also: You may find it useful to use a file comparison tool such as "Winmerge" (freeware) and compare your includes/classes/sts.php with the original from the STS v4.2 download. If it is easier for you, I would suggest that you try installing STS v4.2 again to make sure you did not miss any files.

 

Hope this helps,

 

Bill Kellum

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

I purchased a template from a company that used STS in their coding. In the past few days I have learned enough php and sts to make minor changes to our website. One of the things I would like to be able to do is to replace the "new products" section with a "specials" section on the home page. Does anyone have any ideas on how to go about doing this? I tried a couple of things that didn't work. Don't know if this is an sts type issue or a php issue. Thanks for the help in advance!

 

Mandy

Link to comment
Share on other sites

Hey Bill, having fun now! :D

 

Everything seems to be working perfectly this time around. No more double headers and double info boxes.

 

Now for all of you who maybe following this thread.

 

Here is what I did. I installed a fresh version of ocs and then followed Bill's updated instructions found on his website. I created a directory under sts templates and added a new folder calling it MyTemplates. I then took my old sts template and placed it in that folder. In admin I changed the test folder to MyTemplates folder. Took a look and everthing was working to my knowledge. Clicked every link. :-"

 

I've now started updating the contributions that I added to the old catalog along with the missing images and such.

 

One thing that has really saved my Bacon is the backup of everything you have in that catalog folder before you start. I can't stress this enough.

 

If you are a beginner using OCS and are looking for the right template structure to use for your store then STS v4.2 is the perfect way to go as it will releive your stress in the many changes you can make to OCS.

 

BE SURE TO BACKUP YOUR DATA BASE FILES BEFORE YOU EVER DO ANY CHANGES

 

Guy

Link to comment
Share on other sites

I purchased a template from a company that used STS in their coding. In the past few days I have learned enough php and sts to make minor changes to our website. One of the things I would like to be able to do is to replace the "new products" section with a "specials" section on the home page. Does anyone have any ideas on how to go about doing this? I tried a couple of things that didn't work. Don't know if this is an sts type issue or a php issue. Thanks for the help in advance!

 

Mandy

 

I found the contribution I was looking for and I know that it doesn't affect the sts_template, so nevermind! :blink:

Link to comment
Share on other sites

Hmm I have tried inserting stop character, doesn't seem to make a difference.

 

http://www.milagro-herbs.com/catalog/?sts_debug=debug

 

I don't have any idea why the $content variable isn't capturing any data. :(

Javier,

 

I believe you are missing the code changes to your catalog/includes/column_right.php file:

 

Mentioned in the STSv4.2 Installation Text:

  1. Open the file "catalog/includes/column_right.php"

Add at the beginning:

// START STS 4.1

if ($sts->display_template_output) {

$sts->restart_capture ('content');

else {

// END STS 4.1

Add at the end:

// START STS 4.1

// END STS 4.1

You should now see your content. Hope this helped you out, Bill Kellum

Edited by bkellum

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

hi everyone, I don't know if someone has already posted a similar request.

I'm adapting the templates to my shop needs and I would like to add an About us link in the Information box. I tried following the way suggested in "About us contribution" http://www.oscommerce.com/community/contributions,1404 but it seems that the STS system (at least the one I'm using...) doesn't refer to the information.php file to create the box, rather to includes/boxes/info_pages.php.

 

The php in the file is the following

 

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_PAGES);

 

new infoBoxHeading($info_box_contents, false, false);

 

$rows = 0;

$page_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';

 

 

 

 

while ($page = tep_db_fetch_array($page_query)) {

$rows++;

 

 

$target="";

if($page['link_target']== 1) {

$target="_blank";

}

 

 

 

if($page['page_type'] != '2'){

 

$link = FILENAME_PAGES . '?pages_id=' . $page['pages_id'];

 

 

 

}else{

 

$link = FILENAME_CONTACT_US;

}

 

if($page['intorext'] == 1) {

$page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . $page['externallink'] . '">' . $page['pages_title'] . '</a></td></tr>';

}

else {

$page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . tep_href_link($link) . '">' . $page['pages_title'] . '</a></td></tr>';

}

}

 

 

 

$page_list .= '</table>';

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $page_list);

 

 

new infoBox($info_box_contents);

?>

 

 

 

but I have no clue how and where I have to insert a reference to the file catalog/about_us.php to show it in the box.

 

Anyone could please help me?

Ciao

Stefano

Link to comment
Share on other sites

Hello STS users!

STS v4.1 has been updated to STS v4.2. :D

 

STS v4.2 is a User-Friendly Version of the Simple Template System (STS).

 

Version 4.2 is the easiest template system to date for the osCommerce solution. STS has recently been ranked 5th among contribution downloads for osCommerce, passing BTS (Basic Template System).

 

The Simple Template System (STS) has seen a lot of great changes over the years, changes for the better and has drawn a huge fan base. I hope that this version will continue that trend as well as bring in the novice who may have considered previous STS versions "too taunting". :blink:

 

This update includes the "Footer" patch, as well as the "Product info module v1.0.6" and "Index module v1.0.3" updates, integrated into one seamless install. We can all thank Chris (Rigadin2) for these fine updates! I have only taken these updates and bundled them into one seamless install package, along with easy to understand documentation and additional templates for your convenience.

 

STS v4.2 is an official release of the Simple Template System.

 

Why this new version 4.2?

STS 4.1 has seen three major changes and a few bug fixes since its release back in April 2006. Without this update, in order to install a stable STS v4.1, new users would have to download four different files as well as make some additional changes to a few of the PHP files in their store. With version 4.2, installation is as simple as downloading this complete package and following the instructions toward one seamless installation. Instructions for manual installation are still available for those who have a heavily modified store.

 

If you have kept up with all of the fixes mentioned in the support forum as well as the patches and new modules uploaded onto the contribution site, then you already have version 4.2, without the updated documentation and additional templates of course.

You can download it here:

http://www.oscommerce.com/community/contributions,1524

Enjoy,

Bill Kellum

I have integrated both STS v4.2 and HTC 2.5.9 together into one seamless install if anyone is interested. I haven't posted it yet because I have not updated the documentation for the HTC.

 

I can make it available on my website until then if anyone would like to use it. I have used it on several test sites so far and the install consisted only of uploading files and running a sql script from within your browser. You do not have to manually change any code at all.

 

This works for new users to STS and HTC. I have made a few tests for users who have recently upgraded to STS v4.2 using this install method and did not have any problems. The reason for creating this combo package is because installing the Header Tags Controller on it's own could be quite taunting and most give up or go to a different ecommerce package all together. Not a good idea since I feel osCommerce along with STS v4.2 and the Header Tags Controller is the best solution out there.

 

Anyway, let me know if anyone is interested,

 

Bill Kellum

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

It appears you may have STSv4 installed but you also installed two errant files (from Cally) that causes the issue that have described.

I have STS 4.1

 

Okay, what two errant files have I installed?

 

ALso, my newest problem is that category 26 with the url /catalog/index.php?cPath=26 prints out no template. There was a specific template for this category in /full/content/ but I deleted it. The page still comes up with no template and no content. I can't figure this one out.

Edited by ampleforth
Link to comment
Share on other sites

I'm trying to figure out where to find the formatting for the $categorybox in STS.

 

I have a site that's still not URL-live http://70.103.14.62/webshop/index.php/cPath/0.

 

I'm trying to remove the spacing under the Products listing (my html code) and where the listing starts.

 

Can someone point me to the file and location where this is generated? I have an index.php.html file that does not include any spacing at the top of that table cell.

 

Thanks.

Link to comment
Share on other sites

I'm trying to figure out where to find the formatting for the $categorybox in STS.

 

I have a site that's still not URL-live http://70.103.14.62/webshop/index.php/cPath/0.

 

I'm trying to remove the spacing under the Products listing (my html code) and where the listing starts.

 

Can someone point me to the file and location where this is generated? I have an index.php.html file that does not include any spacing at the top of that table cell.

 

Thanks.

 

Answered my own question. It wasn't space, it was actually the category heading of that info box. I didn't need the heading, so I killed it in the categories.php file by deleting this section:

 

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

Link to comment
Share on other sites

I found the contribution I was looking for and I know that it doesn't affect the sts_template, so nevermind! :blink:
What contribution did you use if you don't mind me asking?

 

-Bill Kellum

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

I have STS 4.1

 

Okay, what two errant files have I installed?

 

ALso, my newest problem is that category 26 with the url /catalog/index.php?cPath=26 prints out no template. There was a specific template for this category in /full/content/ but I deleted it. The page still comes up with no template and no content. I can't figure this one out.

Ampleforth, On the STS download page, there were two files from the user "Cally" (sorry Cally, I know this worked for you) that would cause double headers and other issues like you are describing.

 

I suggest that you use STS v4.2 and go from there. STSv4.2 has been updated with all the known bug fixes and has superb documentation included.

 

Hope this helps,

 

Bill Kellum

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

I have integrated both STS v4.2 and HTC 2.5.9 together into one seamless install if anyone is interested. I haven't posted it yet because I have not updated the documentation for the HTC.

 

I can make it available on my website until then if anyone would like to use it. I feel osCommerce along with STS v4.2 and the Header Tags Controller is the best solution out there.

 

Anyway, let me know if anyone is interested,

 

Bill Kellum

opps... I forgot to give the web address: http://www.soundsgoodpro.com/stsv4_2.htm

 

-Bill Kellum

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

I am using the test template and I've been experiencing a problem with the big image popup. It is showing the sts_template from test, instead of showing the popup window with the big picture. Is this normal behavior or a bug?
Check the HTML code at the top of your template.

 

It should look like this:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

The $headcontent tag actually pulls the javascript from your header.php file so it is necessary to have the code above. By the way, which version of STS are you using?

 

Hope this helps, Bill Kellum

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

Check the HTML code at the top of your template.

 

It should look like this:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

The $headcontent tag actually pulls the javascript from your header.php file so it is necessary to have the code above. By the way, which version of STS are you using?

 

Hope this helps, Bill Kellum

 

I am still having problems. Is there a way of bypassing the sts_template, so that I can use the original popup file? Any ideas?

 

I am using version 4.2, the last one from August 10.

Link to comment
Share on other sites

I am still having problems. Is there a way of bypassing the sts_template, so that I can use the original popup file? Any ideas?

 

I am using version 4.2, the last one from August 10.

To help out in the troubleshooting, did your pop up work before you upgraded? Do you have any other contributions installed?

 

Let us know, Bill Kellum

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

To help out in the troubleshooting, did your pop up work before you upgraded? Do you have any other contributions installed?

 

Let us know, Bill Kellum

 

Yes, it was working on the osCommerce alone and I have no other contributions installed.

 

I downloaded the latest osCommerce version that's online. When I finished installing STS 4.2 by copying the folders on top of the os clean install, the popup window was replaced by the default template. It actually says, "This is the default template".

Link to comment
Share on other sites

Yes, it was working on the osCommerce alone and I have no other contributions installed.

 

I downloaded the latest osCommerce version that's online. When I finished installing STS 4.2 by copying the folders on top of the os clean install, the popup window was replaced by the default template. It actually says, "This is the default template".

OK, we are getting somewhere now. Please post the HTML code of the template that you are using. I just did a test using a clean version of osCommerce 2.2 Milestone 2, (check your version of osCommerce by the way) and installed STS 4.2. I installed (enabled) the STS "Default" module and set to "true". I then setup my template folder to use the default "out of the box" "test" folder and used the "sts_template.html" in the "test" folder.

 

The popup image worked fine. There must be something that you did with the template that is causing some problems so lets take a look at your HTML and go from there.

 

-Bill Kellum

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

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