Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

hello all

i just install sts for the first and wondering how i can modifiy the header. when i change the header.php nothing happened. what i am doing wrong?

 

thanks

Go through and read the README file. You do not need to modify the php files. All you do is make an html file and that is what is displayed.

Link to comment
Share on other sites

Rick,

 

I'm running OSC MS 2.2 w/ Linda's Shoppe Enhancement Controller (which btw is incredible and will give a complete running detailed shop w/ STS added, including full attribute capability, not only drop down menu's but radio buttons, check boxes and text attributes, quantity discount pricing, and the rest of the whole deal)

 

hth a little

Greg

How do I find Linda's shoppe enhancement?

 

Thanks

 

Peter

Link to comment
Share on other sites

Warning: main(includes/sts_product_info.php): failed to open stream: No such file or directory in /home/februus/public_html/includes/sts_display_output.php on line 132

Fatal error: main(): Failed opening required 'includes/sts_product_info.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/februus/public_html/includes/sts_display_output.php on line 132

 

I get this everytime I click an image in the "Whats New?" box? My site is My Webpage can anyone help me out?

 

Thanks in Advance,

jchiesa

Link to comment
Share on other sites

Iggy,

 

Rename the product_info.php.html-SAMPLE file to product_info.php and copy it to your includes/sts_templates directory and it should work

 

Greg

Did that, and it works fine, but I can't seem to figure out how to get product 2 to have a different layout than product 1. I'm pretty convinced it's just me not reading the documentation right. Can you apply the same syntax to the product_info.php.html that you can for the templates?

 

product_info.php_XX.html

 

Also, although I can specify a category template and subcategory template when it gets to the product display it defaults to the sts_template.html in includes. Can't seem to get around this. Is this normal behaviour for sts or am I doing something wrong?

 

Thanks for your help!

Iggy

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

Link to comment
Share on other sites

Iggy....No, you're not reading anything incorrectly. All the product info pages are the same, however, if you look back to page 121, 122 around in there, there are a couple of solutions to this that may work.

 

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

Iggy....No, you're not reading anything incorrectly. All the product info pages are the same, however, if you look back to page 121, 122 around in there, there are a couple of solutions to this that may work.

 

Greg

Thanks Greg,

 

That's what I thought. I've got the store pretty heavily modded at this point and haven't been able to get those fixes to take. But I'll keep trying!

 

Thanks again!

Iggy

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

Link to comment
Share on other sites

this is what my config file looks like:

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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://februuscomics.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.februuscomics.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'februuscomics.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.februuscomics.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_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', '/home/februus/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be NULL for productive servers
 define('DB_SERVER_USERNAME', 'februus_osc1');
 define('DB_SERVER_PASSWORD', 'VN6PhS5GdCrW');
 define('DB_DATABASE', 'februus_osc1');
 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

?>

 

Any Ideas? When I click the image inside of the "Whats New?" box I get a page that states

Warning: main(includes/sts_product_info.php): failed to open stream: No such file or directory in /home/februus/public_html/includes/sts_display_output.php on line 132

Fatal error: main(): Failed opening required 'includes/sts_product_info.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/februus/public_html/includes/sts_display_output.php on line 132

 

Anyone Know?

 

Thanks,

Joey

Link to comment
Share on other sites

Now guys who master php or sts_system. a challenging question for u guys:

 

I am using overture market console to find out the traffic stats abt who came from which link or site and how many transaction happened etc...... also whis key word a person used to find the site on search engines. for that u have to sign up for the program (paid) and they give u three kinds of codes.

 

one is the one that needs to be there in every single page. thats working fine as i actually added that code in <head> section of sts_template.html.

 

now there is another one that needs to be there only on the checkout_success.php page so the code should be there when the customer has done the order and we show them "Success". i added that code in <head> section of checkout_success.php file but it doesnt work.

 

any idea where should i put it ir any way i can write a if statement some where or create a duplicate of sts_template.html , for say sts_template2.html and assign this way that only for checkout success page, it use sts_template2.html instead of normal one.

 

your thoughts and ideas are welcome. plz undestand that i have novice knowledge of php.

Link to comment
Share on other sites

Brian,

 

I've installed your contribution and had success modifying the sts_template.html file in the catalog/includes directory but I can't seem to take advantage of STS's other features, like the default category template or the product_info template.

 

Is there something that I need to do that's not covered in the readme file (I'm using STS 2.0 btw)?

 

