Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Brian

 

Your contribution is great, thanks a lot for sharing this. I have one question I cannot find the answer , I have a shop in two languages and I need different images for each of them. I searched the solution you gave in other posts about $langid but I couldnt make it work. Could you please help me with this?

 

Thanks

Edited by xaratax
Link to comment
Share on other sites

I'm stumped. I'm trying to change the text color in the header, and it's just not working.

I've removed the font tags from the sts_template file.

I've modified the css file to refect the changes I want. (oddly enough, I can change everything about the text except the color)

I've given the absolute css url in the sts_template file.

I've tried placing the css file in the /catalog/includes directory.

 

The css code:

TR.headerNavigation {
background: #33FF66;
}

TD.headerNavigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #0044CC;
font-weight: bold;
}

 

The html code:

  <tr class="headerNavigation"> 
   <td class="headerNavigation" colspan="3"><div align="left"><img src="images/store/bluearrow.gif" height="18" width="20" border="0" alt=""> $breadcrumbs </div></td>
 </tr>
 <tr>

 

What am I missing? I know it's got to be something simple, but it's been two days now, and I just can't figure out what I'm doing wrong.

 

TIA

Link to comment
Share on other sites

In order to change the breadcrumbs text I had to make up a separate class in the CSS file and use that.

 

I'm stumped. I'm trying to change the text color in the header, and it's just not working.

I've removed the font tags from the sts_template file.

I've modified the css file to refect the changes I want. (oddly enough, I can change everything about the text except the color)

I've given the absolute css url in the sts_template file.

I've tried placing the css file in the /catalog/includes directory.

 

The css code:

TR.headerNavigation {
background: #33FF66;
}

TD.headerNavigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #0044CC;
font-weight: bold;
}

 

The html code:

 ?<tr class="headerNavigation"> 
? ?<td class="headerNavigation" colspan="3"><div align="left"><img src="images/store/bluearrow.gif" height="18" width="20" border="0" alt=""> $breadcrumbs </div></td>
?</tr>
?<tr>

 

What am I missing? I know it's got to be something simple, but it's been two days now, and I just can't figure out what I'm doing wrong.

 

TIA

Link to comment
Share on other sites

In order to change the breadcrumbs text I had to make up a separate class in the CSS file and use that.

 

Nope, that didn't work. I was really hoping it was something that simple though. I made a new class in the css file TD.breadCrumbs and still I can't change the color of the text. Oddly enough, I can't even change the text color with a font tag and the css tags removed. I'm really confused now.

Link to comment
Share on other sites

Nope, that didn't work. I was really hoping it was something that simple though. I made a new class in the css file TD.breadCrumbs and still I can't change the color of the text. Oddly enough, I can't even change the text color with a font tag and the css tags removed. I'm really confused now.

 

It'll work. There's a default a href entry and that's what it's picking up. You need to specifically call a new one like

 

A.Breadcrumbs {

color: #EFBFCF;

}

 

A.Breadcrumbs:hover {

color: #EFBFCF;

}

 

and then dig up the breadcrumbs class and change this line

 

$trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

 

to this

 

$trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="Breadcrumbs">' . $this->_trail[$i]['title'] . '</a>';

 

Ought to work like a charm. Unless, of course, I'm off my nut today :-"

 

Hope that helps,

 

Iggy

Edited by Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

It'll work. There's a default a href entry and that's what it's picking up. You need to specifically call a new one like

*snip*

 

Ought to work like a charm. Unless, of course, I'm off my nut today :-"

 

Hope that helps,

 

Iggy

 

Yep, that worked for me. I knew it was something simple, and I was just being dense.

Now I just have to figure out where $myaccountlogoff | $cartcontents | $checkout are referenced, and I can work on changing those as well. Once that's done, my header will be complete, and I can move on to the info boxes. I really like osCommerce and STS, but I just wish it were a little more intuitive.

 

 

If you are using STS (duh!) then you should be able to manually change the font of the breadcrumb by putting it like this,,,

 

<font size="2" face="arial" color="#444jjj">$breadcrumbs</font>

 

That's how I have mine, www.justtwogirls.com

 

I tried that, but font tags were being ignored in favor of css. But I got it working now.

Link to comment
Share on other sites

I'm having the same sort of problem, here is what I am getting:

 

Warning: main(includes/sts_product_info.php): failed to open stream: No such file or directory in C:\Inetpub\vhosts\mlj.wyrecompute.com\httpdocs\osCommerce\includes\sts_display_output.php on line 132

 

--------------------------

 

I was having the same problem. I think it might be a simple "typo" problem. In my original "ReadMe" text, Brian says to copy these files to catalog/includes:

 

application_top.php

header.php

column_left.php

column_right.php

footer.php

application_bottom.php

sts_start_capture.php

sts_stop_capture.php

sts_restart_capture.php

sts_display_output.php

sts_user_code.php

