Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Though that would seem to be an answer, I think that there is more to it. I am working on this and only my products_info.php seems to generate corrupted image links.

 

Hi,

 

Thanks for your reply. I fixed the images but I still get a syntax error. The first page shows up without errors, but when you go to a second page you'll get the syntax errors. Can you please take another look?

Store

 

Thanks in advance

Share this post


Link to post
Share on other sites

OK things have changed a little with my strange bit of code appearring at the tops of my pages, I just updated my english.php file and now this shows up at the top of my pages:

 

$trail_string; } } ?>

 

I tried searching for that string in my shop and my search didn't eve turn it up. This is confusing.

 

ALSO... yeah yeah, I know, there's more {=) I am getting the same syntax error as meules, except on all pages for me. Line: 2, Char: 1, Syntax error.

 

Thanks!

Share this post


Link to post
Share on other sites

product info pages are blank after upload to the server.

 

I tried to debug, but when I click any product, the page is only showing this,

 

STS_VERSION=[3.00 Beta 2]

OSC_VERSION=[osCommerce 2.2-MS2]

 

Can any one tell me why? Thanks a lot!

Share this post


Link to post
Share on other sites
product info pages are blank after upload to the server.

 

I tried to debug, but when I click any product, the page is only showing this,

 

STS_VERSION=[3.00 Beta 2]

OSC_VERSION=[osCommerce 2.2-MS2]

 

Can any one tell me why? Thanks a lot!

 

I'm still struggling with product pages. see http://www.chriskofer.com/wwp2/ and click a product. All images go away. Not some, but all images. Any input valued!

 

STS_VERSION=[2.01] OSC_VERSION=[osCommerce 2.2-MS2]

Share this post


Link to post
Share on other sites
product info pages are blank after upload to the server.

 

I tried to debug, but when I click any product, the page is only showing this,

 

STS_VERSION=[3.00 Beta 2]

OSC_VERSION=[osCommerce 2.2-MS2]

 

Can any one tell me why? Thanks a lot!

 

 

the main page have some thing like this on the top,

 

STS_VERSION=[3.00 Beta 2]

OSC_VERSION=[osCommerce 2.2-MS2]

Checking for Template: includes/sts_template.html -> Found

Checking for Template: includes/sts_templates/mysite/index.php.html -> Not Found

Checking for Template: includes/sts_templates/mysite/index.php_0.html -> Not Found

Checking for Template: includes/sts_templates/mysite/index.php_0.html -> Not Found

Active Template is [includes/sts_template.html]

 

 

It looks like that the product_info.php.html is not active, please help!

Share this post


Link to post
Share on other sites

Can someone please explain or direct me to a example of how to add new items to the STS template commands.

 

I have recently installed the Happy Hour Special contrib and it causes some major formatting erros with STS.

 

I would like to add a new command, such as $HappyHour. This way I can assign the happyhour.php script to a table instead of it being combined with the column_left.php file. When the column_left.php is called it is added to the column_right and anything inbetween. This causes the happyhour.php to be loaded since it is called for in the column_left.php but it causes the happyhour.php to take place of the $content area in STS. $content is then moved to the footer area of the STS template due to this formatting error.

 

If you would like to see what I referring to simply view

www.shootpaint.com/catalog

While the clock on your computer reads between 1pm-5pm.

Share this post


Link to post
Share on other sites
Hi, h2oguyofnh

are you sure this is the right path to your product image? http://www.chriskofer.com/wwp2/product_inf...s/gspumpwwp.jpg

 

I'm quite sure it's not the right path. The images directory is close to the root of the store. I think product_info.php is also. Now on some stores, not including my live one, I see a question mark after the product_info.php in the url but on my stores I see a forward slash. Is this any help? My live store is wellwaterproducts.com which is a near-stock install. This seems to work.

Share this post


Link to post
Share on other sites
Can someone please explain or direct me to a example of how to add new items to the STS template commands.

 

I have recently installed the Happy Hour Special contrib and it causes some major formatting erros with STS.

 

I would like to add a new command, such as $HappyHour. This way I can assign the happyhour.php script to a table instead of it being combined with the column_left.php file. When the column_left.php is called it is added to the column_right and anything inbetween. This causes the happyhour.php to be loaded since it is called for in the column_left.php but it causes the happyhour.php to take place of the $content area in STS. $content is then moved to the footer area of the STS template due to this formatting error.

 

If you would like to see what I referring to simply view

www.shootpaint.com/catalog

