Jump to content
Latest News: (loading..)
rigadin2

[Contribution] STS v4

Recommended Posts

Thanks for response Bill. I am using the sts.php file that came with the fresh installation of STS v.4.1. My $footer still not working.

 

any ideas?

 

My Store Project

Do you have the following file: http://www.graffodesign.com/catalog/includ.../sts_footer.php ?

 

If so, you may have accidentally added a space, possibly at the end of the file that is causing your footer not to display correctly. Make any corrections to the above page if you have made any changes in the past. Try looking at line 17 of the code on your sts_footer.php page.

 

Let me know if this helps,

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Peter, I could probably help you more if you told me what you wanted to do with the variable.

Bill,

 

thank you for replying - your devotion to STS (and its users) is really amazing.

 

The idea is to place the following "pseudo code" in my default sts_template.html file:

 

<?php echo($stsvariable->content); ?>

 

Initially, it is only for testing purposes. In the long run, however, I'm trying to create an efficient system that consists of as few template files as possible to maintain. As my shop won't be using dynamically created category links (but rather use png-images linked to fixed "cPath="-URL:s), my idea is to have every single template file call a "global" PHP-function that creates the entire shop. Again, using "pseudo code":

 

<?php
// this is one of the template files
include "createShopHTML.php"; // contains createShopHTML() function used below

$categories[0] = createStaticURL("action_games.png");
$categories[1] = createStaticURL("flight_simulators.png");
$categories[2] = createStaticURL("puzzle_games.png");

createShopHTML($categories); // pass the category array to the createShopHTML-function and create the entire page
?>

 

The createShopHTML() function would then access the STS $content placeholder, creating the actual page. I'm hoping this makes sense to you :).

 

Regards,

Peter


Load "H.E.R.O.", 8, 1 : Run

Share this post


Link to post
Share on other sites
tried that already, still doesn't work, like i said the only way i get this to work is if i use my old folder that i had for STSv3 and change it to that in admin.

 

what are the FULL and TEST folders for?

Scott, I'll try and make this a little easier to understand for you...

 

To use STS v4.1 in it's most simplist form, meaning using only one template for all of your pages in your store, you would set your admin panel to point to the one template in the "test" folder.

 

To use STS v4.1 in a more complex scenario, meaning that you control what template to use for specific pages such as your account.php page, shipping.php page, index.php page and so on, you would set your admin panel to point to the several templates in the "full" folder.

 

Try using the test folder first and get STS v4.1 up and running with no errors. Then customize your shop even further by changing over to the templates in the "full" folder. You can add more templates to the "full" folder by adding the name of the php page along with the html extention.

 

I hope this helped,

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Can nobody help me?

 

With me the Metadaten of the product info are not indicated correctly, there is no product name and the product description.

 

I have installed the following modules:

 

Header Tags Controller v2.5.7 Complete

STS v4.1

Module for Header Tags Controller

 

I think that the mistake in the lines general.php lines.

 

	$sts->template['headertags']= "<title>" . TITLE . "</title>"."\n"; // ORIGINAL LINE
$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="description" content="'. TITLE .'">'."\n"; //LINE I ADDED
$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="keywords" content="'. TITLE .'">'."\n"; //LINE I ADDED

Share this post


Link to post
Share on other sites

Hi,

 

I've got STS installed and its working fine. I'm developing a unique design for my store. How do you change the way an item such as $categorybox (Categories, show on the left side in the default template) is displayed? Do you recommend changing the categories.php or the stylesheet.css file? Or something else entirely?

 

thanks,

 

Scott

Share this post


Link to post
Share on other sites
Hi,

 

I've got STS installed and its working fine. I'm developing a unique design for my store. How do you change the way an item such as $categorybox (Categories, show on the left side in the default template) is displayed? Do you recommend changing the categories.php or the stylesheet.css file? Or something else entirely?

 

thanks,

 

Scott

This depends entirely upon what you are wanting to change. If you are referring to the colors, border, fonts, etc, then you will need to edit the stylesheet.css file. The stylesheet.css is limited however. If you want to make extensive edits to the infoboxes, you may be better served to install one of the infobox editor contributions.

 

Otherwise, the listings are controlled by the names of the catagories that you have enabled within the oscommerce admin panel.

 

Hope this helps,

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Do you have the following file: http://www.graffodesign.com/catalog/includ.../sts_footer.php ?

 

If so, you may have accidentally added a space, possibly at the end of the file that is causing your footer not to display correctly. Make any corrections to the above page if you have made any changes in the past. Try looking at line 17 of the code on your sts_footer.php page.

 

