Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

posted this on the regular contributions support board, but found this thread and thought I'd have a go at it since the other post hasn't even been viewed!

 

I have STS from you DiamondSea and have edited the sts_template.html file and followed the easy install directions on STS. The sts_template.html page displays perfectly when punched up directly in my browser, but if I punch up the "www.domain.com/catalog" I get the followng error (the asterisks were added by me to replace the names of my directory structure)

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /**/**/**/**/httpdocs/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php4/php') in /**/**/**/**/httpdocs/catalog/includes/application_top.php on line 511

 

 

I tried setting the debuggin settings in the sts_display_output.php file, but I don't think that worked - not sure.

 

I'm not even sure if that is how it supposed to work when you try to bring up the catalog. Should I contact DiamondSea directly as they are the author of this contribution? I'm new on the boards so gimme some guidance y'all!

Thanks!

Brooke W. B)

Link to comment
Share on other sites

posted this on the regular contributions support board, but found this thread and thought I'd have a go at it since the other post hasn't even been viewed!

 

I have STS from you DiamondSea and have edited the sts_template.html file and followed the easy install directions on STS. The sts_template.html page displays perfectly when punched up directly in my browser, but if I punch up the "www.domain.com/catalog" I get the followng error (the asterisks were added by me to replace the names of my directory structure)

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /**/**/**/**/httpdocs/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php4/php') in /**/**/**/**/httpdocs/catalog/includes/application_top.php on line 511

 

 

I tried setting the debuggin settings in the sts_display_output.php file, but I don't think that worked - not sure.

 

I'm not even sure if that is how it supposed to work when you try to bring up the catalog. Should I contact DiamondSea directly as they are the author of this contribution? I'm new on the boards so gimme some guidance y'all!

Thanks!

Brooke W. B)

From the STS FAQ:

 

6) I get the error message:

 

    Fatal error: Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /pathtoyourwebsite/catalog/includes/application_top.php on line 511

 

Answer: You did not copy the define statements at the bottom of your configure-SAMPLE.php file into your production configure.php file in your /catalog/includes/ directory.

 

Cheers!

 

- 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

hi

 

Does anyone know how to add footer images to the infoboxes with sts. Have tried the normal method but nothing shows up with sts activated.

 

Any help appreciated.

 

Ian

Same here, But I would like to remove the header text also and wrap the whole $categorybox inside and just have the categories output is this possible?

Link to comment
Share on other sites

hi

 

Does anyone know how to add footer images to the infoboxes with sts. Have tried the normal method but nothing shows up with sts activated.

 

Any help appreciated.

 

Ian

Same here, But I would like to remove the header text also and wrap the whole $categorybox inside and just have the categories output is this possible?

This will be in the next version.

 

You know, just to tease you. ;-)

 

- bg

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 have sorted this little problem out, I have now got a complete category infobox inside a wrap box I made all I need to do I mod css and images for cat to make more eye catching.

Does anyone know how to get rid of the -> in categories it is horrible.

 

sts.gif

 

I will now modify all other boxes, on a roll now. :lol:

 

If anyones interested I will put details here what I did, wouldnt be possible wothout you all, and sts thx Brian.

Link to comment
Share on other sites

My problem is that either STS or osCommerce are not seeing my product_info.php.html file.

Whether I use the sample as provided with STS or my own, neither is being used.

 

If you look at http://www.atrracewear.com/catalog/include...t_info.php.html, you'll see the default template I am trying to implement. 

 

My desired template is at: http://www.atrracewear.com/catalog/include...fo.php-atr.html (obviously it needs some tweaking, but I want to get it running first!)

 

I think I simply have some sort of basic configuration error going on, or something is in the wrong place, wrong permissions, etc.

Any suggestions? More detailed info is posted a few posts back...

Link to comment
Share on other sites

My problem is that either STS or osCommerce are not seeing my product_info.php.html file.

Whether I use the sample as provided with STS or my own, neither is being used.

 

If you look at http://www.atrracewear.com/catalog/include...t_info.php.html, you'll see the default template I am trying to implement. 

 

My desired template is at: http://www.atrracewear.com/catalog/include...fo.php-atr.html (obviously it needs some tweaking, but I want to get it running first!)

 

I think I simply have some sort of basic configuration error going on, or something is in the wrong place, wrong permissions, etc.

Any suggestions? More detailed info is posted a few posts back...

Got all the right DEFINE's in your configure.php file?

 

The template directory one is new to 2.x.

 

- 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 have sorted this little problem out, I have now got a complete category infobox inside a wrap box I made all I need to do I mod css and images for cat to make more eye catching.

Does anyone know how to get rid of the -> in categories it is horrible.

 

sts.gif

 

I will now modify all other boxes, on a roll now. :lol:

 

If anyones interested I will put details here what I did, wouldnt be possible wothout you all, and sts thx Brian.

Very interested in how you did this. The biggest thing I hate about OSC is that all 'boxes' look the same. Some I don't mind about but a few I could do with a different colour or style.

Link to comment
Share on other sites

As you can see now I have made the wrapper a strechy one so it adjusts with the content, also put bullet images in and got rid of the horrible little -> at the end of each cat, I will use diff coloured bullets to push the categories with sub categories.

