Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I'm using STS and it is very easy to use, I have manage to build a very nice site with it :lol: .

 

The only module that I have installed in the administrator area is the Default module all the other are disable and I'm using $content place holder to display the main content of the web page.

 

Now I want to modify the Product listing page, but I didn't find any information about this part, the page is displaying the original oScommerce template for Product listing :blink:

 

Is possible with STS to modify b]Product listing[/b] page ? :blush:

 

Thanks

Share this post


Link to post
Share on other sites

Hi Antonio,

 

No it is not. I had this probem as well. I downloaded this contrib http://www.oscommerce.com/community/contributions,5421 and it worked sweet. He gives you 7 different templates... just upload the one you want. It was even in enough html for me to understand and modify...

 

GL, it is a great one!

 

Denz

 

PS... still cannot get the cart to work... does it work for everyone else.. what have I done!?!?!?!?!?!

Share this post


Link to post
Share on other sites
Denz

 

PS... still cannot get the cart to work... does it work for everyone else.. what have I done!?!?!?!?!?!

The addtocart placeholder is meant to be used in a product_info content template.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
I'm going to give you a real time saving tip....

If you use Internet Explorer, then download this free tool from Microsoft:

 

http://www.microsoft.com/downloads/details...;displaylang=en

 

The link above will take you to Microsoft's Download of Internet Developer's Toolbar. This little utility will let you know the CSS class, table, cell, etc. of every element on your web page. I just used it on your page and found out the CSS class of that border around your infoboxes in less time than it took for the page to load.

 

Hope this helped you out,

 

Well, it's sure helped me out. Neat little tool...thanks for bringing that up!

Share this post


Link to post
Share on other sites
Well, it's sure helped me out. Neat little tool...thanks for bringing that up!

 

Isn't it though! :thumbsup: It saves so much time from having to hunt something down in the source code when all you have to do is "click" on it. :rolleyes:


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
I have read over the manual several times but just don't get it,

 

There is a manual??...where??...