Let me know if this helps,

 

Bill Kellum

 

Bill:

Thanks for the response. I have the file at http://www.graffodesign.com/catalog/includ.../sts_footer.php

 

I have checked everything and I don't see any problem. If you click in the above url. I get an error in line 17.

 

Warning: main(DIR_WS_INCLUDEScounter.php): failed to open stream: No such file or directory in C:\Inetpub\vhosts\graffodesign.com\httpdocs\catalog\includes\modules\sts_inc\sts_footer.php on line 17

 

Fatal error: main(): Failed opening required 'DIR_WS_INCLUDEScounter.php' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\graffodesign.com\httpdocs\catalog\includes\modules\sts_inc\sts_footer.php on line 17

 

 

Do you see anything wrong on my code?. This is my sts_footer.php:

 

<?php
/*
 $Id: sts_footer.php,v 4.1 2005/02/10 22:30:54 rigadin Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2005 osCommerce

 Released under the GNU General Public License

Based on: Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher - brian@diamondsea.com
STS v4.1 by Rigadin (rigadin@osc-help.net)
*/


// Get the number of requests
 require(DIR_WS_INCLUDES . 'counter.php');	 [color=#FF0000]//LINE 17[/color]
 $sts->template['numrequests'] = $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted;

/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/
 $sts->template['footer_text']= FOOTER_TEXT_BODY;

// Get the banner if any
 $sts->start_capture();
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
echo tep_display_banner('static', $banner);
 }
 $sts->stop_capture ('banner_only');
 require (DIR_WS_MODULES . 'sts_inc/sts_display_output.php'); // Print everything out
?>

 

thanks in advance. I am new in PHP. Maybe I missed something in the code above.

 

kokus

Edited by kokus

Share this post


Link to post
Share on other sites

Hi,

 

I'm fairly new to osCommerce so jumped at the change to make editing of templates easier. I've downloaded STS 4.1 as well as the updates (dated 12th and 14th April) and uploaded these new files to my site, but though I'm getting the STS menu option in my admin/modules, it shows the same list as for 'Payment Modules'. That is, I'm not seeing any opportunity to actually enable 'default' and get started.

 

Am I missing something obvious?! Thanks so much

 

Mike

Share this post


Link to post
Share on other sites

Yet another HTC installer in distress,

 

OK I know i could start my HTC install all over from scratch, but it takes too dang long to find and replace code for the admin files. So I thought i would just try and ask if anyone has insights into the following error:

 

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php:33) in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php on line 33

 

thanxs

Share this post


Link to post
Share on other sites
Yet another HTC installer in distress,

 

OK I know i could start my HTC install all over from scratch, but it takes too dang long to find and replace code for the admin files. So I thought i would just try and ask if anyone has insights into the following error:

 

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php:33) in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php on line 33

 

thanxs

I don't have a lot of time to really look into this but right off the top of my head it appears you have a duplicate file. Check your files and folders to see if this is the case as well as duplicate code.

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php:33) in /home/robbie/goodkarmaflags-www/catalog/includes/modules/sts_inc/sts_user_code.php on line 33

 

Same problem here. STS Plus 4.07 used to work, but STS 4.1 won't.

My error is:

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in \basic_osc\catalog\includes\modules\sts_inc\sts_user_code.php:33) in \basic_osc\catalog\includes\modules\sts_inc\sts_user_code.php on line 52
Call Stack
#	Function	Location
1	{main}()	\basic_osc\catalog\index.php:0
2	require('\basic_osc\catalog\includes\application_bottom.php')	\basic_osc\catalog\index.php:343
3	require('\basic_osc\catalog\includes\modules\sts_inc\sts_display_output.php')	\basic_osc\catalog\includes\application_bottom.php:12

 

The two patches by cally are installed too.

Share this post


Link to post
Share on other sites

Great contrib! I am not very handy with HTML coding ans stuff so its very usefull to be able to make some adjustments to my site to remove the 'out-off-the-box' look. Thanks for adding a manual in this version. The one thing I cannot find is how to edit the appearance of all the boxes in the left and right column. How do I do this?

Thanks for all the help you can give!

Edited by baroen

Share this post


Link to post
Share on other sites

baroen, You can't template the boxes (yet) with STS, you need another contribution for that (like Infobox Skin Manager: http://www.oscommerce.com/community/contributions,1680). You can do much with CSS and images though.

 

