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

[Contribution] STS v4

Recommended Posts

Hi!

 

Sorry for my bad english.

My webshop its new.

My footer.php don't displayed.

with sts 4.1 enabled.

enabled

 

My footer.php:

<?php
/*
 $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
// START  STS 4.1
if ($sts->display_template_output) {
 include DIR_WS_MODULES.'sts_inc/sts_footer.php';
} else {
//END STS 4.1

 require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
 // START  STS 4.1
}
// END STS 4.1
?>

 

 

Please help me!

 

Just wondering, did you have a chance to test the included footer.php and see if it works? If you haven't, extract it from the mod packagae and overwrite your original...

Any change?

Share this post


Link to post
Share on other sites
Same problem here. My shop worked fine with STS Plus 4.0.7 but after the upgrade my screen is blank. If I disable STS in the admin the shop is working fine!

Double checked everything (i hope...) but it doesn't work.... (I also have headertags installed)

 

Replaced sts.php in the includes/classes with the old 4.0.7 version and now it works! What changed in the new sts.php? Strange.....

Share this post


Link to post
Share on other sites

Hi Rigadin..!

 

Is it possible to make specialy Templates for each language..?

f.e. A own english index.php.html and another1 for a differnt language..?

 

I?m afraid its in the current version not possible, because i found nothing about it in the DOC.. :blush:

 

PEACE!

 

--h-

Share this post


Link to post
Share on other sites

same problems here with a blank page (updating from sts v3)

 

on php.net i found a nice example...

<?php
for ($i=0; $i<10; $i++) {
 ob_start();
 echo "This is iteration $i: <br/>";

 // * Don't do this!
 // $buf = ob_get_contents();
 // ob_clean();

 // * Use this instead:
 $buf = ob_get_clean();

 echo $buf;
  echo memory_get_usage()."\n";
}
?>

so i change some code in class 'sts.php' ( function start_capture and stop_capture ).

 

now i also got some unwanted html code ( on top ) in my source - 'result' ...

its the code right after

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

till

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

and also the capture between

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

and

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

 

looking like this

<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<!-- right_navigation_eof //-->
</table></td>
 </tr>

</table>
<!-- body_eof //-->

<!-- footer //-->

so i add one line in column_left.php and footer.php before the 'include'.

( see update.txt )

 

i also need to include the 'clean_html_comments.php' to the headertags.php-module

 

next problem:

if you have different styles, you also want different buttons depending on language?!

 

i uploaded the new sts.php class, the sts_default.php module, the headertags.php module and an instruction for the style-depending-buttons addon ;)

download at contributions page

 

sorry for this bad english

happy easter *fg*


xio cally - check your mail daily

Share this post


Link to post
Share on other sites
same problems here with a blank page (updating from sts v3)

 

on php.net i found a nice example...

<?php
for ($i=0; $i<10; $i++) {
 ob_start();
 echo "This is iteration $i: <br/>";

 // * Don't do this!
 // $buf = ob_get_contents();
 // ob_clean();

 // * Use this instead:
 $buf = ob_get_clean();

 echo $buf;
  echo memory_get_usage()."\n";
}
?>

so i change some code in class 'sts.php' ( function start_capture and stop_capture ).

 

now i also got some unwanted html code ( on top ) in my source - 'result' ...

its the code right after

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

till

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

and also the capture between

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

and

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

 

looking like this

<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<!-- right_navigation_eof //-->
</table></td>
 </tr>

</table>
<!-- body_eof //-->

<!-- footer //-->

so i add one line in column_left.php and footer.php before the 'include'.

( see update.txt )

 

i also need to include the 'clean_html_comments.php' to the headertags.php-module

 

next problem:

if you have different styles, you also want different buttons depending on language?!

 

i uploaded the new sts.php class, the sts_default.php module, the headertags.php module and an instruction for the style-depending-buttons addon ;)

download at contributions page

 

sorry for this bad english

happy easter *fg*

 

WoW, thanx for the quick fix man!

Share this post


Link to post
Share on other sites

so if you want the style menu edit the 'Template folder' in admin like this 'full;test'

now you can change the template folder with

index.php?sts_template=0 (folder = full - also default)

index.php?sts_template=1 (folder = test )

 

or make a style array for your template *g*

simple add to sts_user_code.php:

	$stylearray = array ( array (
							 'id' => '0',
							 'text' => 'OSC-Design'),
					  array (
							 'id' => '1',
							 'text' => 'Test-Design')
					 );
$sts->template['stylemenu'] = tep_draw_form('changestyle', FILENAME_DEFAULT, 'get', '') . tep_draw_pull_down_menu('sts_template', $stylearray, '0', 'onChange="this.form.submit();"') . '</form>';

now add $stylemenu to your template.html file

 

there 'was' a little typo in sts.php class on line 87 :/

just change to

$this->template_folder = $template_folder_installed[$sts_template_folder];

 

or replace with the new once


xio cally - check your mail daily

Share this post


Link to post
Share on other sites

Anyone PLEASE - Am I hallucinating here or is it just not possible to create a unique template only for index.php. - site home page. If I create a template called index.php.html with the index module turned on then every page on the site automatically gets index.php.html formatting. Yes index.php_0.html works for the catalog(catagories) home page but how would I handle the site home page?

 

please help me - I'm melting :blink: ...

 

Greetings fellow STSers - (I recently posted the following in the old STS plus forum an then read about this new forum - so here it is)

 

I've sucessfully utilitized pretty much all of the template features in STS plus, including the recent addition for handling product_info templates specific to given category - works great by the way - thanks Rigadin.

 

However, I can not create a unique template specific to index.php (site home page). This does not seem to be a feature of STS or STS plus or have I missed something obvious here?

 

In my attempts, I have manually edited the index.php code to include a separate(non-template) html file that displays only for the home page. But with STS active my html file occurs at the $content# placeholder along with the rest of the default template and I don't want the template, just the content(separate html file).

 

If I could suppress STS only for index.php(home) display my prayers would be answered.... or does anybody have other strategies that I might employ here?

 

thxs

Share this post


Link to post
Share on other sites
Anyone PLEASE - Am I hallucinating here or is it just not possible to create a unique template only for index.php. - site home page. If I create a template called index.php.html with the index module turned on then every page on the site automatically gets index.php.html formatting. Yes index.php_0.html works for the catalog(catagories) home page but how would I handle the site home page?

 

please help me - I'm melting :blink: ...

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

I have a clean installation of STS v4.1. I replaced the new sts.php. I run my store and I got some html code on top of my template (some blue oscommerce logo along with my breadcrumbs) and my $footer still didn't work. I change back to the old sts.php from clean installation of STS v4.1 and everything work like before. $footer didn't work though.

 

I already updated the sts_default.php module, headertags.php module and I opened the my sts.php file to try to add the change on line 87, to my surrprise didnt find the piece of code in line 87. I found some comments.

 

Am I doing anything worong. I want the $footer to work.Any help is appreciated.

Share this post


Link to post
Share on other sites
I have a clean installation of STS v4.1. I replaced the new sts.php. I run my store and I got some html code on top of my template (some blue oscommerce logo along with my breadcrumbs) and my $footer still didn't work. I change back to the old sts.php from clean installation of STS v4.1 and everything work like before. $footer didn't work though.

 

I already updated the sts_default.php module, headertags.php module and I opened the my sts.php file to try to add the change on line 87, to my surrprise didnt find the piece of code in line 87. I found some comments.

 

Am I doing anything worong. I want the $footer to work.Any help is appreciated.

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

Edited by bkellum

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

For some strange reason I also get 2 headers on my page (http://www.retroshop.nl). If you look in the source you will see that it put some code before the <head>.

This is after a upgrade from 4.07

Edited by Frisser

Share this post


Link to post
Share on other sites
For some strange reason I also get 2 headers on my page (http://www.retroshop.nl). If you look in the source you will see that it put some code before the <head>.

This is after a upgrade from 4.07

 

Ignore post - I see it's the same problem as 2 posts ago :huh:

Share this post


Link to post
Share on other sites
Ignore post - I see it's the same problem as 2 posts ago :huh:
Hello Frisser, Just to be sure, what corrected your problem?

 

Thanks for any additional information you can provide,

 

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
Hello Frisser, Just to be sure, what corrected your problem?

 

Thanks for any additional information you can provide,

 

Bill Kellum

 

I went back to version 4.07 :)

Share this post


Link to post
Share on other sites

I have installed this on a fresg oscommerce install. Spent 7 hours modding the theme to be as the old site was, entered the admin panel and changed name of the site and tried to add a product and now the site is a BLANK PAGE. Nothing there ... even the view sorce gets me an empty page.

 

I need help .. I am desperate ...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

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

×