Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I like the looks of your site. Good Job! -Bill Kellum

 

 

 

Thanks Bill, I really appreciate the compliment. I ws hoping to be able to use this as an STS template however it is proving more complicated that I first thought. Unfrotunately, most of it is hard coded and willnot allow for percentages to let it flex as can be done with tables. It is rather easy to edit now that I've documented almost all the css, at least I'm figuring out how it is put togeather.

 

 

 

I'm thinking that when I port this over to the other page with sts 4.2 I'm going to be in for some real fun.

 

 

 

enough of my rambleing

 

 

 

Later - Guy

Share this post


Link to post
Share on other sites

OK here is one of th e big problems that seems to be associated with the process.

 

 

 

If I try to click a product image I get this link

 

 

 

java script:popupWindow('http://www.rcxjets.com/catalogold/popup_image.php?pID=28')

 

 

 

Seems as though the rapper is killing the popup and not generating the correct link.

 

 

 

Is this the JavaScript killing the code for the link?

 

 

 

Strange.

Share this post


Link to post
Share on other sites

i just installed the latest with support for header tags. my header tags dont work all i get is this

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Collins Entertainment</title><base href="http://www.collinsent.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

 

<!-- end get_javascript(applicationtop2header) //-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

 

any ideas on how i can fix this

 

product page is this

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Collins Entertainment</title><base href="http://www.collinsent.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<!-- end get_javascript(applicationtop2header) //-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

Share this post


Link to post
Share on other sites
i just installed the latest with support for header tags. my header tags dont work all i get is this

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Collins Entertainment</title><base href="http://www.collinsent.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

 

<!-- end get_javascript(applicationtop2header) //-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

 

any ideas on how i can fix this

 

product page is this

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Collins Entertainment</title><base href="http://www.collinsent.com/">

 

<!-- start get_javascript(applicationtop2header) //-->

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

<!-- end get_javascript(applicationtop2header) //-->

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

Please post your template page html. It appears your headcontent tag is missing. Take a look at the blank template provided.

 

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

Share this post


Link to post
Share on other sites

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html $htmlparams#>

<head>

<!--$headcontent-->

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body>

<table style="width: 100%; background-color: rgb(0, 128, 0);" border="0"

cellpadding="3" cellspacing="0">

<tbody>

<tr class="header">

<td bgcolor="#CCCCCC"><img src="../../../images/collinssmall.gif" width="310" height="90"></td>

<td bgcolor="#CCCCCC">

<div align="right"></div>

</td>

</tr>

</tbody>

</table>

<font face="Arial, Helvetica, sans-serif" size="1"><br>

</font>

<table style="width: 100%; height: 22px; border-collapse:collapse" border="0" cellpadding="3"

cellspacing="0" bordercolor="#111111">

<tbody>

<tr class="headerNavigation">

<td><font face="Arial, Helvetica, sans-serif" size="1">$breadcrumbs#</font></td>

<td>

<div align="right"><font face="Arial, Helvetica, sans-serif"

size="1">$myaccountlogoff# | $cartcontents# | $checkout#</font></div>

</td>

</tr>

</tbody>

</table>

<font face="Arial, Helvetica, sans-serif" size="1"><br>

</font>

<table border="0" cellpadding="3" cellspacing="0" width="100%">

<tbody>

<tr>

<td valign="top" width="200"> <br>

</td>

<td align="center" valign="bottom"> </td>

<td rowspan="2" valign="top" width="160">

<p><font face="Arial, Helvetica, sans-serif" size="1">$cartbox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$maninfobox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$orderhistorybox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$bestsellersbox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$tellafriendbox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$reviewsbox#</font></p>

</td>

</tr>

<tr>

<td valign="top" width="200">

<p><font face="Arial, Helvetica, sans-serif" size="1">$categorybox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$whatsnewbox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$searchbox#</font></p>

<p><font face="Arial, Helvetica, sans-serif" size="1">$informationbox#</font></p>

</td>

<td valign="top">

<p>$content#</p>

</td>

</tr>

</tbody>

</table>

<br>

<table border="0" cellpadding="3" cellspacing="0" width="100%">

<tbody>

<tr>

<td>

<div align="center"><font face="Arial, Helvetica, sans-serif"

size="1">$footer_text#</font></div>

</td>

</tr>

</tbody>

</table>

<br>

<table border="0" cellpadding="3" cellspacing="0" width="100%">

<tbody>

<tr>

<td>

<div align="center"><font face="Arial, Helvetica, sans-serif"