And an answer to myself according to my previous post (problem with redeclare):

There had to be some remains of 4.07 installation wchich caused the problems 'cause when I installed this all over again to a completely clean installation it worked. Don't know what the 'cause was though.

Share this post


Link to post
Share on other sites
Same problem here. STS Plus 4.07 used to work, but STS 4.1 won't.

My error is:

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in \basic_osc\catalog\includes\modules\sts_inc\sts_user_code.php:33) in \basic_osc\catalog\includes\modules\sts_inc\sts_user_code.php on line 52
Call Stack
#	Function	Location
1	{main}()	\basic_osc\catalog\index.php:0
2	require('\basic_osc\catalog\includes\application_bottom.php')	\basic_osc\catalog\index.php:343
3	require('\basic_osc\catalog\includes\modules\sts_inc\sts_display_output.php')	\basic_osc\catalog\includes\application_bottom.php:12

 

The two patches by cally are installed too.

 

teniemi,

 

I'm not sure your problem is the same as mine, since I had nothing referencing line 52 and i didn't get all that stuff after Call Stack. I think Bill's suggestion about duplicate files was correct in my case, it seems I had a duplicate file in my admin dir - also in catalog. After I cleaned it up works fine now - except am I supposed to get the text "- osCommerce:" appearing at the end of my page titles or for the entire page title?

Share this post


Link to post
Share on other sites
teniemi,

 

I'm not sure your problem is the same as mine, since I had nothing referencing line 52 and i didn't get all that stuff after Call Stack. I think Bill's suggestion about duplicate files was correct in my case, it seems I had a duplicate file in my admin dir - also in catalog.

 

Call stack comes from the debugger I have installed, it doesn't come up with default PHP installation. referencing line 52 just points to the closing tag of the same function as the line 33, maybe it's PHP version that causes the errors to be different. However I just noticed that the error comes from incorrect upgrade.

If you upgrade your STS Plus 4.07 to STS 4.1, remember to modify application_bottom.php and remove the following lines from there (as these are now handled in footer.php):

 

$sts->stop_capture('footer2applicationbottom');

require (DIR_WS_MODULES . 'sts_inc/sts_display_output.php'); // Print everything out

Share this post


Link to post
Share on other sites
baroen, You can't template the boxes (yet) with STS, you need another contribution for that (like Infobox Skin Manager: http://www.oscommerce.com/community/contributions,1680). You can do much with CSS and images though.

 

Do you know where i can find some how-to's to edit the CSS? When I look in the OSC dirs i find several CSS files, for starters I do not know which one I have to modify. Does anyone know a place where I can read some info about editing the CSS files for OSC?

Share this post


Link to post
Share on other sites
Do you know where i can find some how-to's to edit the CSS? When I look in the OSC dirs i find several CSS files, for starters I do not know which one I have to modify. Does anyone know a place where I can read some info about editing the CSS files for OSC?

This doesn't directly relate to STS, but the default stylesheet is in the catalog dir and stylesheet.css, you can change the stylesheet to whatever you want by using normal HTML ways and STS templates.

Share this post


Link to post
Share on other sites

I'm running into a problem.

I am using product_info.php.html to adjust my looks of the Product page but I want to still have a popup box opening up with an enlarged image of my product.

I inserted the following code:

 

 
<script language="javascript">
<!--
document.write('<a href="javascript:popupWindow(\'popup_image.php?pID=$productid$\')">Click to enlarge</a>');
//-->
</script>

 

I tried: $productid$, $productsid$, $productid & $productsid

Non of the work, they constantly just display $productsid (or one of the others), but when I put in say the name or price, it DOES fill the space in with the name or price..I just need my image to able to enlarge..

 

Anybody can help? Or has a solution? Thanks!

Share this post


Link to post
Share on other sites
Do you know where i can find some how-to's to edit the CSS? When I look in the OSC dirs i find several CSS files, for starters I do not know which one I have to modify. Does anyone know a place where I can read some info about editing the CSS files for OSC?

 

I came across an excellent (basic, down to earth) resource giving an easy explanation of each item listed in the stylesheet.css included in osCommerce.

 

You can view it by going to the developer's web site here. :thumbsup:

 

The above link will take you to a "fully commented" definition of each item in the style sheet with correlating examples.

 

Hope this was useful,

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Can nobody help me?

 

With me the Metadaten of the product info are not indicated correctly, there is no product name and the product description.

 

I have installed the following modules:

 

Header Tags Controller v2.5.7 Complete