sts_template.html

 

 

Is that what you did? Since our error asks for sts_product_info.php, I checked my original unzip and lo and behold! there it was. I copied it to my server and now I can click on my new products, etc. and see them just fine. No errors.

 

Now, of course, the whole thing could destruct in a moment or two because of my initiative. We'll see . . .

 

Margaret

Maryland, USA

Link to comment
Share on other sites

I believe you can make those changes in header.php. In my file, it shows up around line 69. Just change it to use the same class as the breadcrumbs that you created.

 

Yep, that worked for me. I knew it was something simple, and I was just being dense.

Now I just have to figure out where $myaccountlogoff | $cartcontents | $checkout are referenced, and I can work on changing those as well. Once that's done, my header will be complete, and I can move on to the info boxes. I really like osCommerce and STS, but I just wish it were a little more intuitive.

I tried that, but font tags were being ignored in favor of css. But I got it working now.

Link to comment
Share on other sites

I did a quick search on this and came up with nothing so If it's been asked before just point me... Thanks.

 

I've installed the STS and want to use SSI on my sts_template.html page. So I renamed it to a .php file (sts_template.php) and changed my configure.php to point to the new php file. But for some reason it's not rendering the includes. If I look at the source code it's just showing the include line (i.e. <?php require("http://www.mydomain.com/mypage.php"); ?>). What would cause the includes to not work? My entire site is using includes and I would like to keep it across the shopping cart. Thanks for any help. Peace.

 

In case anybody else is wondering I figured it out. You can add new "boxes" in the sts_user_code.php file. I just added something like

 	 $sts_block_name = 'royTopNav';
 require(STS_START_CAPTURE);
 require('http://www.mydomain.com/includes/topNav.php');
 require(STS_STOP_CAPTURE);
 $template['royTopNav'] = strip_unwanted_tags($sts_block['royTopNav'], 'royTopNav');

and then put $royTopNav in sts_template.html where I want the include to show... Works great for me! If this looks wrong to somebody who actually knows what they're doing please let me know. Thanks. B)

Edited by redroy
Link to comment
Share on other sites

In case anybody else is wondering I figured it out. You can add new "boxes" in the sts_user_code.php file. I just added something like

  	$sts_block_name = 'royTopNav';

require(STS_START_CAPTURE);

require('http://www.mydomain.com/includes/topNav.php');

require(STS_STOP_CAPTURE);

$template['royTopNav'] = strip_unwanted_tags($sts_block['royTopNav'], 'royTopNav');

 

In order for "royTopNav" to work, it has to have a file in includes/boxes/ you don't have to do the full url ie: http://www.yourdomain.com/includes/l you just have to do the box name. STS is set to a utomaticly look in yourdomain.com/includes/boxes/

Link to comment
Share on other sites

Is there a call to your stylesheet in the head of your template?

 

 

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

 

or whatever the path would be for your setup.

 

 

Well for some reason the stylesheet.css is not being detected i guess so the font is all massive and all.....

Link to comment
Share on other sites

You can download the newest version of Simple Template System (STS) here:

 

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

 

  - Brian

 

Hi Brian,

 

I'm pretty new to both OSC as well as this forum, I skimmed through this thread and didn't find out which version of the contribution I should install first. Can you shed a light? Thanks.

Link to comment
Share on other sites

Hi Brian,

 

I'm pretty new to both OSC as well as this forum, I skimmed through this thread and didn't find out which version of the contribution I should install first.  Can you shed a light?  Thanks.

 

Start with " 5 Feb 2004 - Simple Template System (STS) v2.01 "

I'm not a coder just a splicer.

Link to comment
Share on other sites

Has anyone figured out how to get the FREE SHIPPING WITH OTHER SHIP METHODS contribution to work with STS?

 

I installed it but when you select the free shipping option and press continue, nothing happens. It just goes right back to the same screen. The only thing that works is selecting one of the expedited shipping methods.

Link to comment
Share on other sites

Hi everybody,

 

First of all, this is worth noting: STS's readme file says that the $specialfriendbox will display either the Specials Box or the Tell A Friend Box (depending on page viewed). Interestingly, so will the $bestseller Box display the Product Notification Box on certain pages! This is not noted in the readme file.

 

Now to my particular problem, I made a couple of different templates for viewing different categories, and placed them all in the includes/sts_templates directory. I find that the $bestseller box will not be displayed at all on an index.php page if we're showing a particluar category/sub-category. In other words it will only show best seller information on an index.php page if the index.php page requested is exactly that: the home page itself. Any ideas where to fix this?

Link to comment
Share on other sites

I have a Problem with STS templates & (Dynamic Info pages. V1.71)

 

I just installed the (STS) on my site all seemed to be working great, until i clicked one of my dyno info pages. all of the dyno pages are blank in the main page area.

 

Can someone please help.

 

Thanks Jerry

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