size="1">$banner_only#</font></div>

</td>

</tr>

</tbody>

</table>

<font face="Arial, Helvetica, sans-serif" size="1"><br>

</font>

<p> </p>

</body>

</html>

Share this post


Link to post
Share on other sites
Did you insert the header_tags.php in the STS Default Module for the "files to include"?

Also, which installation path did you follow, the "clean_osc" or the "upload"?

Thanks,

 

Bill Kellum

 

dont gues i did if i dont know what your talking about lol. where do i look for that
From the installation manual: <H2 style="MARGIN: 12pt 0in 3pt">Configuration of HTC</H2><H2 style="MARGIN: 12pt 0in 3pt">Setup Header Tags Controller</H2><H2 style="MARGIN: 12pt 0in 3pt">Go to your admin panel, modules, STS.</H2>

 

For each module installed, add "headertags.php" (without the quotes) to the list of files to include.

 

 

For example:

  • <LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">For the default module, you have a parameter named "Files for normal template". By default it contains only "sts_user_code.php". If you modify this parameter to "sts_user_code.php;headertags.php", you will have Header Tags Controller working for all of the pages using the default template. <LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">For the index module, the parameter is called "Files for index.php template". <LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in">For "product_info module", there are 2 parameters:
    • "Files for normal template"
    • "Files for content template".

<H2 style="MARGIN: 12pt 0in 3pt">Auto Fill Tags</H2>

 

Go to admin->Header Tags->Fill Tags, click on Fill All for Categories, Manufacturers and Products and then click update. This will auto fill your title, meta description and meta keywords for all existing categories, manufacturers and products.

 

 

 

Also:

 

IMPORTANT - Set the permissions on the following files (If you do not know how to set permissions of specific files, ask your host):

  • <LI class=MsoNormal style="MARGIN: 5pt 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; mso-pagination: none; mso-layout-grid-align: none">catalog/includes/header_tags.php (CHANGE PERMISSIONS OF THIS FILE TO 755 OR 777)
  • catalog/includes/lanquages/english/header_tags.php (CHANGE PERMISSIONS OF THIS FILE TO 755 OR 777)

This should do the trick for you,

 

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

Share this post


Link to post
Share on other sites

how od i go about makeing the tepmlate attach to a new set of pages i am creating. i am creating a new service on my site and i want those pages to use the tempaltes but i need to chage it up a bit. where might i look for info on this?

Share this post


Link to post
Share on other sites
how od i go about makeing the tepmlate attach to a new set of pages i am creating. i am creating a new service on my site and i want those pages to use the tempaltes but i need to chage it up a bit. where might i look for info on this?
The STSv4.2 User Manual Chapter 3.6 explains in detail how to make templates for specific pages in your store. You can have as many templates as you do pages if you so desire.

 

-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

Share this post


Link to post
Share on other sites

Hey Bill, Just for S&G today I thought I would upload the template to my good shop with STS 4.2 installed. Low and behold everthing works great and even better than on the test site. All the rounded corners are there except for that little search down at the bottom and that may come out real quick. I'm also going to take out the little OCS graphics at the top as I did those just to see if I could.

 

 

 

Only problem now is the size of the breadcrumbs text on top but I know how to fix that and the popup image for the product image. I'm hot on it trail now and hope to have it resolved in the next day or so.

 

 

 

Here is a link to the main site

 

 

 

http://www.rcxjets.com

 

 

 

Seems very pleasing to me and Diffnately not and Out-of-the-Box OCS. STS 4.2 ROXS!

Share this post


Link to post
Share on other sites

I cant get sts 4.2 to show Warning messages in checkout (for example payment problems). Does anyone else have the same problem or an solution?

Edited by bombola

Share this post


Link to post
Share on other sites
Guest

Can someone help me PLEASE? See my posting above this (4 or so) about getting google analytics on my checkout_success.php page?

 

Maybe a seperate template for just that page? How would I do it? HELPPP!P!!!!

Share this post


Link to post
Share on other sites
Guest
Ok here is my problem..

 

I have STS installed.. and I want to run Google Analytics... I have it all working fine EXCEPT the checkout_success.php page.

 

It seems that STS alters the checkout_success.php page either partially or fully and the code I placed at the bottom and top of the page to call the final transaction data to send to google is not loaded.

 

Help!

 

http://www.revgear.com

This is what I am trying to add...

 

TO TOP OF PAGE

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onLoad="java script:__utmSetTrans()">

TO BOTTOM OF PAGE

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
<?php
// osCoders.biz - Analystics - start
	include(DIR_WS_MODULES . 'analytics/analytics.php');
