Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I'm reposting a question here regarding STS and stylesheets (and infoboxes)

 

I'm finally working on my STS and am having a problem with the stylesheet. The font changed from a new times roman(?) to something resembling Tahoma but the size is not 11px. Here's my stylesheet at the catalog\style.css It's funny when I change the name to stylesheet.css then it goes back to new times roman but still huge lettering (~18px). What am I not understanding here? I also have a best loginbox contrib. that has gone missing in my STS, do I need to use the template for infobox to bring this back? Thanks.

 

body {padding:0; margin:0; color:#000000}
br{font-size:10px}
.s{font-family:Tahoma; font-size:11px; color:#9C9C9C; text-decoration:none}
.s1{font-family:Tahoma; font-size:11px; color:#656565; text-decoration:none}
.green{font-family:Tahoma; font-size:11px; color:#769F26}
.red{font-family:Tahoma; font-size:11px; color:#2C7F06;}
.o{font-family:Tahoma; font-size:11px; color:#FFCC00;}
.blue{font-family:Tahoma; font-size:11px; color:#778FAC}
.blue1{font-family:Tahoma; font-size:11px; color:#324060}
.blue2{font-family:Tahoma; font-size:11px; color:#50596E; text-decoration:none}
.blue3{font-family:Tahoma; font-size:11px; color:#5579A5}
.w{font-family:Tahoma; font-size:11px; color:#FFFFFF;text-decoration:none}
.b{font-family:Tahoma; font-size:11px; color:#5E5E5E; }

.t1{background:url(images/1_z2.gif) center left no-repeat; margin:0px 0px 0px 110px; padding:0px 0px 0px 10px }
.t2{background:url(images/1_z2.gif) center left no-repeat; margin:0px 0px 0px 0px; padding:0px 0px 0px 10px }
.t3{background:url(images/1_z2.gif) center left no-repeat; margin:0px 0px 0px 2px; padding:0px 0px 0px 10px }
.t4{background:url(images/1_z2.gif) center left no-repeat; margin:0px 0px 0px 21px; padding:0px 0px 0px 10px }
.t5{background:url(images/1_z2.gif) center left no-repeat; margin:0px 0px 0px 11px; padding:0px 0px 0px 10px }


#input{
width:160px; height:21px;

}

#input1{
scrollbar-3dlight-color:#E3E2E2;
scrollbar-track-color:#FFFFFF;
scrollbar-shadow-color:#E3E2E2 ;
scrollbar-face-color:#ECB637;
scrollbar-arrow-color:#E3E2E2;
scrollbar-darkShadow-color:#E3E2E2;

}

#textarea{
width:102px; height:48px;
border-width:1px;
border-style:solid;
border:none;
background-color:#F0EAE3;
overflow:auto
}

 

Here's my latest sts_template.html with Div tags

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>product_name</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style3 {font-size: 10px}
-->
</style>
</head>
<body bgcolor="#EBEBEB" style="padding:0; margin:0" onLoad="MM_preloadImages('images/m1-1.gif','images/m2-2.gif','images/m3-3.gif','images/m4-4.gif','images/m5-5.gif')">

<table cellpadding="0" cellspacing="0" border="0" align="center" >
<tr>
<td valign="top" width="748" height="736" >
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="748" height="350" style="background-image:url(images/top.jpg) ">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="290" height="350">
<div style=" margin-left:89px; margin-top:48px "><img src="images/logo.gif" alt="" border="0"></div>
<div style=" margin-left:87px; margin-top:15px "><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','images/m1-1.gif',1)"><img alt="" src="images/m1.gif" name="Image21" width="124" height="26" border="0"></a></div>
<div style=" margin-left:87px; margin-top:7px "><a href="index-1.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image22','','images/m2-2.gif',1)"><img alt="" src="images/m2.gif" name="Image22" width="107" height="26" border="0"></a></div>
<div style=" margin-left:87px; margin-top:7px "><a href="index-2.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image23','','images/m3-3.gif',1)"><img alt="" src="images/m3.gif" name="Image23" width="106" height="26" border="0"></a></div>
<div style=" margin-left:87px; margin-top:7px "><a href="index-3.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image24','','images/m4-4.gif',1)"><img alt="" src="images/m4.gif" name="Image24" width="105" height="26" border="0"></a></div>
<div style=" margin-left:87px; margin-top:7px "><a href="index-4.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image25','','images/m5-5.gif',1)"><img alt="" src="images/m5.gif" name="Image25" width="132" height="26" border="0"></a></div>
</td>
<td valign="top" width="458" height="350">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="458" height="156">
<div style=" margin-left:14px; margin-top:111px "><img src="images/w1.gif" alt="" border="0"></div>
</td>
</tr>
<tr>
<td valign="top" width="458" height="16">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="16" height="16"></td>
<td valign="top" width="59" height="16" style="background-image:url(images/k1.gif) ">
<div style=" margin-left:6px; margin-top:1px; margin-right:0px; line-height:12px " class="b"><a href="#mysite/com/catalog" target="_blank" class="w">Buy Now</a></div>
</td>
<td valign="top" width="383" height="16"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="458" height="178"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="748" height="291" style="background-image:url(images/bg2.gif) ">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="748" height="291" style=" background:url(images/bg1.gif) no-repeat bottom ">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" width="85" height="291"></td>
<td valign="top" width="582" height="291">
<div style=" margin-left:0px; margin-top:5px "><img src="images/z1.gif" alt="" border="0"><img src="" alt="" width="193" height="22" border="0" style="margin-left:6px "></div>
<div style=" margin-left:1px; margin-top:11px; margin-right:0px; line-height:12px " class="s1">
<p><strong>

<table border="0" width="100%" cellspacing="0" cellpadding="10">
<tr class="header">
<td valign="middle">
<img border="0" src="images/store_logo.png"></td>
<td align=right>
<a href="$urlmyaccount">
<img border="0" src="images/header_account.gif"></a>
<a href="$urlcartcontents">
<img border="0" src="images/header_cart.gif"></a>
<a href="$urlcheckout">
<img border="0" src="images/header_checkout.gif"></a> </td>
</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
<td class="headerNavigation">

$breadcrumbs </td>
<td align="right" class="headerNavigation">
$myaccountlogoff | $cartcontents | $checkout
</td>
</tr>
</table>

<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" width="125">
<table border="0" width="125" cellspacing="0" cellpadding="2">
<tr><td>$catmenu</td></tr>
<tr><td>$categorybox</td></tr>
<tr><td>$manufacturerbox</td></tr>
<tr><td>$whatsnewbox</td></tr>
<tr><td>$specialbox</td></tr>
<tr><td>$searchbox</td></tr>
<tr><td>$informationbox</td></tr>
</table> </td>
<td valign="top">
<p>This is the default template<br>
</p>
<p>$content</p>
<p> </p> </td>
<td valign="top" width="125">
<table border="0" width="125" cellspacing="0" cellpadding="2">
<tr><td>$cartbox</td></tr>
<tr><td>$maninfobox</td></tr>
<tr><td>$orderhistorybox</td></tr>
<tr><td>$bestsellersbox</td></tr>
<tr><td>$reviewsbox</td></tr>
<tr><td>$tellafriendbox</td></tr>
<tr><td>$languagebox</td></tr>
<tr><td>$currenciesbox</td></tr>
</table> </td>
</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="footer">
<td class="footer"> $date </td>
<td align="right" class="footer"> $numrequests </td>
</tr>
</table>

<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="smallText">
$footer_text </td>
</tr>
</table>

<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
$banner_only </td>
</tr>
</table>


<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td align="center" class="smallText">
Simple Template System by <a href="http://www.diamondsea.com/">DiamondSea.com</a><br>
STS v4.5.3 by <a href="http://soundsgoodpro.com">
SoundsGoodProductions.com</a><br> </td>
</tr>
</table><br>
</div>
</td>
<td valign="top" width="81" height="291"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="748" height="95" style="background-image:url(images/bottom.jpg) ">
<div style=" margin-left:191px; margin-top:17px; margin-right:10px; line-height:13px " class="s">Copyright 2008 © Mycompany All rights reserved. <a href="index-5.html" class="blue">Privacy Policy/Conditions of Use</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

 

Here's the original stylesheet.css from OSC.

/*
$Id: stylesheet.css,v 1.56 2003/06/30 20:04:02 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
[url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; }
.stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; }
.productsNotifications { background: #f2fff7; }
.orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; }

BODY {
background: #ffffff;
color: #000000;
margin: 0px;
}

A {
color: #000000;
text-decoration: none;
}

A:hover {
color: #AABBDD;
text-decoration: underline;
}

FORM {
display: inline;
}

TR.header {
background: #ffffff;
}

TR.headerNavigation {
background: #bbc3d3;
}

TD.headerNavigation {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
background: #bbc3d3;
color: #ffffff;
font-weight : bold;
}

A.headerNavigation {
color: #FFFFFF;
}

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

TR.headerError {
background: #ff0000;
}

TD.headerError {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
background: #ff0000;
color: #ffffff;
font-weight : bold;
text-align : center;
}

TR.headerInfo {
background: #00ff00;
}

TD.headerInfo {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
background: #00ff00;
color: #ffffff;
font-weight: bold;
text-align: center;
}

TR.footer {
background: #bbc3d3;
}

TD.footer {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
background: #bbc3d3;
color: #ffffff;
font-weight: bold;
}

.infoBox {
background: #b6b7cb;
}

.infoBoxContents {
background: #f8f8f9;
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}

.infoBoxNotice {
background: #EF9700;
}

.infoBoxNoticeContents {
background: #FFE6E6;
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}

TD.infoBoxHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
font-weight: bold;
background: #bbc3d3;
color: #ffffff;
}

TD.infoBox, SPAN.infoBox {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
background: #f8f8f9;
}

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
background: #f8f8f9;
}

TABLE.productListing {
border: 1px;
border-style: solid;
border-color: #b6b7cb;
border-spacing: 1px;
}

.productListing-heading {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
background: #b6b7cb;
color: #FFFFFF;
font-weight: bold;
}

TD.productListing-data {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}

A.pageResults {
color: #0000FF;
}

A.pageResults:hover {
color: #0000FF;
background: #FFFF33;
}

TD.pageHeading, DIV.pageHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 20px;
font-weight: bold;
color: #9a9a9a;
}

TR.subBar {
background: #f4f7fd;
}

TD.subBar {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
color: #000000;
}

TD.main, P.main {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
line-height: 1.5;
}

TD.smallText, SPAN.smallText, P.smallText {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
}

TD.accountCategory {
font-family: Verdana, Arial, sans-serif;
font-size: 13px;
color: #aabbdd;
}

TD.fieldKey {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}

TD.fieldValue {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
}

TD.tableHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}

SPAN.newItemInCart {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
color: #ff0000;
}

CHECKBOX, INPUT, RADIO, SELECT {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
}

TEXTAREA {
width: 100%;
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
}

SPAN.greetUser {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #71B7CB;
font-weight: bold;
}

TABLE.formArea {
background: #f1f9fe;
border-color: #7b9ebd;
border-style: solid;
border-width: 1px;
}

TD.formAreaTitle {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
font-weight: bold;
}

SPAN.markProductOutOfStock {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
color: #c76170;
font-weight: bold;
}

SPAN.productSpecialPrice {
font-family: Verdana, Arial, sans-serif;
color: #ff0000;
}

SPAN.errorText {
font-family: Verdana, Arial, sans-serif;
color: #ff0000;
}

.moduleRow { }
.moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: hand; }
.moduleRowSelected { background-color: #E9F4FC; }

.checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; }
.checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

/* message box */

.messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #F69C00; }
.messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #71B7CB; }

/* input requirement */

.inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }

Link to comment
Share on other sites

You are missing the point of the infobox templates. To use them, you have two options per each infobox template that you create:
  1. A template for the header (top)
  2. A template for the content (bottom)

The top template should be called infobox_scriptname_header.php.html.

The bottom template should be called infobox_scriptname.php.html.

 

If you do not want to create a separate header template, just create one and name it infobox_scriptname.php.html.

 

Having two separate templates allow you to do anything that you want with either one (no need to dig into the boxes.php file at all). You could put your own text in there if you want or have it use dynamic text with the $headertext tag or create your PHP code to do whatever you want, all within the template.

 

No bkellum you are missing the point of my post, I know full well what the point of the infobox templates, I'm using it!

 

My point is, on the ones I've created, my layout is being messed up because $headertext is not simple a line of text for the heading, but also a table element, a table element not needed (I'll decide what table elements or whatever will be using the infobox.php.html file).

 

I had to edit the boxes.php file, because before it sends headertext to the sts template system, it first sends it to the tablebox function, which just wraps it in the unnecessary table. My change in a previous post removes this step and should only effect the header.

Link to comment
Share on other sites

No bkellum you are missing the point of my post, I know full well what the point of the infobox templates, I'm using it!

 

My point is, on the ones I've created, my layout is being messed up because $headertext is not simple a line of text for the heading, but also a table element, a table element not needed (I'll decide what table elements or whatever will be using the infobox.php.html file).

 

I had to edit the boxes.php file, because before it sends headertext to the sts template system, it first sends it to the tablebox function, which just wraps it in the unnecessary table. My change in a previous post removes this step and should only effect the header.

I did not miss your point. :blink: You still did not need to edit the boxes.php file to accomplish what you wanted to do.

 

:thumbsup: If you do not want the table layout (osC is based on table by the way), you could leave out the $headertext tag altogether. Bingo...no more table. Now, instead of adding the $headertext tag, you could add an image, your own text, custom PHP coding to bring in just the title of the box, etc. or you could just place it directly in your page template as well and leave the infobox_scriptname_header.php.html empty (no tags or HTML).

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 had to edit the boxes.php file, because before it sends headertext to the sts template system, it first sends it to the tablebox function, which just wraps it in the unnecessary table.

 

I'd like to second AJ in that I feel the level of detail in the granularity could be improved. The token, $headertext returns an inane single-cell table, regardless of whether it is accessed from a top-level template or infobox_whatever_header.php.html. The solution AJ came up with, to modify the "core" files, while functional, requires re-modification if there is an additional release or security update. A better solution is to provide increased granularity in the STS. For example, while $headertext should continue to work as it always has, a new token, $header(text) could provide just the actual text.

 

Better still, rather than using the token variables as just a name, they could also describe how the template designer wants to receive the data. For example:

$category(box) (and the older $categorybox): a table with the categories listed

$category(list): a unordered list with the categories listed

$category(divs): a div list with the categories listed

$category(text): a br list with the categories listed

etc.

 

The parameter determines which formatter method the raw data gets pushed through. The formatter method could be pretty generic. If no parameter, use the old tables.

 

Oh, and thank you so very much for this module, I would not be using osCommerce without it.

Link to comment
Share on other sites

I'd like to second AJ in that I feel the level of detail in the granularity could be improved. The token, $headertext returns an inane single-cell table, regardless of whether it is accessed from a top-level template or infobox_whatever_header.php.html. The solution AJ came up with, to modify the "core" files, while functional, requires re-modification if there is an additional release or security update. A better solution is to provide increased granularity in the STS. For example, while $headertext should continue to work as it always has, a new token, $header(text) could provide just the actual text.

 

Better still, rather than using the token variables as just a name, they could also describe how the template designer wants to receive the data. For example:

$category(box) (and the older $categorybox): a table with the categories listed

$category(list): a unordered list with the categories listed

$category(divs): a div list with the categories listed

$category(text): a br list with the categories listed

etc.

 

The parameter determines which formatter method the raw data gets pushed through. The formatter method could be pretty generic. If no parameter, use the old tables.

 

Oh, and thank you so very much for this module, I would not be using osCommerce without it.

 

If you just wanted the "text" of the infobox title, you could easily create a STS placeholder for it. The $headertext placeholder is meant for the top half of the infobox table. These forums as well as the STSv4 Power Pack site (a download site dedicated to STS addons) are good ways to share custom STS user tags.

 

:thumbsup: The tags that come with STS is just the beginning but includes all of the core osC functionallity.

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 did not miss your point. :blink: You still did not need to edit the boxes.php file to accomplish what you wanted to do.

 

:thumbsup: If you do not want the table layout (osC is based on table by the way), you could leave out the $headertext tag altogether. Bingo...no more table. Now, instead of adding the $headertext tag, you could add an image, your own text, custom PHP coding to bring in just the title of the box, etc. or you could just place it directly in your page template as well and leave the infobox_scriptname_header.php.html empty (no tags or HTML).

 

I just didn't want the table it wraps around the headertext, which is sourced from the different language files, and some contain non-static information (such as "New Products for %s" on the index page), why should I have to write custom code for that when it's already done by $headertext

 

Yes, I realise I could have images and whatever I want on a per template basis, but if I did use text, I get it wrapped in a table, and this can disrupt the template (since heaaders are normally small areas, the standard OSC is anyway).

 

This is particularly noticeable when someone installs STS, then looks at it and thinks "It doesn't look like OSC did before it, the colours are wrong, and the New Products header just looks wrong".

 

I realise the point of STS is to make your site look different to the default OSC, however, I doubt I'm the only to have spent time first just getting it to look like the normal OSC to create a "default" template, before then moving on to come up with their own idea. Particularly due to the blue colour of the New Products section on the index, the New Products header completely off (which the cause seems to be this $headertext including another table), the coloured area for when the right arrow is not present not matching.

 

I might save my files, with the boxes.php modification and add it to the contribution or powerpack, "Default OSC 2.2 RC2a Template for STS"

 

Of course, the $headertext wrapped in a table won't only affect creating a perfect default template, but any other templates users make that use the unmodified $headertext in their own templates (with their own layouts of tables, DIVs or whatever).

 

What logic is there in $headertext not only being text but containing a table too? The layout should be controlled by the template files, if it was just $header fine, like $content i could mean anything.

 

If you just wanted the "text" of the infobox title, you could easily create a STS placeholder for it. The $headertext placeholder is meant for the top half of the infobox table. These forums as well as the STSv4 Power Pack site (a download site dedicated to STS addons) are good ways to share custom STS user tags.

 

:thumbsup: The tags that come with STS is just the beginning but includes all of the core osC functionallity.

 

I've not gotten to Custom STS placeholders yet, however I will look into them for future items, but again surely $headertext should be text, the table is pointless, the tablebox function is used in the original OSC (or when sts is disabled) and takes multiple colums (corner images and the header text) and turns it into a table for the header. However, STS uses the template file to handle the corner images and right arrow, so the $headertext wrapped in a table is superfluous.

 

It would also be nice if a singel template could have code in it to work out different images for different parts, rather than having to make more template files, just to have a rounded corner on a particular side.

 

I still feel the tableBox should be removed from that line of code in the boxes.php, why is it still using part of the original OSC code, in the if STS enabled section?

Link to comment
Share on other sites

I might save my files, with the boxes.php modification and add it to the contribution or powerpack, "Default OSC 2.2 RC2a Template for STS"

Please...before uploading anything onto the STS site, get to know STS first. Everything that you mentioned above has already been considered and built into the STS contribution.

 

The New Products for Month box is already available to make a separate template for...look in the STS User Manual for more details.

 

The "sample" template that comes with the contribution does "look" like the stock osC with some minor changes to make those STS options stand out, such as the blue and green table cell background for some of the infoboxes. This can all be easily modified once you get to know how STS works.

 

:thumbsup: If you do make any uploads, use the STSv4 Power Pack site (link in my signature below) so it will remain separate from the core STS contribution (we don't want to confuse people any further).

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 made a infobox_new_products template, I had to along with categories and shopping cart to recreate the different corner images used, I then set the main infobox template to use square corners (as most of the others do). However, because of this table the header for New Products is too high and the corner images no longer line up with the header correctly. One other fix is to increase the height of the images from 14 to 16, however the header for New Products looks taller than the others.

 

If I did create a contribution, it would primarily be just a few html files to go into a subfolder of the sts_templates folder.

 

The modification to the boxes.php file makes perfect sense to me, and while my code may not be the norm (I was trying to pull it out of the array it had been inserted into a little further up but gave up working out the syntax) however, as I have said, why would STS use OSC code to wrap a line of text in a table attribute it does not need, STS is based on using the templates.

 

I'm still not sure you understand what we mean, perhaps a sample of my index page now that I've made the change:

 

            <td><!-- new_products //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td height="14" class="infoBoxHeading"><img border="0" src="images/infobox/corner_left.gif" width="11" height="14"></td>
   <td width="100%" height="14" class="infoBoxHeading">[b]New Products For April[/b]</td>
   <td width="92" style="background-repeat: norepeat" bgcolor="#BBC3D3"></td>
   <td width="11"><img border="0" src="images/infobox/corner_right_left.gif" width="11" height="14"></td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
   <td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">
 <tr>
   <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
 <tr>
   <td class="infoBoxContents" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>

 

Compare that to what you get with the Full or Test of a brand new STS install which is:

 

            <td><!-- new_products //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td height="14" class="infoBoxHeading"><img border="0" src="images/infobox/corner_left.gif" width="11" height="14"></td>
   <td width="100%" height="14" class="infoBoxHeading">[b]<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
   <td class="infoBoxHeading" width="100%">New Products For April</td>
 </tr>
</table>[/b]</td>
   <td width="92" style="background-repeat: norepeat" bgcolor="#BBC3D3"></td>
   <td width="11"><img border="0" src="images/infobox/corner_right_left.gif" width="11" height="14"></td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
   <td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">
 <tr>
   <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
 <tr>
   <td class="infoBoxContents" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>

 

Have bolden for comparison.

 

Granted this is not noticeable on most of the infobox headings, but it is definately noticeable on the New Products For ... on the index, and as anyone creates their own infobox tempates, their layouts could be thrown out by this unnecessary table (reviewing this thread, I see other raising this issue, in different ways).

 

Hence in the next version of STS, my fix (maybe using the array than the content[0]['text'] that I had to, or whatever, as long as it's not using tablebox, doesn't need to) should be applied.

Edited by AJStevens
Link to comment
Share on other sites

Hey. Im using the STS and its going great.

 

I would like to create a new image size. Something in between the size of the small picture and large picture. So in essence i would like to add a medium size, and define the dimensions. How would i go about doing that? And then being able to control it by using $imagemed in sts?

Link to comment
Share on other sites

hi,

 

i've just installed the latest STS contribution and got it to work fine... well.. all apart from my breadcrumb trails have stopped working on all pages of my shop, pages with custom templates, and pages with the default...

 

.. if i disable the templates they appear again, and if i re-enable the templates they disappear.. does anyone have any ideas why this might be happening or any pointers?

 

thanks in advance :)

kev.

Edited by kev@num
Link to comment
Share on other sites

hi,

 

i've just installed the latest STS contribution and got it to work fine... well.. all apart from my breadcrumb trails have stopped working on all pages of my shop, pages with custom templates, and pages with the default...

 

.. if i disable the templates they appear again, and if i re-enable the templates they disappear.. does anyone have any ideas why this might be happening or any pointers?

 

thanks in advance :)

kev.

Are you using the $breadcrumbs tag to pull in the breadcrumb data?

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'm reposting a question here regarding STS and stylesheets (and infoboxes)

 

I'm finally working on my STS and am having a problem with the stylesheet. The font changed from a new times roman(?) to something resembling Tahoma but the size is not 11px. Here's my stylesheet at the catalog\style.css It's funny when I change the name to stylesheet.css then it goes back to new times roman but still huge lettering (~18px). What am I not understanding here? I also have a best loginbox contrib. that has gone missing in my STS, do I need to use the template for infobox to bring this back? Thanks.

 

 

:thumbsup: Try using the Web Developer Toolbar in IE or Firefox to display the CSS that is producing the font. Then, you will kwow what you need to modify.

 

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

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 also have a best loginbox contrib. that has gone missing in my STS, do I need to use the template for infobox to bring this back? Thanks.

If you installed some contribution that creates a new infobox to osCommerce, then you need to create a new STS tag in order to include it in your template.

 

Detailed instructions on how to do this:

 

http://www.oscommerce.com/forums/index.php?sho...p;#entry1102983

 

Hope this helped,

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 having a problem. I just installed STS and when I enable it and go to my site I get a blak page. No error, just blank. Same when I do debug. I did the install twice, so I must be missing something.

Any ideas?

Link to comment
Share on other sites

Are you using the $breadcrumbs tag to pull in the breadcrumb data?

 

 

Is it possible that the breadcrumb is there, but is (for example) white links on a white background?

 

 

thanks for replying..

 

i'm definately using the $breadcrumbs tag in the template pages... and this is all the shows:

 

» Shop

 

i've also checked my course code in this location and there's definately no more to the trail that is hidden..

 

anymore ideas? :)

 

i'm not sure what this could be conflicting with.. is something not $global and it should be or something? it seems to be not adding anything to the trail for some reason...

 

thanks again in advance!!

 

 

edit.. i think it's using the old breadcrumb... not $breadcrumbs..

Edited by kev@num
Link to comment
Share on other sites

Hi, how do i resize the place holder $imagelarge. I read the instructions and it says that it places the image without any resizing. Is there a way to get it resize the images? Or is it easier to add another placeholder for $imagemedium? or something?

 

Thanks in advanced for your input and help.

Link to comment
Share on other sites

:thumbsup: Try using the Web Developer Toolbar in IE or Firefox to display the CSS that is producing the font. Then, you will kwow what you need to modify.

 

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

 

Bill, I loaded the IE Developer toolbar. The nested DIV and tables are extensive. Most styles seem to be the default new times roman 12px especially at the store level. Is there a report I can attach so I can get help making sense of the styles applied (or not applied)?

Link to comment
Share on other sites

Bill, I loaded the IE Developer toolbar. The nested DIV and tables are extensive. Most styles seem to be the default new times roman 12px especially at the store level. Is there a report I can attach so I can get help making sense of the styles applied (or not applied)?

 

I fixed it. Thanks.

Link to comment
Share on other sites

Hi everyone

 

I'm currently using the fantastic STS on my oscommerce however i require 'search engine friendly URLs'. I have tried previously to install various ones with no success. Can anyone advise me of the most simple search engine friendly URL contribution that is suitable for use with STS without causing any problems?

 

thankyou in advance

Link to comment
Share on other sites

I have a bit of a weird issue im trying to resolve and hopefully someone can assit

 

ive plugged a few different bits of code into product_info.php and i want to be able to set each of these various bits up so that i can use content templates for the various products and these functions

 

as an example ive created a module in the includes/modules file and in sts_inc/product_info.php i have referenced it as:

 

$sts->start_capture();
include(DIR_WS_MODULES . FILENAME_TESTMODULE);
$sts->stop_capture ('testmodule');
$template_pinfo['testmodule']= $sts->template['testmodule'];

 

now the code works well and in my content template i can add $testmodule$ and it loads the module file fine...however there is an issue

 

i transferred some sql querys to my module file from product_info.php make my module file work but they arent working

 

They work fine in when they are in the product_info.php file but refuse to work when done like this via STS using the content setup

 

Im doing it so that product_info.php's code doesnt become a huge file

 

have i completely missed something here or will this type of setup not work?

Link to comment
Share on other sites

Ive narrowed my error down to a strange issue

 

	function show_rates($rate)
	{
		global $currencies, $product_info;
		if($rate > 0)
		{
			return $currencies->display_price($rate, tep_get_tax_rate($product_info['products_tax_class_id']));
			//return number_format($rate, 2, ".",'')." AUD";
		}
		else
			return "N/A";
	}

 

return $currencies->display_price($rate, tep_get_tax_rate($product_info['products_tax_class_id']));

 

refuses do display any prices when its setup this way, however

 

return number_format($rate, 2, ".",'')." AUD";

 

while obviously not showing the right rates with tax etc works...

 

its has me completely stumped...

Link to comment
Share on other sites

I could use a little help making STS and Ultrapics play nice together. I've posted this also in the Ultrapics forum, but not sure which it is more an issue for!

 

When I use a custom product_info.php.html file in place of the $content variable, I don't get the thumbnails for the extra images provided by Ultrapics. I tried to add the code from Ultrapics' revised main product_info.php file -- but it isn't able to pull from the database. I'm not sure why. Has anyone successfully gotten this to work? I'm at a loss.

 

Thank you for any help you can provide!

Link to comment
Share on other sites

SEARCHBOX:

 

I have this piece of code in my sts_template for a searchbox:

 

<!-- search //-->

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

<tbody><tr>

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

 

<tbody><tr>

<td align="center"><form name="quick_find" action="http://www.misite.de/shop-2/catalog/advanced_search_result.php" method="get"><input name="search_in_description" value="1" type="hidden"><input name="keywords" size="10" maxlength="20" style="" type="text"> <input name="osCsid" value="$osCsid" type="hidden"><br><a href="http://www.misite.de/shop-2/catalog/advanced_search.php"><b>erweiterte Suche</b></a></form></td>

</tr>

</tbody></table>

</td>

</tr>

</tbody></table>

<!-- search_eof //-->

 

When I search for a product, it will be found but on top of the page the following error message comes up:

 

Warning: session_start() [function.session-start]: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in /var/www/web22/html/shop-2/catalog/includes/functions/sessions.php on line 67

 

Any idea what is wrong here ?

 

When i put $searchbox into the template it is working fine but not with the above piece of code...

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

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