For example, I created a category called Books (cPath=21). Following your directions, I created an "sts_templates" subfolder under "includes" and created the file, "index.php_21.html" and threw a few tags on it for testing purposes. However, osCommerce seems to ignore my changes completely as I see nothing happening in my site. The same holds thru for the product_info.php.html-SAMPLE file. I did as as the readme suggests, renaming it to product_info.php.html and placing it in the sts_templates folder but again, nothing happens.

 

Any help you (or anyone else in the know) could give is greatly appreciated.

 

Thanks,

 

Rick

 

Just wanted to follow-up on my earlier post in case anyone was having a similar problem. The answer was to install Christophe B's August 25 bug fix, which he states fixes the following:

Some bugs corrected in sts_display_output.php:

 

The april 2004 update inserted 2 bugs that are corrected here:

1) The page-specific template did not work anymore, basic template always was always used.

2) The page info_shopping_cart.php was not displayed anymore as a popup window.

 

I also got errors, with some applications only, because of use of ".=" with a variable that was not set or with an array. This is now corrected.

So, if you're having the problem of not being able to use page-specific templates, even after following the installation instructions meticuously, you might want to grab the latest version of STS...

 

Rick

Link to comment
Share on other sites

Has anyone installed Header Tags Controller v2.3.2 after installing STS 2.01?

 

In the ReadMe file for STS, it says all you need to do is Just copy the Header Tag Controller's include files into place and STS will automatically add them to all pages without having to modify every PHP script in the /catalog/ directory.

 

Is that all there is to the HTC installation? What about the .sql file that's included with HTC? Does anyone have any experience with this installation post STS? I'm inclined to just follow HTC's installation steps but I'm a little confused by this comment in the bonus feature section of the STS readme.

 

Help, as always, is greatly appreciated.

 

Rick

Link to comment
Share on other sites

Whilst I LOVE the whole PHP thang... :wub: been doing some self-introduction to constomizing osCommerce look and feel so I can do changes as per designs... :blink: but in my zelousness, I have "flubbed" something up and cannot seem to find my "flubb" :wacko:

 

After putting in 2.2 Milestone 2 - and then installing 2.01 STS, have lost header element of the template all-together.... :blink: so no breadcrumbs bar and above... :blink: any possible things to look for? :huh: Because I have YET to find it... and was hoping someone out there might have a clue :wacko: because - I sure that I have not got one idea what it could be yet that makes any sense to me. :huh:

 

Anyway.... :D

 

Thanks in advance... dru.

Link to comment
Share on other sites

Now guys who master php or sts_system. a challenging question for u guys:

 

I am using overture market console to find out the traffic stats abt who came from which link or site and how many transaction happened etc...... also whis key word a person used to find the site on search engines. for that u have to sign up for the program (paid) and they give u three kinds of codes.

 

one is the one that needs to be there in every single page. thats working fine as i actually added that code in <head> section of sts_template.html.

 

now there is another one that needs to be there only on the checkout_success.php page so the code should be there when the customer has done the order and we show them "Success". i added that code in <head> section of checkout_success.php file but it doesnt work.

 

any idea where should i put it ir any way i can write a if statement some where or create a duplicate of sts_template.html , for say sts_template2.html and assign this way that only for checkout success page, it use sts_template2.html instead of normal one.

 

your thoughts and ideas are welcome. plz undestand that i have novice knowledge of php.

 

anyone plz.... guide me to right direction.

Link to comment
Share on other sites

Now guys who master php or sts_system. a challenging question for u guys:

 

I am using overture market console to find out the traffic stats abt who came from which link or site and how many transaction happened etc...... also whis key word a person used to find the site on search engines. for that u have to sign up for the program (paid) and they give u three kinds of codes.

 

one is the one that needs to be there in every single page. thats working fine as i actually added that code in <head> section of sts_template.html.

 

