Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hi great contrib !!!

But I've found an error :-(

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

1146 - Table 'Store.TABLE_COUPONS' doesn't exist

 

select * from TABLE_COUPONS where coupon_id = 'NEW_SIGNUP_DISCOUNT_COUPON'

 

[TEP STOP]

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

When I try to register as a new member....

 

I think it is because of the coupn contrib but I'm not sure... Is it possible that you check it out ?

 

Many, many thanks in advance.

 

P.

It sounds like you forgot to run the SQL script that came with the coupon contrib. Doesn't sound like an STS problem. I haven't used that contrib, so I can't tell you any more than that. Sorry!

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

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

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I installed Simple Template System and now the <html>, <head>, etc. tags are showing up twice.

. . . . . .

. . . . . .

 

If you have an old version, install the new one that fixes it. I think this was fixed in v1.3, current version is 1.4.

 

- Brian

 

. . . . . .

 

Actually, I have v1.5 with this problem.

 

 

I have the exactly same problem and - on some Pages (on checkout-process) there is an empty line on place for the "stylesheet-line" the result is therefore not "exactly" what i wish to see :huh: ( - if i checked it correct, the solution that was mentioned for this in 1.3 is contained in 1.5 - and the problem is still oder again here)

 

I hope on a hint for a solution - aehm - did i mentioned that i find this contribution veeryyy helpfull (beside this actual problem) and that i wish to thank for that ;)

Link to comment
Share on other sites

Wel. Just installed version 1.5 and get new problems.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

 

After this error, pages show well.

 

You can see error on Hosting : LMI :: version 1.5

 

On production zona I've 1.3 and work fine except a problem with Javascript.

 

Just on checkout_confirmation.php, if broser it's IE there are a problem with javascript. On source code, javascript fucntions are not writew correctly.

Hosting : LMI :: version 1.3

Link to comment
Share on other sites

Perhaps a dumm question, but does the error with TABLE_COUPON mean that the table COUPON doesn't exit or that the table COUPON (without the table in front of it) doens't exist.

 

It sounds like you forgot to run the SQL script that came with the coupon contrib. Doesn't sound like an STS problem. I haven't used that contrib, so I can't tell you any more than that. Sorry!

 

- Brian

 

Before I installed sts al was working fine Brian , so is it possible for you to install the coupon contrib as mentioned above one time ?

Link to comment
Share on other sites

Wel. Just installed version 1.5 and get new problems.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

 

After this error, pages show well.

 

You can see error on Hosting : LMI :: version 1.5

 

On production zona I've 1.3 and work fine except a problem with Javascript.

 

Just on checkout_confirmation.php, if broser it's IE there are a problem with javascript. On source code, javascript fucntions are not writew correctly.

Hosting : LMI :: version 1.3

I had the same error. I fixed it by moving the ?> to the end of the file instead of leaving it before the sts modification.

 

BeerCan

Link to comment
Share on other sites

I'm not sure as to why I'm getting this error. Can someone please explain how to fix this?

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511

 

 

Thanks,

Mike

Link to comment
Share on other sites

I'm not sure as to why I'm getting this error. Can someone please explain how to fix this?

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511

 

 

Thanks,

Mike

 

Mike,

 

I had the same problem with version 1.5, until I realized that I didn't add the neccessary lines to the config.php file (see below). After I added the lines to the config.php file, it worked perfectly. (thanks for the template solution Brian!)

 

---From version 1.5 readme.txt---

 

NOTE: configure-SAMPLE.php is included in the ZIP file, but you will have to

reenter all your configuration settings if you use it. It is easier

to just add the following lines to the bottom of your existing

/catalog/includes/configure.php:

 

// STS: ADD: Define Simple Template System files

define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');

define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');

define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');

define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');

define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');

define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');

// STS: EOADD

Link to comment
Share on other sites

Hi,

 

I am having great problems trying to modify the 'breadcrumbs' navigation - I have the STS template contrib installed.

 