because i've been searching this forum and searching the knowledge base, i have no clue on how this STS thing works...apparently it is not that simple to some :'(

Share this post


Link to post
Share on other sites
There is a manual??...where??...

because i've been searching this forum and searching the knowledge base, i have no clue on how this STS thing works...apparently it is not that simple to some :'(

 

:lol: Sorry, but I really do not know how to make it any easier....

 

The contribution comes with a "doc" folder. Hmmmm...that would be short for "documents". Inside that folder is the STS User Manaul, STS Module configuration guides and the Install.html installation instructions.

 

In the latest version of STS (4.5.8), there is a Readme.txt file in the root of the contribution that points to the the doc folder as well.

 

Hope this has helped, :-


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi, Im having some difficulties with my categories page. The body of my index page is fine but when i click a categorie from the left nav, the categories and the box that has new products decreases in width and align's to the left, Does anyone know where the problem could be? Do i have to modify the code where the default page content is? Where can i find this script?

 

thanks

Share this post


Link to post
Share on other sites
:lol: Sorry, but I really do not know how to make it any easier....

 

The contribution comes with a "doc" folder. Hmmmm...that would be short for "documents". Inside that folder is the STS User Manaul, STS Module configuration guides and the Install.html installation instructions.

 

In the latest version of STS (4.5.8), there is a Readme.txt file in the root of the contribution that points to the the doc folder as well.

 

Hope this has helped, :-

 

 

Don't be sorry...i'm a complete cow! :blink:

The type that will say something is broken, than throw it on the floor in hopes it will magically work again.

 

In this case...i did not sleep last night trying to figure this sts thing out, and am NOW reading the manual that is comprehensible and is indeed just sitting in the Docs folder (which is basically telling me, what took me about 2 days to discover on my own).

 

Thank you very much for an excellent and easy contribution :thumbsup: :thumbsup:

Share this post


Link to post
Share on other sites
Don't be sorry...i'm a complete cow! :blink:

The type that will say something is broken, than throw it on the floor in hopes it will magically work again.

 

In this case...i did not sleep last night trying to figure this sts thing out, and am NOW reading the manual that is comprehensible and is indeed just sitting in the Docs folder (which is basically telling me, what took me about 2 days to discover on my own).

 

Thank you very much for an excellent and easy contribution :thumbsup: :thumbsup:

What is funny (or sad) is that at one time we were all right where you are at. :blush:

Hope we can help you along here in the forums. Welcome by the way. :D


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Has any one got any ideas? I think i need to make adjustments to the table sizes in the default script but im not sure which is the default script, I am using the latest version of STS V4.5.8.

 

thanks

Share this post


Link to post
Share on other sites

Can anyone help me with the <!--$headcontent--> function, i'm a bit stumped.

 

I would like to add a few meta tags etc to all the pages on my site:

 

<meta name="description" content=""/>

<meta name="keywords" content=""/>

<meta name="author" content=""/>

<meta name="robots" content=""/>

<meta name="language" content=""/>

<link rel="icon" href=""/>

<link rel="SHORTCUT ICON" href=""/>

 

The manual says <!--$headcontent--> is the "tag to put in the <head> of your template. It contains the charset of the page, meta tags, base href and javascript taken out of header.php."

 

I open 'header.php' and can't find where to put the above meta tags and other info in order for them to show up on every page using the <!--$headcontent--> tag?

 

Any help much appreciated!

 

Alex.

Share this post


Link to post
Share on other sites

I've made changes to my install but you might try looking at general.php in your STS module folder. There are variables set up there.

 

Can anyone help me with the <!--$headcontent--> function, i'm a bit stumped.

 

I would like to add a few meta tags etc to all the pages on my site:

The manual says <!--$headcontent--> is the "tag to put in the <head> of your template. It contains the charset of the page, meta tags, base href and javascript taken out of header.php."

 

I open 'header.php' and can't find where to put the above meta tags and other info in order for them to show up on every page using the <!--$headcontent--> tag?

 

Any help much appreciated!

 

Alex.

Share this post


Link to post
Share on other sites

A quick solution is to open includes/classes/sts.php

around line 165

	$this->template['headcontent'] = '';
$this->template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" />' . "\n"; 
$this->template['headcontent'] .= $this->template['headertags']. "\n";
$this->template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '" />' . "\n";

 

Just add your meta tags after this code..

I.e

	$this->template['headcontent'] = '';
$this->template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" />' . "\n"; 
$this->template['headcontent'] .= $this->template['headertags']. "\n";
$this->template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '" />' . "\n";
$this->template['headcontent'] .= '<meta name="description" content=""/>' . "\n";
etc...

 

A better solution would be to install a contrib for header tags.

There's a few to choose from, but I can recommend Header Tags for novices. It's fast and clean, includes install for STS and very easy to adjust after your own demands.

Share this post


Link to post
Share on other sites
Can anyone help me with the function, i'm a bit stumped.

 

I would like to add a few meta tags etc to all the pages on my site:

 

 

 

The manual says is the "tag to put in the <head> of your template. It contains the charset of the page, meta tags, base href and javascript taken out of header.php."

 

I open 'header.php' and can't find where to put the above meta tags and other info in order for them to show up on every page using the tag?

 

Any help much appreciated!

 

Alex.

 

Alex,

Install the Header Tags Controller contribution per the installation step by step that I provided (in my signature below). With this contribution, you add your metatags in the osC admin and then STS will use the headcontent tag to pull them all in and automatically place them on the appropriate page. Very easy, simple , automatic.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Alex,

Install the Header Tags Controller contribution per the installation step by step that I provided (in my signature below). With this contribution, you add your metatags in the osC admin and then STS will use the headcontent tag to pull them all in and automatically place them on the appropriate page. Very easy, simple , automatic.

 

Ah ha excellent. Downloading now, thanks.

Share this post


Link to post
Share on other sites
Has any one got any ideas? I think i need to make adjustments to the table sizes in the default script but im not sure which is the default script, I am using the latest version of STS V4.5.8.

 

thanks

Are you modifying a purchased template (such as from Template Monster) or is this your own HTML template?

 

If it is a purchased template, then you would need to edit either the specific PHP script page or the stylesheet to fix the problem. If you are seeing this on all of your pages, then it is most likely in the index.php file.

 

If you are modifying your own template and all you have is STS installed on your osC shop, then I would say that your issue is most likely a table or div in your template itself and also the stylesheet.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

I am still having problems with the CSS.

 

The main CSS for links is:

 

A {
 color: #0066FF;
 text-decoration: none;
}

A:hover {
 color: #FF0000;
 text-decoration: none;
}

 

I have created this code for the 'footer' CSS:

 

A.footer { 
 color: #FFFFFF; 
}

A.footer:hover {
 color: #FF0000;
}

 

but the footer links are still the colour of the main links (#0066FF) instead of #FFFFFF

 

Why doesn't this work? It works for headerNavigation:

 

TR.headerNavigation {
 background-image:url(../images/button.jpg);
 background-repeat:repeat-x;
}

TD.headerNavigation {
 font-family: Trebuchet MS;
 font-size: 14px;
 background-image:url(../images/button.jpg);
 background-repeat:repeat-x;
 color: #ffffff;
 font-weight:bold;
}

A.headerNavigation { 
 color: #FFFFFF; 
}

A.headerNavigation:hover {
 color: #FF0000;
}

 

:wacko:

Edited by paramaniac

Share this post


Link to post
Share on other sites

Ok so i have www.dacapoclothingco.com/browse i want my products to appear right there on that main page i have $content there in a table under the logo. i just dont understand what i need to do to get the products to display there thanks really stuck :/, phil

Share this post


Link to post
Share on other sites

I am having trouble with checkout_shipping.php. I already searched the thread and this problem doesnt seem to have come up before. Basically, it's like STS isnt working with this page, although some parts of the template do show up it seems most of it is printed out as $cartbox$ and whatever other calls are used for each component.

 

Attached is an example output I am getting. Note there are no error messages, the page just isnt displaying. Excuse the areas I blocked out, and the mismatched colors, the sites still being worked on.

 

05e81e2340776.gif

Click to Enlarge.

Share this post


Link to post
Share on other sites

Well, this one has me bumfuddled! I can't seem to get the $imagesmall or $product_popup to display on the product_info.php page. I'm not using any type of special product_info.php template for different product pages.... they are all the same.

 

If I put $imagesmall or $product_popup then I can actually see the words '$imagesmall' or '$product_popup' on the output.

 

Any suggestions? It's the only bug left.

 

Many thanks.

Share this post


Link to post
Share on other sites
Well, this one has me bumfuddled! I can't seem to get the $imagesmall or $product_popup to display on the product_info.php page. I'm not using any type of special product_info.php template for different product pages.... they are all the same.

 

If I put $imagesmall or $product_popup then I can actually see the words '$imagesmall' or '$product_popup' on the output.

 

Any suggestions? It's the only bug left.

 

Many thanks.

 

Did you put the closing $ on them? It should be $imagesmall$ and $product_popup$.

Share this post


Link to post
Share on other sites

Bill,

 

I've been running STS 4.5.8 and it workd great. Simple to install and my client loves the custom look that it gives osCommerce. I have been looking through the forum, and cannot seem to find the answer I am looking for. Sorry if I missed it and am duplicating a question.

 

I have been researching the <!--$headcontent--> tag for the templates to try and figure out how I can keep it from inserting the <title></title> tag into the file. My site is very small and focuses on one product. I would like the ability to statically change the meta and title tags on each page. I have created an STS template for every page in the site.

 

If I insert a title tag into the sts template file, I get to title tags in the source code upon viewing the source from a web browser. If I remove the <!--$headcontent--> tag from the template I lose a lot of needed information. With the <!--$headcontent--> tag inserted I get the store's title from the english.php file.

 

So, can you please tell me if there is a simple way to prevent the <!--$headcontent--> tag from inserting a <title></title> tag?

 

Thanks a bunch,

 

-Jim

Share this post


Link to post
Share on other sites
Bill,

 

I've been running STS 4.5.8 and it workd great. Simple to install and my client loves the custom look that it gives osCommerce. I have been looking through the forum, and cannot seem to find the answer I am looking for. Sorry if I missed it and am duplicating a question.

 

I have been researching the tag for the templates to try and figure out how I can keep it from inserting the <title></title> tag into the file. My site is very small and focuses on one product. I would like the ability to statically change the meta and title tags on each page. I have created an STS template for every page in the site.

 

If I insert a title tag into the sts template file, I get to title tags in the source code upon viewing the source from a web browser. If I remove the tag from the template I lose a lot of needed information. With the tag inserted I get the store's title from the english.php file.

 

So, can you please tell me if there is a simple way to prevent the tag from inserting a <title></title> tag?

 

Thanks a bunch,

 

-Jim

Jim, first off I would strongly suggest that you install and use the Header Tags Controller contribution to add/edit all of your tags for each page.

 

But, to answer your question, it can be done in a couple different ways.

  1. First option:
    Comment out headcontent define regarding headertags in catalog/includes/classes/sts.php:
    Find the following and comment it out:
    	$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";;


    It would look like this:

    //	$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";;


  2. Second option:
    Comment out the headertags define in catalog/includes/modules/sts_inc/general.php:
    Find the following and comment it out:
    	$sts->template['headertags']= "<title>" . TITLE ."</title>";


    It would look like this:

    //	$sts->template['headertags']= "<title>" . TITLE ."</title>";


Hope this helped you out,


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Jim, first off I would strongly suggest that you install and use the Header Tags Controller contribution to add/edit all of your tags for each page.

 

But, to answer your question, it can be done in a couple different ways.

  1. First option:
    Comment out headcontent define regarding headertags in catalog/includes/classes/sts.php:
    Find the following and comment it out:
    	$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";;


    It would look like this:

    //	$this->template['headcontent'] = $this->template['headcontent'].$this->template['headertags']. "\n";;


  2. Second option:
    Comment out the headertags define in catalog/includes/modules/sts_inc/general.php:
    Find the following and comment it out:
    	$sts->template['headertags']= "<title>" . TITLE ."</title>";


    It would look like this:

    //	$sts->template['headertags']= "<title>" . TITLE ."</title>";


Hope this helped you out,

 

Bill, it never ceases to amaze me as to how quickly you respond. Thanks!

 

I would be interested in the Header Tags Controller contribution. Do you by chance have a link so I make sure I get the right one to use with STS4?

 

Thanks a bunch,

 

-Jim

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×