now there is another one that needs to be there only on the checkout_success.php page so the code should be there when the customer has done the order and we show them "Success". i added that code in <head> section of checkout_success.php file but it doesnt work.

 

any idea where should i put it ir any way i can write a if statement some where or create a duplicate of sts_template.html , for say sts_template2.html and assign this way that only for checkout success page, it use sts_template2.html instead of normal one.

 

your thoughts and ideas are welcome. plz undestand that i have novice knowledge of php.

 

anyone plz.... guide me to right direction.

If you wanted to try that, all you need to do is make an sts_templates folder, and make a file called checkout_success.php.html and put it in there. This is how you use the multiple templates, which was added to version 2.01 (I believe). So, read the readme file again and see if you find that in there.

Link to comment
Share on other sites

Whilst I LOVE the whole PHP thang... :wub: been doing some self-introduction to constomizing osCommerce look and feel so I can do changes as per designs... :blink: but in my zelousness, I have "flubbed" something up and cannot seem to find my "flubb" :wacko:

 

After putting in 2.2 Milestone 2 - and then installing 2.01 STS, have lost header element of the template all-together.... :blink: so no breadcrumbs bar and above... :blink: any possible things to look for? :huh: Because I have YET to find it... and was hoping someone out there might have a clue :wacko: because - I sure that I have not got one idea what it could be yet that makes any sense to me. :huh:

 

Anyway.... :D

 

Thanks in advance... dru.

Can I see your page?

Link to comment
Share on other sites

Please Help.

 

I've recently installed STS V2.00 and all working well. :-)

 

However I cannot seem to get the Product_Info.php.html working.

 

I have followed the install instructions to the letter, but I'm obviously missing something.

 

I have copied all of the sts_ files into my /catalog/includes directory including the sts_product_info.php, and copied and renamed the product_info.php.html into /catalog/includes/sts_templates directory.

 

However I seem to still be calling up the original product_info.php file, and not the template version.

 

Do I need to make a change to the original /catalog/product_info.php file, or is it something else.

 

Any help would be greatly appriciated.

If it ain't broke, you're not trying hard enough!!

Link to comment
Share on other sites

Has anyone installed Header Tags Controller v2.3.2 after installing STS 2.01?

 

In the ReadMe file for STS, it says all you need to do is Just copy the Header Tag Controller's include files into place and STS will automatically add them to all pages without having to modify every PHP script in the /catalog/ directory.

 

Is that all there is to the HTC installation? What about the .sql file that's included with HTC? Does anyone have any experience with this installation post STS? I'm inclined to just follow HTC's installation steps but I'm a little confused by this comment in the bonus feature section of the STS readme.

 

Help, as always, is greatly appreciated.

 

Rick

Yes you need to install the sql file if you want it to work. And no they might not work right out of the box so to speak. They will work together but is does take a little tweaking to get it right.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

I'm working to "STS-ize" my out-of-the-box site, and I'm delighted with the results so far. I have a newbie's question:

 

I want to create some additional pages. I've tried one contribution that enables one to do that, but it gave my basic STS/Header Tags Controller installation an acute attack of indigestion. (Actually it generated some substantive SQL errors, too). Is there a step-by-step procedure laid out somewhere for doing this? What files need to be modified? The pages I have would mostly be static--an "about" page and a few resources/info pages.

 

I suppose I could simply create these in HTML . . . but what would be the fun of that?

 

Thanks! Back to my template designs.

 

Anne

Link to comment
Share on other sites

Does anyone know how to replace the "Let's See What We Have Here" page header with the name of the category or sub-category the user selected?

 

In other words, if the user selects the category "Books", then I want the word "Books" to show up in place of "Let's See What We Have Here". Anyone managed to do this?

Link to comment
Share on other sites

Does anyone know how to replace the "Let's See What We Have Here" page header with the name of the category or sub-category the user selected?

 

In other words, if the user selects the category "Books", then I want the word "Books" to show up in place of "Let's See What We Have Here". Anyone managed to do this?

 

The header tag contrib will take care of that for you!!

 

Greg

I only do what my Rice Krispies tell me to do!

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