Is there a known problem with this? or has anyone had problems with it and know how to fix it? I've been searching the forums and trying different code for hours and I just can't get it to work. :(

Link to comment
Share on other sites

I couldn't find the edit button :blink:

 

Just thought I'd add that when I try to add something to included/header.php (no matter what it is) it does not show up on the page.

 

I urgently need help with this - if someone could be so kind :(

 

thanks

Link to comment
Share on other sites

I installed Simple Template System and now the <html>, <head>, etc. tags are showing up twice.

. . . . . .

. . . . . .

 

If you have an old version, install the new one that fixes it. I think this was fixed in v1.3, current version is 1.4.

 

- Brian

 

. . . . . .

 

Actually, I have v1.5 with this problem.

 

 

I have the exactly same problem and - on some Pages (on checkout-process) there is an empty line on place for the "stylesheet-line" the result is therefore not "exactly" what i wish to see  :huh:  ( - if i checked it correct, the solution that was mentioned for this in 1.3 is contained in 1.5 - and the problem is still oder again here)

 

I hope on a hint  for a solution - aehm  - did i mentioned that i find this contribution veeryyy  helpfull (beside this actual problem)  and that i wish to thank for that    ;)

I found a solution that works for me, but if you are using another contrib for the titles, keywords, etc, it may not work

 

In sts_template.php I have

<html>
<head>
<!--$headcontent-->
</head>
<body>

 

and in sts_display_output.php I uncommented the stylesheet line and commented out the get_javascript line

 // Load up the <head> content that we need to link up everything correctly
 $template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n"; 
 $template['headcontent'] .= $sts_block['headertags'];
 $template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n";
 $template['headcontent'] .= '<link rel="stylesheet" type="text/css" href="stylesheet.css">' . "\n";
//  $template['headcontent'] .= get_javascript($sts_block['applicationtop2header'],'get_javascript(applicationtop2header)');

 

and I get the following html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>My Title</title><base href="http://www.mysite.com/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>
<body>

 

HTH

Link to comment
Share on other sites

Wel. Just installed version 1.5 and get new problems.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

 

 

I had the same error.  I fixed it by moving the ?>  to the end of the file instead of leaving it before the sts modification.

 

BeerCan

 

In what file move ?> on cofigure.php ? I don't understand

Link to comment
Share on other sites

I cannot believe how easy it is to make modifictions to the look and feel of OSC using this contribution. Again, thanks to Brian for giving us this jewel. Now all I need is a simple way to modify the look of the boxes and perhaps add a menus. Any suggestions for modifying boxes would be terrific.

best,

Murray

Link to comment
Share on other sites

I installed Simple Template System and now the <html>, <head>, etc. tags are showing up twice.

. . . . . .

. . . . . .

 

If you have an old version, install the new one that fixes it. I think this was fixed in v1.3, current version is 1.4.

 

- Brian

 

. . . . . .

 

Actually, I have v1.5 with this problem.

 

 

I have the exactly same problem and - on some Pages (on checkout-process) there is an empty line on place for the "stylesheet-line" the result is therefore not "exactly" what i wish to see  :huh:  ( - if i checked it correct, the solution that was mentioned for this in 1.3 is contained in 1.5 - and the problem is still oder again here)

 

I hope on a hint  for a solution - aehm  - did i mentioned that i find this contribution veeryyy  helpfull (beside this actual problem)  and that i wish to thank for that    ;)

I found a solution that works for me, but if you are using another contrib for the titles, keywords, etc, it may not work

 

In sts_template.php I have

<html>
<head>
<!--$headcontent-->
</head>
<body>

 

and in sts_display_output.php I uncommented the stylesheet line and commented out the get_javascript line

 // Load up the <head> content that we need to link up everything correctly
 $template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n"; 
 $template['headcontent'] .= $sts_block['headertags'];
 $template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n";
 $template['headcontent'] .= '<link rel="stylesheet" type="text/css" href="stylesheet.css">' . "\n";
//  $template['headcontent'] .= get_javascript($sts_block['applicationtop2header'],'get_javascript(applicationtop2header)');

 

and I get the following html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>My Title</title><base href="http://www.mysite.com/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>
<body>

 

HTH

The problem with this 'solution' is that pages that use javascript won't work.

 

Also, from your code snippets you aren't using the v1.5 code (no stylesheet tag in sts_template.html, and the stylesheet code is not commented out in sts_display_output.php.

 

I would try updating your files to the latest version of STS (v1.5 at the moment) and see if you still have the problems.

 

If the latest version doesn't fix it, It could be that my get_javascript() routine isn't working correctly please post a URL for me to look at the source of?

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

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

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I cannot believe how easy it is to make modifictions to the look and feel of OSC using this contribution. Again, thanks to Brian for giving us this jewel.  Now all I need is a simple way to modify the look of the boxes and perhaps add a menus. Any suggestions for modifying boxes would be terrific.

best,

Murray

Thanks! I'm glad you like it.

 