// osCoders.biz - Analistics - end
?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

Create a separate template only for the checkout_success page and paste the Javascript into your <body> tag.

For the bottom page mod, just do it in your checkout_success.php script.

 

- Rigadin

Share this post


Link to post
Share on other sites

What is the best way to upgrade from sts4.1 to sts4.2 w/header tag controller. I installed v4.1 a couple weeks back and want to add header tag controller (I wish I had waited a couple weeks). I have not applied any of the error fixes or updates to v4.1. Thanks

Share this post


Link to post
Share on other sites
What is the best way to upgrade from sts4.1 to sts4.2 w/header tag controller. I installed v4.1 a couple weeks back and want to add header tag controller (I wish I had waited a couple weeks). I have not applied any of the error fixes or updates to v4.1. Thanks
med01e,

 

I think if you rename your existing template folder (sts_templates) to something custom such as "my_templates", then you should be able to follow the typical install path for a non-modified osCommerce store. Follow the instructions "Copy files (for a new store only)" in the manual.

 

The differences between STSv4.2 and STSv4.1 is the following:

  • Footer patch
  • Product info module v1.06
  • Index module v1.0.3
  • Added additional templates for easier implemenatation into custom templates
  • Modified documentation for the above changes and the optional Infobox Templates as well as make it all easy to read and understand

Let us know if you have any issues,

 

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

Share this post


Link to post
Share on other sites
med01e,

 

I think if you rename your existing template folder (sts_templates) to something custom such as "my_templates", then you should be able to follow the typical install path for a non-modified osCommerce store. Follow the instructions "Copy files (for a new store only)" in the manual.

 

The differences between STSv4.2 and STSv4.1 is the following:

  • Footer patch
  • Product info module v1.06
  • Index module v1.0.3
  • Added additional templates for easier implemenatation into custom templates
  • Modified documentation for the above changes and the optional Infobox Templates as well as make it all easy to read and understand

Let us know if you have any issues,

 

Bill Kellum

The reason for renaming your existing template folder (sts_templates) is so that they will not get copied over during the installation of STSv4.2 with HTCv2.5.9. After the installation, your current templates would then be available for use with STSv4.2.

 

 

 

:blink: Caution: Since this contribution was uploaded to the boards, I have found a discrepency between the "clean_osc" and the "upload" folders. Please use the files in the "clean_osc" folder so that you will not be missing any files in your install. The missing files have to do with the Header Tags Controller contribution.

 

Sorry for the inconvenience.

 

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

Share this post


Link to post
Share on other sites

Hi There,

 

I Have STS 4.2 installed and working perfectly, but I can't figure out how to include my Extra Product Fields contribution (also working) into the sts_template.html file. I'm not very good at coding, and have come to the end of the line of my abilities!

 

Has anyone succesfully gotten STS to work with Extra Product Fields, and if so what code do I put where!? :huh:

 

Any help woud be greatly appreciated as the STS doc is too vauge about creating new functions

Share this post


Link to post
Share on other sites

i have a HUGE problem... if you go here https://organize-it.biz/shop/create_account.php and try to create a new account the following error comes up:

 

0 -

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

[TEP STOP]

 

i'm completely stumped... this is the LAST piece to solve before i can launch the site... please help

 

sts 4.2 with header tags, no other mods

 

thanks,

Jay

Edited by greyskymedia

Share this post


Link to post
Share on other sites
i have a HUGE problem... if you go here https://organize-it.biz/shop/create_account.php and try to create a new account the following error comes up:

 

0 -

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

[TEP STOP]

 

i'm completely stumped... this is the LAST piece to solve before i can launch the site... please help

 

sts 4.2 with header tags, no other mods

 

thanks,

Jay

It appears you have modified your create_account.php page and it now shows that your are missing a field in your database. Compare your create_account.php page with an undmodified version to find your error.

 

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

Share this post


Link to post
Share on other sites

Hey Bill, hope you see this as something in this forum won't allow me to post in here unless I reply to a question.

 

 

 

Anyway, as you probably know I've been trying to track down the popup image problem I've been have with my site. Unsuccessfully, unfortunately.

 

 

 

Here is the offending code.

 

 

 

<script language="javascript"><!--

 