While the clock on your computer reads between 1pm-5pm.

 

This may help: http://forums.oscommerce.com/index.php?showtopic=95929&hl=

Share this post


Link to post
Share on other sites

I am trying to integrate the login box contribution while using STS.

 

Typically you would add the following to the column_left.php file:

 

 

require(DIR_WS_BOXES . 'memberlogin.php');

 

For people who dont want the box displayed after the user has logged in, you can use the following code:

 

if (tep_session_is_registered('customer_id')) {

} else {

include(DIR_WS_BOXES . 'memberlogin.php');

 

However, there is no built in $code for this contribution in STS, so I have to figure out how to add it myself... and I have no knowledge of how to do this at all.

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
I am trying to integrate the login box contribution while using STS.

 

Typically you would add the following to the column_left.php file:

require(DIR_WS_BOXES . 'memberlogin.php');

 

For people who dont want the box displayed after the user has logged in, you can use the following code:

 

if (tep_session_is_registered('customer_id')) {

} else {

include(DIR_WS_BOXES . 'memberlogin.php');

 

However, there is no built in $code for this contribution in STS, so I have to figure out how to add it myself... and I have no knowledge of how to do this at all.

 

Any help would be greatly appreciated.

 

Look in column_left.php how the other infobox tags are created. You have to create your own $myloginbox in the same way and then use $myloginbox in your template.

- Rigadin

Edited by 241

STS PLUS, a variation of STS, is now available.

ACA 2.0 is also out!

Share this post


Link to post
Share on other sites

I've decided to add a template contribution and from what I have read so far on the forums, this is one of the best ones. I've read about the differences between STS and BTS and I would like to install STS. What I would like to ask you is could you please tell me what should I download from the contributions page ? there are so many updates there... could someone tell which are the ones needed ? Should I start with the one from 31 Jul 2005, v3.00 Beta 2 ? do I need any updates previous from that date or are they included in this one ? and what about the following ones ? which ones do I need ? Thanks in advance...

Share this post


Link to post
Share on other sites

I have installed STS for some time now and it's working great!

 

The only thing is that something goes wrong with javascript.

 

It gives errors at places where no javascript is.

 

for example it gives an error here:

function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
 if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
var password_current = form.elements[field_name_1].value;
var password_new = form.elements[field_name_2].value;
var password_confirmation = form.elements[field_name_3].value;

if (password_current == '' || password_current.length < field_size) {
  error_message = error_message + "* " + message_1 + "\n";
  error = true;
} else if (password_new == '' || password_new.length < field_size) {
  error_message = error_message + "* " + message_2 + "\n";
  error = true;
} else if (password_new != password_confirmation) {
error_message = error_message + "* " + message_3 + "\n";
  error = true;
}
 }
}

 

at line 13 character 58, while the line is only 56 charachters long!

 

Any idea what could be wrong?

Share this post


Link to post
Share on other sites

Hi!

 

I've recently installed STS, now I've started to design my shop but soon I got trouble...

 

I want to add a box with the "my account"...

 

Example; if i'm not logged in, it's only going to read "my account" there, but if logged in it shall read "my account" and "log out", exactly as the $myaccountlogoff behave...

 

How do I accomplish this? The problem is the box...

 

//Richmoijn

Share this post


Link to post
Share on other sites

I have altered the product_info.php.html and put it into the correct folder (the one with sts_template ing) but for some reason it is still defaulting to the normal product_info.php that came with osCommerce

Share this post


Link to post
Share on other sites

Can someone tell me if the STS beta 3.2 is considered stable?

 

Also i notcie in the download area that someon mentioned its not PHP5 or register_globals friendly yet?

 

Is this correct?

Share this post


Link to post
Share on other sites

hello,

 

i would use STS-3_00b2 in my shop

 

everything is working, only thing that makes problems is this contribution

http://www.oscommerce.com/community/contri...ch,advancedcart

 

i cant use the javescript function of the cart

 

anyone use this contribution ?

 

 

this is the install-read-me of the contrib

 

1, Make a backup of your existing catalog/includes/boxes/shopping_cart.php

2, Copy the shopping_cart.php included in this contribution to the catalog/includes/boxes folder.

3, Add the following styles to stylesheet.css....

 

SPAN.removeProduct {

font-family: Verdana, Arial, sans-serif;

font-size: 9px;

color: #3366FF;

font-weight: normal;

}

 