On my site I'm probably not going to use the $categorybox as the primary naviagation on my site. I might have it somewhere on the side, but I'll probably make a graphical menu system (like I put on http://jewelrydays.com [not my site, I just created it] ) as a simpler, more user-friendly navigation system. That's why I added the $urlcat_XXX links in v1.5 so that I could make links from my imagemaps.

 

Basically, my goal is to get osC to the point where it can do all the things that I've done with custom code before. It's a very powerful foundation, but I need something simple enough for my novice users to use, and the stock osC, um, isn't it. God help me trying to explain to someone how to use the Attributes!

 

Maybe I'll tackle that next... :)

 

- Brian

Edited by DiamondSea

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

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

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Wel. Just installed version 1.5 and get new problems.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

 

 

I had the same error.  I fixed it by moving the ?>  to the end of the file instead of leaving it before the sts modification.

 

BeerCan

 

In what file move ?> on cofigure.php ? I don't understand

Yes in configure.php Originally I just cut and pasted the modifications to configure.php to the end of the file and I had the same issue as you are having. I then realized I had to move the ?> Now I am no programmer but I beleive that is some kind of end file indicator.

 

BC

Link to comment
Share on other sites

Yes in configure.php Originally I just cut and pasted the modifications to configure.php to the end of the file and I had the same issue as you are having. I then realized I had to move the ?> Now I am no programmer but I beleive that is some kind of end file indicator.

 

The programming/logic parts of OSC are written in PHP and are stored in what are basically HTML files.

 

The <? and ?> tags separate the PHP programming code from the HTML display code. If you want it to be a "programming command" as opposed to a "display command" you need the code to be between the <? and ?> tags.

 

In most of the header files, the entire file is enclosed in the <? and ?> tags, which means that it is all PHP programming code, not HTML display code.

 

For example, if you have this in a file "demo.php":

 

<html>
<head>
<title>Title goes here</title>
</head>
<body>
This is the HTML Source
[b]<? 
echo " and this is printed from";
echo " a PHP script command ";
?>[/b]
and this is more HTML code
</body>
</html>

 

It would print out in your browser

 

This is the HTML Source and this is printed from a PHP script command and this is more HTML code

 

That help at all?

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

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

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

The problem with this 'solution' is that pages that use javascript won't work.

 

Also, from your code snippets you aren't using the v1.5 code (no stylesheet tag in sts_template.html, and the stylesheet code is not commented out in sts_display_output.php.

 

I would try updating your files to the latest version of STS (v1.5 at the moment) and see if you still have the problems.

 

If the latest version doesn't fix it, It could be that my get_javascript() routine isn't working correctly please post a URL for me to look at the source of?

 

- Brian

 

I am using v1.5, I was showing the changes I made to get it to work for me. You can the output from my stock v1.5 in my first post here: http://www.oscommerce.com/forums/index.php?sho...ndpost&p=233195

Link to comment
Share on other sites

Sorry if I missed this in the instructions somewhere - but is there a way to define extra variables (or whatever you want to call them)?

 

for example - $myaccount - shows "My Account", can I define one like $myhistory = "My History" ?

Link to comment
Share on other sites

Wel. Just installed version 1.5 and get new problems.

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67

 

 

I had the same error.  I fixed it by moving the ?>  to the end of the file instead of leaving it before the sts modification.

 

BeerCan

 

In what file move ?> on cofigure.php ? I don't understand

Yes in configure.php Originally I just cut and pasted the modifications to configure.php to the end of the file and I had the same issue as you are having. I then realized I had to move the ?> Now I am no programmer but I beleive that is some kind of end file indicator.

 

BC

wel this it's my config.php end:

  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
?>

 

And error show line 51. This it's >?.

 

I'm looking for a returb carriage or any stupid problem, but all code it's well. All lines end with a CR return.

 

I'm lost.

 

Error page

Link to comment
Share on other sites

I am also on a brand new clean install, and the only mod is STS v1.5. I also have the double html and header tags.

 

Did I miss a solution? I do need Javascript to work as I use javascript rollovers for navigation so commenting out that portion won't be good for me.

 

Just to be sure I did a second clean install on a different server/domain, and but this time I added WebMakers.com's Header Tag Controller contribution afterwords to see the results...

 

The first HTML/Header tags include the header tag controller contents,

 

The second set are normal HTML/Head/ Etc. but not the content in the meta tags.

 

Granted I have not yet had time to dig through yet.... SO does anyone have a correction? :blink:

Steve K AKA - Knipper -

Link to comment
Share on other sites

I have also got a clean install of 1.5 - am not using any titles contributions but am getting the double <html><head> tag problem as described in previous posts.

 

This is how mine appears

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Shop</title>
<base href="http://www.mydomain.com.au/catalog/">

<!-- start get_javascript(applicationtop2header) //-->
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<title>Shop</title>
<base href="http://www.mydomain.com.au/catalog/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->

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

Edited by coiL
Link to comment
Share on other sites

I have also got a clean install of 1.5 - am not using any titles contributions but am getting the double <html><head> tag problem as described in previous posts.

 

I just uploaded a new version 1.6 which corrects this problem.

 

Here's the (stupid) fix for the (stupid) mistake I made in the file:

 

In sts_display_output.php line 354 in the get_javascript function remove the variable $tmpstr from the returned string.

 

Replace:

return  "\n<!-- start $commentlabel //-->\n$tmpstr\n<!-- end $commentlabel //-->\n";

With this:

return  "\n<!-- start $commentlabel //-->\n\n<!-- end $commentlabel //-->\n";

It was a stupid, stupid error. I apologize to everyone for the hassle.

 

- Brian :wacko:

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

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

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

and if you don't want the comments there at all change it to

  // If empty, return nothing
 if ($tablestart === false) {
	 return  "\n";
 }

 

 

Great fix :D Thanks for working on it.

 

 

Is it possible to use php in the sts_template? or does anyone know how I could make it so that the "My Account" etc only displays when the user is logged in?

 

I don't need to know the code, just where abouts I could edit it.

 

thanks :)

Link to comment
Share on other sites

i just did the _easy_ installation of 1.6, and am getting these error messages.

 

Warning: main(includes/sts_restart_capture.php): failed to open stream: No such file or directory in /home/jim/public_html/catalog/includes/header.php on line 15

 

Fatal error: main(): Failed opening required 'includes/sts_restart_capture.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jim/public_html/catalog/includes/header.php on line 15

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