Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Someone had told me to download and install STS to make the customization of osCommerce really easy. I have installed STS but have not idea as to how to use the program. I read through the instructions but it really doesn't say what I need to do.

 

Any help would be appreciated. I want to be able to customize my store front easily without modifying a bunch of .php files in diffent places.

 

Thanks in adavance.

Link to comment
Share on other sites

Someone had told me to download and install STS to make the customization of osCommerce really easy. I have installed STS but have not idea as to how to use the program. I read through the instructions but it really doesn't say what I need to do.

 

Any help would be appreciated. I want to be able to customize my store front easily without modifying a bunch of .php files in diffent places.

 

Thanks in adavance.

 

 

All you need to know is how to create a web page using HTML. Other than that, the documentation does a good job explaining how that works. Be sure to read the STS User Manual and each of the documents included in the "docs" folder that came with the contribution.

 

Also:

Important Posts for the STS newbie:

 

Post #3755: http://forums.oscomm...p;#entry1226986

 

Post #4326: http://forums.oscomm...p;#entry1303555

 

Post #4974: http://forums.oscomm...p;#entry1361366

 

Post #3772: http://forums.oscomm...p;#entry1227769

 

Post #3757: http://forums.oscomm...p;#entry1227006

 

Please review the above for insight on how the Simple Template System allows you to make templates for pages, categories, home page, products and infoboxes.

 

Hope this was helpful,

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

Someone had told me to download and install STS to make the customization of osCommerce really easy. I have installed STS but have not idea as to how to use the program. I read through the instructions but it really doesn't say what I need to do.

 

Any help would be appreciated. I want to be able to customize my store front easily without modifying a bunch of .php files in diffent places.

 

Thanks in advance.

 

I am in the same boat.

 

I have read and read but I just do not understand what to do.

 

I searched for column_left.php as I wish to add a link to my forum. But found 5 versions.

 

One I disregarded as its in another install on my server but

 

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\includes

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\admin\includes

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\includes\modules\sts_inc

D:\Documents and Settings\Andys\My Documents\mistatees-rc\upload\templates\freeoscommerce_086\content\index

 

SO I have not got a clue which one needs altering and more importantly why> ?

Link to comment
Share on other sites

I am in the same boat.

 

I have read and read but I just do not understand what to do.

 

I searched for column_left.php as I wish to add a link to my forum. But found 5 versions.

 

One I disregarded as its in another install on my server but

 

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\includes

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\admin\includes

D:\Documents and Settings\Andys\My Documents\mistatees-rc\catalog\includes\modules\sts_inc

D:\Documents and Settings\Andys\My Documents\mistatees-rc\upload\templates\freeoscommerce_086\content\index

 

SO I have not got a clue which one needs altering and more importantly why> ?

 

STS will not do everything for you, especially teach you how osCommerce functions. The more you understand the "flow" of osC, then you begin to realize the power and added features that STS brings.

 

In a nut shell, osC has two parts, the backend (admin) and the front end (the catalog or what the user sees). It should be obvious that you would not be editing files in the admin to change the look of the front end. Most files in the root and in the includes folder are files that are displayed in the front end.

 

By the way, if you are using STS and you need to something as simple as placing a link to a page, you should be placing that link in your template pages. Otherwise, why would you be using STS to begin with?

 

Basics of STS:

STS uses variables (tags/placeholders) such as $breadcrumbs$ to bring osC functionality and content into your HTML tempaltes pages. STS comes loaded with each of the stock osC functions as well as provides the means for creating your own custom tags for whatever purpose.

 

STS allows you to create a single template to be used for your entire site or really get down and dirty and create page specific templates for each category, product, infobox, home page, etc.

 

In each of these templates, you are free to add any type of web technology such as Flash, JavaScript, HTML, text, images, etc.

 

Use the provided examples to give you an idea on how things are acomplished. I suggest the "multiple" template set as, although it may not be the most pleasing to the eyes, it does a good job of showing how robust you can get using STS. Take a look at the neat header and footer templates and see what I mean.

 

thumbsup.gif The sky is the limit. Just experiment with it and you be up and running in a short time.

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

Hello,

 

