Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 5 votes

[Contribution] STS v4


6117 replies to this topic

#41 dojo

  • Community Member
  • 6 posts
  • Real Name:Ramona Iftode

Posted 15 April 2006, 17:38

Please excuse me. Looks like I put gzip compression on and it made the pages blank. Don't know why, but now I was trying to revert my steps in the admin panel and it looks like this was the problem. So .. don't turn on gzip compression ..

#42 kokus

  • Community Member
  • 3 posts
  • Real Name:Jorge Vasquez

Posted 16 April 2006, 00:16

View Postbkellum, on Apr 14 2006, 09:24 PM, said:

I don't believe you need to do the edits mentioned for line 87 since you were doing a clean install of STS v.4.1. Those instructions were for users upgrading from STS v.3.

I did a clean install on one of my stores and all went as described in the original install document supplied with the STS v4.1 contribution.

Hope this helps, Bill Kellum

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

Edited by kokus, 16 April 2006, 00:18.


#43 Hunabku

  • Community Member
  • 19 posts
  • Real Name:Shwamostos Allegresters

Posted 16 April 2006, 01:14

View Postbkellum, on Apr 14 2006, 02:24 PM, said:

What are you wanting to do that you currently are having difficulties with? If you want a unique "home page", you can just creat an index.html and design to your hearts content. Otherwise, you should be able to create index.php.html as your unique home page and design all other page templates as well with their own unique style (shipping.php.html, account.php.html, login.php.html, etc, etc.).

For one of my clients, I designed a separate home page with a link to his shop, all done with STS v4. You can view it here: http://www.hatoverheels.com. Once on the home page, click on "hatalog" and then on one of the catagories to view the shop.

I don't know if this is what your asking or not. Hope I was able to help you out.

Bill Kellum

Bill,

Thank you so much for getting back to me. Yes if I put an index.html in my root it is the page that shows up when you enter the site. However if you click the "Continue" buttons, on several of the pages, it takes you to index.php - hence my problem.

As far as having to create separate templates for every page in the site (if I make an index.php.html template) - that seems like overkill to me.

Although I have several years experience in 4GLs and relational databases, this is my first OSC store, and I am trying to create as elegant of an approach as possible to meet most of the forseen needs of future stores.

Based on my research I decided to have my base functionality embodied in OSC/STS/PageHeader and attempt to handle other mods by editing php directly. Since I am hesitant to want to create separate templates for every page, I am leaning toward modifying the php code behind the "Continue" buttons to point to index.html instead of index.php.

Do you know of an easy way of globally changing the continue buttons to go to index.html?
Are there other buttons/links that reference index.php and need to be changed too?

Mucho mahalos,

PS - wouldn't it be better if the Continue button was a bit smarter? Instead of always going back to index.php it would go to the last product listing or what ever else is most relavent.

#44 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 16 April 2006, 01:39

View PostHunabku, on Apr 15 2006, 07:14 PM, said:

PS - wouldn't it be better if the Continue button was a bit smarter? Instead of always going back to index.php it would go to the last product listing or what ever else is most relavent.
Are you referring to the last step in the checkout process where the customer finalizes their purchase and hits continue? If this is the case, the default should be the product info page of your store.

Either way, here is some code for you to mess around with that may be the solution to your problem:
In shopping_cart.php, replace:

 $back = sizeof($navigation->path)-2;

with


$back = sizeof($navigation->path)-3;


In the above scenario, the continue button will bring the customer back to the category or listing they were last viewing, before adding a product to their cart.

I'm sure you could play around with this code to get it to do what you are looking for. I'm sorry I couldn't give you the exact code since I wasn't really sure what you were wanting to do. I'm on pain killers at the moment for a recent hernia surgery so things aren't so clear for me. :blink:

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

#45 Hunabku

  • Community Member
  • 19 posts
  • Real Name:Shwamostos Allegresters

Posted 16 April 2006, 03:14

Bill,

Hey trooper - thanks for the help amidst your recovery. I know about painkillers having that devil may care mind numbing effect - get well soon.

I'll spend some more time searching the main forum for a solution to the "Continue" button. Basically I am refering to the "Continue" that appears at the bottom of Shipping & Returns, Conditions of Use, etc. and even the shopping cart when it is empty. in all these cases clicking Continue takes you to "index.php". I would like to go to index.html - I'll probably have to change it in each php file - shouldn't be too hard.

Edited by Hunabku, 16 April 2006, 03:18.


#46 in-session

  • Community Member
  • 4 posts
  • Real Name:Christoph

Posted 16 April 2006, 16:39

hi,


1. Sorry for mine in English, I am German :lol:

2. I have installed yours contib and now have following problem with the HeaderTagContoller. However, so far everything functions quite well he does not register me in metadaten the product name and the product description. Only the shop name. if I the template off he indicates me all Metadaten again. It is natural for product searching machines badly if the metadaten are absent. Can you help me there?

thanks chris

#47 MrsPhim

  • Community Member
  • 4 posts
  • Real Name:Michelle

Posted 17 April 2006, 08:40