STS v4.1

Module for Header Tags Controller

 

I think that the mistake in the lines general.php lines.

 

 $sts->template['headertags']= "<title>" . TITLE . "</title>"."\n"; // ORIGINAL LINE
$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="description" content="'. TITLE .'">'."\n"; //LINE I ADDED
$sts->template['headertags'] = $sts->template['headertags'] . '<meta name="keywords" content="'. TITLE .'">'."\n"; //LINE I ADDED

Take a look at the following posts and see if it helps out your situation:

 

Post one

 

Post two

 

Hope the above links were able to help you out.

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
After I cleaned it up works fine now - except am I supposed to get the text "- osCommerce:" appearing at the end of my page titles or for the entire page title?
Did you do this step in the install process?

 

- includes/header.php: remove the STS PLUS code located at the end of the file.

-Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi, I have a client that I am embedding a this catalog into her site. I'm using the STS, which has been so far WONDERFUL. I've been able to use an image map, and it looks great!

 

This is my problem. My client wants to be able to link certain catalog catagories in her pages outside of the catalog. I'm sure its something simple, but I'm having complete a complete brain freeze week.

 

Thanks in advance,

Tammy

Share this post


Link to post
Share on other sites
Did you do this step in the install process?

 

- includes/header.php: remove the STS PLUS code located at the end of the file.

-Bill Kellum

 

aloha Bill,

 

I did that and it still does the same. Allow me to be a bit more specific.

 

For the page title of my catalog home page (index.php_0.html) all i get is "- osCommerce :". For my category product listings I get the category name followed by osCommerce ex. "Vertical Streamers - osCommerce :" For my individual products I get the correct page title ex. "Nirvana Streamer"

 

I am using product info/content templates specific to each category, a template for the catalog home page and the default template for everything else - including category product listings and my secondary pages, such as shipping.php, which also only get "- osCommerce :").

 

Any ideas? - thanks for all your help, it really has made a difference over here! :D

Share this post


Link to post
Share on other sites

I need some help here, it's refering to inserting the Optional Related Products.

I opened the modules/sts_inc/product_info.php and on line 101 I inserted:

 

// DANIEL: begin - show related products
 $attributes = "select pop_products_id_slave, products_name, products_price, products_tax_class_id, products_image from " . TABLE_PRODUCTS_OPTIONS_PRODUCTS . ", " . TABLE_PRODUCTS_DESCRIPTION . " pa, ". TABLE_PRODUCTS . " pb WHERE pop_products_id_slave = pa.products_id and pa.products_id=pb.products_id and language_id = '" . (int)$languages_id . "' and pop_products_id_master = '".$HTTP_GET_VARS['products_id']."' and products_status=1 order by pop_order_id, pop_id";
 $attribute_query = tep_db_query($attributes);
 if (mysql_num_rows($attribute_query)>0) {
echo '<tr><td><br><table class="productlisting">';
echo '<tr><th align="left" class="productListing-heading" colspan="2"> '.TEXT_RELATED_PRODUCTS.' </th></tr>';
while ($attributes_values = tep_db_fetch_array($attribute_query)) {
  $products_name_slave = ($attributes_values['products_name']);
  $products_id_slave = ($attributes_values['pop_products_id_slave']);
  if ($new_price = tep_get_products_special_price($products_id_slave)) {
	$products_price_slave = $currencies->display_price($new_price, tep_get_tax_rate($attributes_values['products_tax_class_id']));
  } else {
	$products_price_slave = $currencies->display_price($attributes_values['products_price'], tep_get_tax_rate($attributes_values['products_tax_class_id']));
  }
  echo '<tr><td align="left" class="productListing-data">';
// show thumb image if Enabled
  if (MODULE_RELATED_PRODUCTS_SHOW_THUMBS!='False') {
	echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">' . tep_image(DIR_WS_IMAGES . $attributes_values['products_image'], $attributes_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</a></td><td align="left" class="productListing-data">';
  }
  echo ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_slave) . '">'.$products_name_slave.' @ '.$products_price_slave.'</a> </td></tr>';
}
echo '</table></td></tr>';
 }
//DANIEL: end

 

The things is that it shows the optional related products, only problem I'm not able to move it around, it's on top and stays on top. So on some way I need to try and make this to be able to insert into products_info.php.html by something like $optionalrelated.

 

I tried to enclose it between

	$template_pinfo['optionalrleated'] =

and

;

 

Anybody can give me some help to fix this and be able to fix this for more people. .

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

×