Forgive me as I know this has been asked before (I've been searching for hours), but I haven't yet found the answer.

 

I'm using STS 4.6 in multipage mode using the index module etc, the plan it to totally re-skin the whole site. I need to completely remove all html tables, rows, cell etc from everything.

 

What is the best way to go about this in the category/products page (what appears when you click on a category)? In other words, how can I skin what is getting defined for $content$?

 

I see that some of it is in index.php and I could do what is needed in there, but then somewhere along the way STS is putting some things in its own table (or it's happening someplace else as the outer table that is appearing is not in index.php).

 

Any ideas?

 

I'm new to OSC, but I'm slowly getting it. I have STS serving up my custom cat pages, figured out how to do the infoboxes to get rid of all the default html etc but these product/category listings seem like a different animal.

 

TIA!

Link to comment
Share on other sites

Hello,

 

Forgive me as I know this has been asked before (I've been searching for hours), but I haven't yet found the answer.

 

I'm using STS 4.6 in multipage mode using the index module etc, the plan it to totally re-skin the whole site. I need to completely remove all html tables, rows, cell etc from everything.

 

What is the best way to go about this in the category/products page (what appears when you click on a category)? In other words, how can I skin what is getting defined for $content$?

 

I see that some of it is in index.php and I could do what is needed in there, but then somewhere along the way STS is putting some things in its own table (or it's happening someplace else as the outer table that is appearing is not in index.php).

 

Any ideas?

 

I'm new to OSC, but I'm slowly getting it. I have STS serving up my custom cat pages, figured out how to do the infoboxes to get rid of all the default html etc but these product/category listings seem like a different animal.

 

TIA!

 

This has always been an issue with osCommerce. Be sure to look at the PHP scripts in the catalog/includes/modules folder as these are the scripts that are called in the middle content area besides what is being brought in from the index.php file.

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

This has always been an issue with osCommerce. Be sure to look at the PHP scripts in the catalog/includes/modules folder as these are the scripts that are called in the middle content area besides what is being brought in from the index.php file.

 

Thanks Bill, that's helpful (and I'm sure will be useful in the future), unfortunately that doesn't seem to be my problem. I think its something in sts_strip_content_tags or the like, it appears to be the result of a combination of things though. I'm starting to get the feeling that trying to have 100% control over the entire content area in the product listing is going to be next to impossible?

 

If I look at index.php around line 237, I can see the product list start, it looks like

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
		<?php echo HEADING_TITLE; ?>
		</td>

 

If I try to comment out all that HTML then really weird things happen where my starting comment is gone but the ending is left. It looks like sts_strip_content_tags is getting rid of that 1st cell and table, so instead I have to do

 

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <!--
  <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
	-->
		<?php echo HEADING_TITLE; ?>
	<!--
		</td>
	-->

 

That at least gets comments out what I want from index.php, but something someplace is still adding a table around things because what I end up with is

 

<!-- start Index content //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
     <!--
  <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
	-->

		Let's See What We Have Here		
               <!--
		</td>
	-->

 

I can't figure out for the life of me where or how that block of code is getting that top table tag, although it seems like the:

<!-- start Index content //-->

Is coming from "sts_strip_content_tags" but as I remember (in one of the dozens attempts I've made to track this down) I think the table is in there already when $tmpstr is passed to that function, however its not in index.php and there is nothing I can see before that code section in index.php that would draw it out.

 

Sooo frustrating!!!!!! :)

Link to comment
Share on other sites

Thanks Bill, that's helpful (and I'm sure will be useful in the future), unfortunately that doesn't seem to be my problem. I think its something in sts_strip_content_tags or the like, it appears to be the result of a combination of things though. I'm starting to get the feeling that trying to have 100% control over the entire content area in the product listing is going to be next to impossible?

 

If I look at index.php around line 237, I can see the product list start, it looks like

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 	<tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
		<?php echo HEADING_TITLE; ?>
		</td>

 

If I try to comment out all that HTML then really weird things happen where my starting comment is gone but the ending is left. It looks like sts_strip_content_tags is getting rid of that 1st cell and table, so instead I have to do

 

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <!--
 	<tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
	-->
		<?php echo HEADING_TITLE; ?>
	<!--
		</td>
	-->

 

That at least gets comments out what I want from index.php, but something someplace is still adding a table around things because what I end up with is

 

<!-- start Index content //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
     <!--
 	<tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading">
	-->

		Let's See What We Have Here		
               <!--
		</td>
	-->

 

I can't figure out for the life of me where or how that block of code is getting that top table tag, although it seems like the:

<!-- start Index content //-->

Is coming from "sts_strip_content_tags" but as I remember (in one of the dozens attempts I've made to track this down) I think the table is in there already when $tmpstr is passed to that function, however its not in index.php and there is nothing I can see before that code section in index.php that would draw it out.

 

Sooo frustrating!!!!!! smile.gif

 

Maybe a simple solution for you:

 

http://www.oscommerce.com/forums/index.php?showtopic=58541&st=4960&p=1361408entry1361408

 

Also more about content templates:

http://www.oscommerce.com/forums/index.php?showtopic=295660&st=4320&p=1303553entry1303553

 

About osC to CSS conversion using STS:

http://addons.oscommerce.com/info/3980

 

More about osC to CSS conversion:

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

 

 

The idea of sts_strip_unwanted_tags is to remove the leading and trailing <tr><td> that are present in all original infoboxes. I don't see any reason to use this function when using infoboxes templates.

 

This function is called when you stop (or restart) the capture. Example with category box:

 

$sts->restart_capture ('categorybox', 'box');

The second parameter, 'box', tells STS that this is an infobox so leading and trailing <tr><td> must be removed, and the function must be called. Maybe STS should call this function only if templates are not used? This is something to try. In the meantime, you can try to remove 'box' parameters, see sts_column_left.php .

 

 

 

 

 

 

 

 

 

 

 

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

Maybe a simple solution for you:

 

http://www.oscommerce.com/forums/index.php?showtopic=58541&st=4960&p=1361408entry1361408

 

Also more about content templates:

http://www.oscommerce.com/forums/index.php?showtopic=295660&st=4320&p=1303553entry1303553

 

About osC to CSS conversion using STS:

http://addons.oscommerce.com/info/3980

 

More about osC to CSS conversion:

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

 

 

The idea of sts_strip_unwanted_tags is to remove the leading and trailing <tr><td> that are present in all original infoboxes. I don't see any reason to use this function when using infoboxes templates.

 

This function is called when you stop (or restart) the capture. Example with category box:

 

$sts->restart_capture ('categorybox', 'box');

The second parameter, 'box', tells STS that this is an infobox so leading and trailing <tr><td> must be removed, and the function must be called. Maybe STS should call this function only if templates are not used? This is something to try. In the meantime, you can try to remove 'box' parameters, see sts_column_left.php .

 

Thanks for the extra info Bill,

 

I don't think that 1st option would do it, I don't know how I could define everything with references like that for it to work. It might be possible but I can't wrap my head around it.

 

The 2nd thing I would love to do, but again I can't figure out how to make a content template out of the index page, I tried to create one and point the template pointer in the index.php page but I could never get the content area to show up. Maybe it will become a little clearer when/if I get down to the product level and use it for the details page.

 

As far as those other 2 modules, I saw them and it seemed like only one of them really had changed things but then it also said that in a lot of things there was still a mix of old and new. I had the impression that it might get me closer but wouldn't be the end all.

 

Thanks for the bit about the infoboxes, I'm not having any issues with those as it was the first thing I tackled (although that was probably what I should have done as what I did was make a new function in includes/classes/boxes called "nonTableBox" and used that everplace that had a call to "tableBox"). But that did lead me to sts_index.php where I found

 

 function replace (&$template) {
   $template['content']=sts_strip_content_tags($template['content'], 'Index content');
 }

 

Commenting that out at least keeps the content area intact as it is in index.php, so now at least I can hack away at index.php to change the look and feel.

 

I feel like a train going down the tracks to oblivion, hackity, hackity, hackity.... No updates for me as everything is tooo altered :)

 

Thanks!

Link to comment
Share on other sites

Hey gang,

 

Weird problem I'm having. I've used STS before to do OSCommerce redesigns, but this is the first one I've done where I've had a problem like this. I have images that bring you to certain subcategories of the catalog. When using $urlcat_67_33$ (linking to a subcategory) the url shows exactly as the variable code ($urlcat_67_33$). I've removed the comments in sts_user_code.php - but still no go. Any ideas what I'm missing here?

Link to comment
Share on other sites

Hey gang,

 

Weird problem I'm having. I've used STS before to do OSCommerce redesigns, but this is the first one I've done where I've had a problem like this. I have images that bring you to certain subcategories of the catalog. When using $urlcat_67_33$ (linking to a subcategory) the url shows exactly as the variable code ($urlcat_67_33$). I've removed the comments in sts_user_code.php - but still no go. Any ideas what I'm missing here?

 

 

Did you enable STSv3 compatibility in the STS Default Module?

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

Hello.

I want to add KISSMT as the SEO Metatags in some stores working with STS

 

Althought I have done some pretty things with sts, and usercode, I am unable to know how and where can I replace the TITLE, for the needed line

 

<title> . TITLE . </title>

 

for

 

<?php include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; ?>

 

Can somebody help me or address me in the right direction?

Thank you.

Juan

Link to comment
Share on other sites

I am trying to install STS on my site. Of course I have done an entire back up first:)

 

My question is this where it states in the instructions:

 

2.6.2 includes/application_bottom.php

 

Add at the beginning:

 

// START STS 4.4

if ($sts->display_template_output) {

$sts->stop_capture();

include DIR_WS_MODULES.'sts_inc/sts_display_output.php';

}

//END STS 4.4

 

 

The beginning of this file starts:

 

<?php

/*

$Id: application_bottom.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// close session (store variables)

tep_session_close();

 

 

After I add the STS Scripting should it now look like this?:

 

<?php

// START STS 4.4

if ($sts->display_template_output) {

$sts->stop_capture();

include DIR_WS_MODULES.'sts_inc/sts_display_output.php';

}

//END STS 4.4

/*

$Id: application_bottom.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// close session (store variables)

tep_session_close();

Link to comment
Share on other sites

i have tried to manually install the files multiple times...i'm able to access it in admin and install the default module using the single template folder...that installs fine, i tried to modify includes/sts_templates/single/sts_template.html file but it seems like oscommerce isn't using that template.

Link to comment
Share on other sites

I've been using STS for a few years now, on about 3 stores. It works great and I love the contribution, one of the best out there IMHO.

 

Our sites have been pretty heavily modified with about 14-15 or so contributions and all are working ok.

 

However, I need to streamline the checkout process. Add a Purchase Without Account or Single Page checkout or something like that. I'm getting the feeling that customers that have to log in and create account are being lost in the shuffle and not completing the checkout process.

 

So, my question is this. Which is the best, compatible single page or purchase without having to create an account checkout process to use with STS? I'm thinking PWA (Purchase Without Account) as some of the other ones seem to either not work with STS or have a lot of bugs, etc.

 

Anybody use a quick checkout, single page checkout or purchase without account contribution with success and minimal troubles with STS?

 

I'd greatly appreciate your response(s)!

 

Thanks,

 

Rich

Link to comment
Share on other sites

I've been using STS for a few years now, on about 3 stores. It works great and I love the contribution, one of the best out there IMHO.

 

Our sites have been pretty heavily modified with about 14-15 or so contributions and all are working ok.

 

However, I need to streamline the checkout process. Add a Purchase Without Account or Single Page checkout or something like that. I'm getting the feeling that customers that have to log in and create account are being lost in the shuffle and not completing the checkout process.

 

So, my question is this. Which is the best, compatible single page or purchase without having to create an account checkout process to use with STS? I'm thinking PWA (Purchase Without Account) as some of the other ones seem to either not work with STS or have a lot of bugs, etc.

 

Anybody use a quick checkout, single page checkout or purchase without account contribution with success and minimal troubles with STS?

 

I'd greatly appreciate your response(s)!

 

Thanks,

 

Rich

Link to comment
Share on other sites

Actually, just installed PWA without any problems on a test store and seems to be working ok so far with STS.

 

But I guess what I really needed is a way to cut down on the amount of 'clicks' that occur in checkout.

 

What are some opinions on the best Easy 1 or 2 Page checkout that works with STS? (and I guess, the PWA contrib too.)

Link to comment
Share on other sites

Bkellum, I sure hope you have your ears on today. :) I've been a fan and active user of STS for a long time now. I don't think I could survive without STS--it is what makes each site stand out in terms of usability and attractive appearance. I've been able to do some minor tinkering with it to accommodate various businesses including a wholesale site and a bookseller.

 

I have a site that I want to carry to some sort of new level, and I think STS will be the way to get there. My inspiration is the official site for purchasing Coach handbags and other products (coach.com). It's done in Flash, and I don't have the server-side stuff that a Flash shopping cart demands. If you go to a product category there, for example "new arrivals," the products are laid out in a simple grid order with photos--that's just fine. Click on a product, and a popup window arises. It's certainly got the same basic info as product_info.php, but it's beautifully presented. It's the window that gives it such a clean, easy-to-use look.

 

I think it should be possible to replicate something like that using Thickbox, and I'm wondering if the various STS templates could somehow be worked around to incorporate a Thickbox presentation. I don't have a clue where to start. This is really just the beginnings of a germ of an idea.

 

Do you have any suggestions, or could you start me down the right path?

 

Thanks as always,

Anne

Link to comment
Share on other sites

Bkellum, I sure hope you have your ears on today. smile.gif I've been a fan and active user of STS for a long time now. I don't think I could survive without STS--it is what makes each site stand out in terms of usability and attractive appearance. I've been able to do some minor tinkering with it to accommodate various businesses including a wholesale site and a bookseller.

 

I have a site that I want to carry to some sort of new level, and I think STS will be the way to get there. My inspiration is the official site for purchasing Coach handbags and other products (coach.com). It's done in Flash, and I don't have the server-side stuff that a Flash shopping cart demands. If you go to a product category there, for example "new arrivals," the products are laid out in a simple grid order with photos--that's just fine. Click on a product, and a popup window arises. It's certainly got the same basic info as product_info.php, but it's beautifully presented. It's the window that gives it such a clean, easy-to-use look.

 

I think it should be possible to replicate something like that using Thickbox, and I'm wondering if the various STS templates could somehow be worked around to incorporate a Thickbox presentation. I don't have a clue where to start. This is really just the beginnings of a germ of an idea.

 

Do you have any suggestions, or could you start me down the right path?

 

Thanks as always,

Anne

 

 

It appears that site really takes advantage of a lot of Ajax scripts. Really nice.

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

Are there other pages that I need to edit in order to get other contributions to work with STS? I am currently trying to add Ajax Buy Now and Ajax Shopping Cart to my site. I have installed them both via the install instructions, both do not work. I click to add a product to my cart it takes me right to the shopping cart page, and the Ajax Shopping Cart, well it never takes me to the shopping cart I get a 403 error you don't have permission to access /ajax_checkout.php on this server. Thinking this had to do with permissions I changed the permissions which did not work.

 

I uploaded my site to here if anyone wanted to take a look and see the error: My Site

Edited by nealc

I am currently just learning osCommerce and PHP, but am always willing to help out.

 

Have successfully installed the following: Discount Coupons, UPS shipping module, Ultimate SEO URL's, Easy Meta Tags for SEO 1.0, Google XML Sitemap SEO v1.3, HTML Editor for Email and Newsletters.

Link to comment
Share on other sites

Hello Forum,

 

first: Thanks for the STS Template System - its great.

 

Only one thing doesent work for me.

The Product_info Tempalte.

 

If I click on a product in my categories, the product_info opens

in the default Template (sts_template.html).

 

But If I add the Product to the shopping cart and click

the Product Link displayed IN the shopping_cart.php - it takes me to the choosen Product_info Template (thats what I want).

Even if I switch off "Use template for product info page" in admin it takes me to the Product_info Template if

I click the Product Link displayed IN the shopping_cart.php.

 

What happens here - and why?

 

I`m very thankfull for Tips & Help

 

Btw. I`m also using Header_Tags_Controller and SEO Ultimate URL 5

 

Greetz

Frank

Edited by Frank74
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...