Hello! I just installed STS 4.1 and I am extremely new to Oscommerce, PHP, basically everything (only began using it for about a week).

When installing STS 4.1, my problem was that I had removed my /catalog subdirectory altogether. I think I installed everything correctly, changed all of the necessary files correctly, but since I don't have the /catalog subdirectory, I think the admin/modules.php file messed me up.

Can I just make some changes to the script so that wherever it says where the modules are, I am directing it to the right place....(instead of "$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';" it should say...?) Or am I just completely confused? I read in the Install Readme file about what to do if you renamed your /catalog subdirectory to "shop" or "store" but I think I need a clearer walkthrough....help please?? Thanks a lot!!

#48 Pex

  • Community Member
  • 4 posts
  • Real Name:Peter

Posted 17 April 2006, 09:35

Accessing $content placeholder from within PHP - how to?

Hi everyone,

I guess the topic says it all. I would like to access the normal $content STS "placeholder" variable from within PHP. Having browsed thru the documentation and the osCommerce forum, I really can't find anything that helps me out.

Basically, what I'm trying to achieve is to find the PHP-variable STS uses to store the $content placeholder inside.

I'd very much appreciate any help!

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

#49 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 09:50

View PostMrsPhim, on Apr 17 2006, 02:40 AM, said:

Hello! I just installed STS 4.1 and I am extremely new to Oscommerce, PHP, basically everything (only began using it for about a week).

When installing STS 4.1, my problem was that I had removed my /catalog subdirectory altogether. I think I installed everything correctly, changed all of the necessary files correctly, but since I don't have the /catalog subdirectory, I think the admin/modules.php file messed me up.

Can I just make some changes to the script so that wherever it says where the modules are, I am directing it to the right place....(instead of "$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';" it should say...?) Or am I just completely confused? I read in the Install Readme file about what to do if you renamed your /catalog subdirectory to "shop" or "store" but I think I need a clearer walkthrough....help please?? Thanks a lot!!
I'll try and help you along here. First of all, for a new installation, on a clean oscommerce shop, (meaning that you do not have any other contributions installed) you do not need to "change" any of the files manually. All you need to do is copy the "ADMIN" and the "INCLUDES" folders from the STS v4.1 contribution files over your existing "ADMIN" and "INCLUDES" folders in your oscommerce store files on your web server. That's it as far as having to change any files.

Now you need to follow the "CONFIGURATION" instructions that were included with the contribution. For the simplist form of template system, meaning only one template to cover all your pages in your store, just install the "DEFAULT" module. Do this by logging into your "ADMIN" section of your store, click on "MODULES", then select "STS", select "DEFAULT", and then select "INSTALL". Follow the instructions for setting up the "DEFAULT" module that were included with the contribution.

Good luck,

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

#50 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 09:58

View PostPex, on Apr 17 2006, 03:35 AM, said:

Accessing $content placeholder from within PHP - how to?

Hi everyone,

I guess the topic says it all. I would like to access the normal $content STS "placeholder" variable from within PHP. Having browsed thru the documentation and the osCommerce forum, I really can't find anything that helps me out.

Basically, what I'm trying to achieve is to find the PHP-variable STS uses to store the $content placeholder inside.

I'd very much appreciate any help!

Kind regards,
Peter
Peter, I could probably help you more if you told me what you wanted to do with the variable. If you are just trying to make a template for the "content" section of the page you would follow section 3.9.2 of the STS v4.1 manual. I have an example of it in action here.

Let us know more info if this does not help you out.

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

#51 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 10:19

View Postkokus, on Apr 15 2006, 06:16 PM, said:

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

#52 Pex

  • Community Member
  • 4 posts
  • Real Name:Peter

Posted 17 April 2006, 10:20

View Postbkellum, on Apr 17 2006, 11:58 AM, said:

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

#53 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 10:22

View PostFrisser, on Apr 15 2006, 11:20 AM, said:

I went back to version 4.07 :)
You were not able to get v4.1 to work?

Let me know,

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

#54 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 10:36

View Postscottmason, on Apr 13 2006, 07:04 AM, said:

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

#55 in-session

  • Community Member
  • 4 posts
  • Real Name:Christoph

Posted 17 April 2006, 11:43

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


#56 twitchylegs

  • Community Member
  • 1 posts
  • Real Name:scott hutchings

Posted 17 April 2006, 14:57

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

#57 bkellum

  • Community Member
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 17 April 2006, 16:07

View Posttwitchylegs, on Apr 17 2006, 08:57 AM, said:

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

#58 kokus

  • Community Member
  • 3 posts
  • Real Name:Jorge Vasquez

Posted 17 April 2006, 17:31

View Postbkellum, on Apr 17 2006, 06:19 AM, said:

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, 17 April 2006, 17:35.


#59 mikem42

  • Community Member
  • 12 posts
  • Real Name:Mike Morrison

Posted 18 April 2006, 13:04

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

#60 Hunabku

  • Community Member
  • 19 posts
  • Real Name:Shwamostos Allegresters

Posted 18 April 2006, 21:11

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