I can apply this to all infoboxes no problem, my next mission is the centre boxes, Mission Impossible maybe.

Edited by j0ker
Link to comment
Share on other sites

Very interested in how you did this. The biggest thing I hate about OSC is that all 'boxes' look the same. Some I don't mind about but a few I could do with a different colour or style.

Wondernet I will compile and clean up what I have and post here for all to have k, just that I am not a coder and things do get a little messed up when I start on a project.

The change I made where simple in:

includes/boxes/categories.php I commented out all ref to images the

includes/classes/boxes I commented out text for categories

 

then I made a sliced box in fireworks then imported into a table in breamweaver and copied this table to the left column, then I just pasted the categories tag into the centre of my infobox and done.

 

A bit more too it but thats it simply if you want to have a bash.

 

I will do a basic wrapped infobox and all instructions for install then put in sts contrib download section maybe call it a sts plugin if this is ok with Brian.

Link to comment
Share on other sites

My problem is that either STS or osCommerce are not seeing my product_info.php.html file.

Whether I use the sample as provided with STS or my own, neither is being used.

 

If you look at http://www.atrracewear.com/catalog/include...t_info.php.html, you'll see the default template I am trying to implement.?

 

My desired template is at: http://www.atrracewear.com/catalog/include...fo.php-atr.html (obviously it needs some tweaking, but I want to get it running first!)

 

I think I simply have some sort of basic configuration error going on, or something is in the wrong place, wrong permissions, etc.

Any suggestions? More detailed info is posted a few posts back...

Got all the right DEFINE's in your configure.php file?

 

The template directory one is new to 2.x.

 

- Brian

As far as I can tell, the DEFINE statements are in all the right places. I installed the most recent version of STS.

 

Here's what /catalog/includes/configure.php looks like:

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.atrracewear.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.atrracewear.com');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/homepages/20/d104505977/htdocs/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'db102.perfora.net'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'dbo104883864');

define('DB_SERVER_PASSWORD', 'vUZNXm.B');

define('DB_DATABASE', 'db104883864');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

// 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', DIR_WS_INCLUDES . 'sts_templates/');

define('STS_DEFAULT_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');

define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');

// STS: EOADD

?>

 

 

===

 

Thanks for any help!

Link to comment
Share on other sites

Hi david

 

Thanks for contributing. I think I've already done the things in your list so that it looks like this:

 

Example.gif

 

My question is if I use your wrapper will that not appear all the time regardless of if a particular infobox is showing or not (eg if your logged in you get extra boxes).

 

I have tried to add a footer image to the individual box files but it only shows up if sts is disabled.

 

Cheers

 

Ian

Link to comment
Share on other sites

I want to remove the product_nofification infobox but not the bestsellers infobox I have looked in the right column as I should on normal osc without sts but it wasnt there it was worht a try, where can I comment out this info box plz.

Link to comment
Share on other sites

Tried editing the last post but it bummed out on me sorry for this post.

 

FOUND EM They where hidding in the left column sneaky beggers. thx. :rolleyes:

Link to comment
Share on other sites

Does the $urlcat tag work? Anybody know?

 

I am having a heck of a time sharing security with two domains. I have no problem with the secure pages using another urlpath, but then the links if I use relative stay with that url path and will not work.

 

If I use absolute urls to reference secure pages then the next page won't load without a warning because it has http links in it....

 

It's a big circle and making my head hurt!

 

Will using $urlcat help this?

 

Thanks Brian for this wonderful contribution. It looks to be a big hit with everyone.

 

Best,

 

Dave

Link to comment
Share on other sites

Hi,

 

I have installed osCommerce 2.2ms2 and STS 2.01, but get the following:

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /data/members/free/tripod/uk/j/u/t/jutr/htdocs/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/data/apache/php/mmp_lib') in /data/members/free/tripod/uk/j/u/t/jutr/htdocs/catalog/includes/application_top.php on line 511

 

All relevant files have been uploaded and the define statements have been added to the configure.php file in the /catalog/includes/ directory.

 

Can anyone help, please?

 

Here's my URL - http://members.lycos.co.uk/jutr/catalog/index.php

 

Thanks in advance,

 

Justin

Link to comment
Share on other sites

Hi

 

i just installed STS contrib , it's just great .

 

Here is my problem . i want to use the original "header.php" and include it on the template.html . but there is no tag for this :( .

So i did this :

 

rename the template.html in template.php , made the change in the configure.php also it's now like

define('DIR_WS_TEMPLATE', DIR_WS_INCLUDES . 'template.php');

 

so it's working .

i left the original header.php in the include folder

 

in the template.php i added this :

<table width="800" border="0" align="center" cellpadding="3" cellspacing="0">
 <tr>
   <td><?php require(DIR_WS_INCLUDES . 'header.php'); ?></td>
</table>

 

but when i load the catalog in my browser the header is not here :(

 

could u help me please ?

Link to comment
Share on other sites

you can't use PHP code in the sts_template.html (and you can't rename it either).

 

Use the sts_user_code.php to define a '$string' and put the '$string' in the HTML template file. All explained in the install guide that STS comes with.

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