INPUT.quantitybox {

border: 1px;

border-style: solid;

border-color: #000000;

font-size: 12px;

width: 20px;

height: 22px;

border-spacing: 0px;

background: #F8f8f9;

}

 

4, In catalog/includes/application_top find

 

switch ($HTTP_GET_VARS['action']) {

 

and add the following immediately above:

 

if ($HTTP_GET_VARS['action'] == 'update_product') {

$parameters = array('action', 'pid');

$goto = basename($PHP_SELF);

}

 

5, In catalog/includes/classes/boxes.php add the following before the last ?> tag:

 

class cartBox extends tableBox {

function cartBox ($contents) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $this->infoBoxContents($contents));

$this->table_cellpadding = '1';

$this->table_parameters = 'class="infoBox"';

$this->tableBox($info_box_contents, true);

}

 

function infoBoxContents($contents) {

$this->table_cellpadding = '0';

$this->table_parameters = 'class="infoBoxContents"';

$info_box_contents = array();

$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),

'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),

'params' => 'class="boxText"',

'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));

}

$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

return $this->tableBox($info_box_contents);

}

}

 

 

anyone a idea, how i must modify the install to get work in STS

 

thanks

 

gb

Michael

Share this post


Link to post
Share on other sites

I just installed sts 3.0. But i don't see any java code on create_account.php and other pages. Examlpe:

 

<html>

<head><META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE

<title>Store :</title>

<META NAME="Description" Content="osCommerce - Hardware Software DVD Movies">

<META NAME="Keywords" CONTENT="">

<!-- EOF: Generated Meta Tags -->

<base href="http://store/">

 

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

 

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

 

<script LANGUAGE="JavaScript" SRC="/templates/mysite/sts_osc_javascript.js"></SCRIPT>

 

Please help me. How i can turn on java?

Edited by quine

Share this post


Link to post
Share on other sites

Cheers all, I have asked this before and have yet to figure this out. Maybe Mr. Brian Gallagher can comment too.

 

Suppose you wanted both tableless layout and total control of styling of data reported in the boxes of both basic osCommerce template as well as that in the STS contribution, how would you go about achieving it?

 

For example, I have found that STS helps one avoid php so long as you still wish to use the infoboxes. Once you try to style the infoboxes themselves, you wind up having to edit the source php all over again. In essence, having to edit three files, the .html STS file, the .php file, and finally the .css file.

 

How can one use CSS2.1 tableless stylesheets to control layout and styling of every aspect of user interface with osCommerce most efficiently?

 

Any recommended tableless layout sites to look at?

 

thx again

Share this post


Link to post
Share on other sites

i have downloaded and integrated the sts into my site. When i type my url into a browser i get the message:

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in/home/musicmil/public_html/includes/application_top.php on line 518

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in/home/musicmil/public_html/includes/application_top.php on line 518

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/musicmil/public_html/includes/application_top.php on line 518

 

I now cannot view my site or edit the sts.

 

If anyone has encountered this could you please offer me some advice.

Much appreciated

Share this post


Link to post
Share on other sites

Matthew

 

Group: Community Member

Posts: 1

Joined: 14-November 05

Member No.: 85,902

 

 

 

 

 

i have downloaded and integrated the sts into my site. When i type my url into a browser i get the message:

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in/home/musicmil/public_html/includes/application_top.php on line 518

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in/home/musicmil/public_html/includes/application_top.php on line 518

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/musicmil/public_html/includes/application_top.php on line 518

 

 

I now cannot view my site or edit the sts.

 

If anyone has encountered this could you please offer me some advice.

Much appreciated

Share this post


Link to post
Share on other sites

Hi,

 

I've installed this template system on my site and I now have a couple of errors to try and fix, can you help?

 

http://www.idealdeals.co.uk/store/ (live store)

 

It appears that in IE i get a syntax error and looking at the html it's producing it's all over the place. I checked this with W3C and get 193 errors / notes (obviously not all down to this mod but I can't find what Ineed to fix to stop it producing the error in IE). http://validator.w3.org/check?uri=http%3A%...ore%2Findex.php

 

Also,

the meta data isn' showing properly or I've got the wrong end of the stick?

 

Can somebody have a quick look at it for me and see if there's anything obvious I'm doing wrong?

 

Thanks

Share this post


Link to post
Share on other sites

$title

where would i define this variable so it doesnt show OSCommerce on top

 

also what belongs in

<!--$headcontent-->

 

please help me out here

 

thanks

Edited by vivaxone

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

×