document.write('<?php echo '<a href="java script:popupWindow('\\\ . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . \\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

 

//--></script>

 

<noscript>

 

 

 

If I remove this code it will pop however there is no format to the popup, size, width, height and or position. I looded at the responce in an eirlier post and added the script and the tag however it still did not work. Tried messing with several different paths etc. and still nothing. All I can see in the the properties is the link to

 

 

java script:popupWindow(http://www.rcxjets.com/catalog/popup_image.php?

 

 

Seems as there is a ")" missing somewhere and I just can't seem to find it. Any clues to pointing me in the right direction would be extermly greatful. - Guy

 

Share this post


Link to post
Share on other sites
Hey Bill, hope you see this as something in this forum won't allow me to post in here unless I reply to a question.

 

 

 

Anyway, as you probably know I've been trying to track down the popup image problem I've been have with my site. Unsuccessfully, unfortunately.

 

 

 

Here is the offending code.

 

 

 

<script language="javascript"><!--

 

document.write('<?php echo '<a href="java script:popupWindow('\\\ . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . \\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

 

//--></script>

 

<noscript>

 

 

 

If I remove this code it will pop however there is no format to the popup, size, width, height and or position. I looded at the responce in an eirlier post and added the script and the tag however it still did not work. Tried messing with several different paths etc. and still nothing. All I can see in the the properties is the link to

 

 

java script:popupWindow(http://www.rcxjets.com/catalog/popup_image.php?

 

 

Seems as there is a ")" missing somewhere and I just can't seem to find it. Any clues to pointing me in the right direction would be extermly greatful. - Guy

 

 

 

 

Well, after two weeks playing with Nifty Corners I've just about given up as there are still several problems associated wtih using the scripts. I've switched my page back to using the normal STS 4.2 scritps and templates. I do intend to use my project catalog to futher test the concept of using the Nifty scripts to see if I can work out the rest of the associated problems.

Share this post


Link to post
Share on other sites
Well, after two weeks playing with Nifty Corners I've just about given up as there are still several problems associated wtih using the scripts. I've switched my page back to using the normal STS 4.2 scritps and templates. I do intend to use my project catalog to futher test the concept of using the Nifty scripts to see if I can work out the rest of the associated problems.

 

 

 

Well, found a brain f**t in my code and have one problem fixed where I was adding the information box twice. Still looking on how to solve the popup image problem as I haven't quite solved this yet. If I take out the section of code above I can get a window.open but not the popup. Really getting a feel for ocs and sts 4.2 in the way it works.

Share this post


Link to post
Share on other sites
Well, found a brain f**t in my code and have one problem fixed where I was adding the information box twice. Still looking on how to solve the popup image problem as I haven't quite solved this yet. If I take out the section of code above I can get a window.open but not the popup. Really getting a feel for ocs and sts 4.2 in the way it works.
Guy, If you disable STS does your popup images work? If not, then you need to concentrate on your original osCommerce files. STSv4.2 does not change your pop_up image by default. It pulls the javascript from your original osCommerce files. Use the following search string on Google to search the osCommerce Knowledge Base for your particular issue:

 

click to enlarge site:www.oscommerce.info/

 

 

 

If yes, then check the template that you are using to make sure it has the required code at the top of the template. I gave an example of the required code in the template named "sts_blank_template.html" in the /includes/sts_templates/test folder.

 

 

 

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

Share this post


Link to post
Share on other sites

Hi,

 

This may seem a stupid question, however here goes..

 

I have a new store with STS already loaded with a basic template that doesn't look any different to a store without that system.

 

I want to use a psd file I have as the home page etc., and am looking to find some easy instructions of how to set up my slicing of the psd image so each slice gets to the right place.

 

Thanks

 

 

Oz :)

Edited by ozstar

Share this post


Link to post
Share on other sites
Guy, If you disable STS does your popup images work? If not, then you need to concentrate on your original osCommerce files. STSv4.2 does not change your pop_up image by default. It pulls the javascript from your original osCommerce files. Use the following search string on Google to search the osCommerce Knowledge Base for your particular issue:

 

click to enlarge site:www.oscommerce.info/

 

 

If yes, then check the template that you are using to make sure it has the required code at the top of the template. I gave an example of the required code in the template named "sts_blank_template.html" in the /includes/sts_templates/test folder.

 

 

 

Hope this helps,

 

Bill Kellum

 

 

 

Thanks Bill for those hints I'll be looking at your references and get back to you in a day or so. I have looked at all the required code and still can't seem to figure out why it won't pop the image. But, I'll go back and read the manual again and sts_blank_template.html and compaire it to what is going on with my template. Oh, yes if I go back to and turn off sts it will pop. I really think that it has something to do with the XHTML not serving up the javascript correctly.

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

×