OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: [Contribution] STS v4
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Templates and Images
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
rigadin2
Hi everybody,

Version 4 is a major release of the excellent STS contribution that you can find here: http://www.oscommerce.com/community/contributions,1524,

I started a new thread to not mix with STS v2/v3 questions and because the v2/v3 thread has reached 147 pages! If you have problem with STS v2 or v3, please look here: http://forums.oscommerce.com/index.php?sho...c=58541&st=2920


The main advantages of this release are:

- Less code and several improvements, so should be faster..
- All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes.
- Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules).
- Write own module for checkout, create account or else: easy to share like payment modules.
- Switch STS on/off from admin. When off, you will see your store like it was before STS installation.
- Debug mode still available from URL, but with a code defined by admin => works like a password.
- If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors.
- Ready for product page caching. Not implemented yet, but doors are open.
- Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template).
- Installation is still very easy, modifications only at beginning and end of some files.
- Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template.
- All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications.
- Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean.
- Possibility to write php script in the templates, like in STS v3.
- Compatible with templates made for STS v2 or v3
- Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7, only few small modifications).


STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution.
Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS.

Changelog from STS PLUS v4.0.7:

- UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store.
- DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php
- UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here.
- UPDATED examples in sts_user_code.php.
- UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead.
- UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates.
- UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column.


You can also have a look at the STS PLUS thread here: http://forums.oscommerce.com/index.php?showtopic=187122, as many problems you will face have been discussed there.

- Rigadin
bkellum
Thanks Rigadin!

Looking forward to using this new version. Having STS and STS Plus combined once again will help push this contribution to the top of the class for OsCommerce! This contribution should be the "integrated" template system for any new OsCommerce packages.

Thank you Brian and Rigadin! thumbsup.gif

Bill Kellum
ianraba
Bloody hell, FANTASTIC!
scottmason
Ok I've got a question - great contribution by the way and I'm sure when I get it working I won't look back - but

I've just installed STS 4 great, in the sts templates folder supplied there are two folders one called FULL and the other called TEST.

Now do I customise the sts_template.html file in the FULL or TEST folder? which css file does it read from? do I need to create a new css file in the FULL or TEST folders?

Anyway I assumed it was the FULL folder as it seemed it had more in it then made some significant changes to the template like fixed width and center, background colours etc then went to admin and changed the template folder to FULL.

But none of the changes take effect on the site. If I put my old folder called MYSITE in the STS folder - which was included in the old version of STS - then change admin to read from that folder, it works, the changes take effect.

I'm confused

Can you offer any help?

cheers
--helmi-
Hi Rigadin.

Thanx You again 4 this great great Contrib!!!! thumbsup.gif

Unforunatly i have a little bit confusion about Your instal-Doc:

You write (for Updaters from STS Plus):
QUOTE
- Delete the following file:
- includes/modules/sts_inc/sts_column_right.php


If I do so, i lost my Content! blush.gif
With the "includes/modules/sts_inc/sts_column_right.php" its worx fine, like before.. rolleyes.gif


PEACE!

--h-
--helmi-
QUOTE (scottmason @ Apr 12 2006, 10:40 PM) *
(... )
Now do I customise the sts_template.html file in the FULL or TEST folder? which css file does it read from? do I need to create a new css file in the FULL or TEST folders?

(... )
I'm confused

Can you offer any help?

cheers



Hi ScottMason!

You can put it whereever You like it in Your Tmplates-Folder..!
I make a Folder "MyTemplates" and write it in thje Admin as Templatefolder..!
(Please see the Dox!) thumbsup.gif



PEACE!

--h-
rigadin2
QUOTE (--helmi- @ Apr 13 2006, 04:08 AM) *
Hi Rigadin.

Thanx You again 4 this great great Contrib!!!! thumbsup.gif

Unforunatly i have a little bit confusion about Your instal-Doc:

You write (for Updaters from STS Plus):
If I do so, i lost my Content! blush.gif
With the "includes/modules/sts_inc/sts_column_right.php" its worx fine, like before.. rolleyes.gif
PEACE!

--h-


When updating from STS PLUS to STS4, you have to delete this file but also modify some others. In your particular case, you have not updated includes/column_right.php. At the beginning of this file it should look like this:
CODE
// START STS 4.1
if ($sts->display_template_output) {
  $sts->restart_capture ('content');
} else {
//END STS 4.1
and you will see your content again.

The changes in the files are very small but of course they are important. The doc only tell which file to replace but in fact you should compare before replacing. Here are the changes to do:
- includes/application_bottom.php: remove the STS PLUS code at the beginning of the file, this tag is not used anywhere.
- includes/header.php: remove the STS PLUS code located at the end of the file.
- includes/column_right.php: already mentioned what to do there.
+ Update files in includes/modules/sts_inc and /sts.

Note: the STS contribution is now delivered with 2 template folders: test and full. By default the test folder is used and it contains only one template. Modify this template like you want, as a start. Use the "full" folder when you need examples on how to set templates for some specific pages.

In the delivered templates, the stylesheet used is the one located in the catalog folder. I know it's not really nice but there are some ways to change this. Just remember that link to stylesheet is relative to catalog folder when a script is running, and is relative to the template location when editing it. The variable $templatepath can also be used to dynamically build the link to the stylesheet (see the doc for more details).

- Rigadin
scottmason
QUOTE (--helmi- @ Apr 13 2006, 02:11 AM) *
Hi ScottMason!

You can put it whereever You like it in Your Tmplates-Folder..!
I make a Folder "MyTemplates" and write it in thje Admin as Templatefolder..!
(Please see the Dox!) thumbsup.gif
PEACE!

--h-



eh, not quite sure what you mean,

Where do I put "MyTemplates" folder and surley admin has to be directed to that folder of the same name. and what about the CSS and the sts_template.html in the FULL folder from the install not working!
FreeLancer
Hi Rigadin.

Thanx You.
Very cool works.
scottmason
QUOTE (FreeLancer @ Apr 13 2006, 12:30 PM) *
Hi Rigadin.

Thanx You.
Very cool works.



Hi how did you get this to work?

for instance i changed the Admin to read from the test folder, made some changes to the template.html in the test folder, the changes take effect but the place holders are just showing up as text..

the test folder seems pretty empty to me, it only contains the sts_template.html file, should there be other files in there.

I can only get this to work if i put an old mySite folder from STS.v3 and work from that one, if you get what i mean.

the documentaton suggests using the test folder, am i missing something really obvious
FreeLancer
QUOTE (scottmason @ Apr 13 2006, 11:46 AM) *
Hi how did you get this to work?

for instance i changed the Admin to read from the test folder, made some changes to the template.html in the test folder, the changes take effect but the place holders are just showing up as text..

the test folder seems pretty empty to me, it only contains the sts_template.html file, should there be other files in there.

I can only get this to work if i put an old mySite folder from STS.v3 and work from that one, if you get what i mean.

the documentaton suggests using the test folder, am i missing something really obvious

Goto http://SITE/admin/modules.php?set=sts&modu...ult&action=edit
chahge "test" to "full"

Read STS4.doc

sorry is my english, i'm from Russia
FreeLancer
Hmm..
Header Tags Controller don't works (
FreeLancer
QUOTE (FreeLancer @ Apr 13 2006, 11:55 AM) *
Hmm..
Header Tags Controller don't works (

YES!
http://forums.oscommerce.com/index.php?sho...=187122&st=280#
--helmi-
Hi Rigadin..

THANX 4 Your quick help!
No its worx very well!!! thumbsup.gif

PEACE!

--h-
--helmi-
QUOTE (scottmason @ Apr 13 2006, 08:30 AM) *
eh, not quite sure what you mean,

Where do I put "MyTemplates" folder and surley admin has to be directed to that folder of the same name. and what about the CSS and the sts_template.html in the FULL folder from the install not working!




You see the "../includes/STS_TEMPLATES/"
Here are the "TEST"-Folder & the "FULL"-Folder..
Here You can make Your own Templatefolders.

If You make "My_Templates" you hav to sign it into Your Admin-Interface of STS
"..admin/modules.php?set=sts"
--> Template folder
Put in: "MyTemplates" (without any "/" ! )

You see..? thumbsup.gif




--h-
scottmason
QUOTE (FreeLancer @ Apr 13 2006, 12:54 PM) *
Goto http://SITE/admin/modules.php?set=sts&modu...ult&action=edit
chahge "test" to "full"

Read STS4.doc

sorry is my english, i'm from Russia



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?
dr_lucas
I just installed the STS for the first time, quite an easy installation process, but after installing and trying to open the page I keep getting a blank page, tried it in normal mode and also in debug mode (index.php?sts_debug=debug)...
I enabled the mod in my admin (the default one)
am I doing something wrong?
dr_lucas
I forgot to mention that I installed it on my heavily modded store, and it behave the way I described it in the previous post. I just tried to install it on a brand new osC installation and everything seems to be working fine with the STS. I also triple checked all the files that needed to be modified in the catalog section and everything there seems to be as it should.
This is the link to my store: (that shows a blank page)
http://www.skpiercing.com/index.php?sts_debug=debug
And this is the link to my clean osC test site (that shows fine):
http://www.skpiercing.com/test/index.php?sts_debug=debug

Thanks in advance for any help.
Frisser
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)
dr_lucas
QUOTE (Frisser @ Apr 14 2006, 01:41 AM) *
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)


I got the header tags contribution installed as well (together with some other contributions and personal modifications that I made).
Hunabku
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
kenada
OK after installing STS4.1 I have lost my banner ads, they are turned on, and it even shows that they are seen n the admin, but they do not show up on my store. Any idea?
SteveODNet
Anybody know if this contribution work with register_globals turned off?

Thanks
SteveODNet
QUOTE (SteveODNet @ Apr 13 2006, 02:32 PM) *
Anybody know if this contribution work with register_globals turned off?

Thanks


To anwser my own question... yes, it does appear to work with register_globals turned off. So far, anyway.
Zolee
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:
CODE
<?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!
dr_lucas
QUOTE (Zolee @ Apr 14 2006, 04:49 PM) *
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:
CODE
<?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?
Frisser
QUOTE (Frisser @ Apr 13 2006, 06:41 PM) *
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.....
--helmi-
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.gif

PEACE!

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

on php.net i found a nice example...
CODE
<?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
CODE
<!-- 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 wink.gif
download at contributions page

sorry for this bad english
happy easter *fg*
dr_lucas
QUOTE (cally @ Apr 15 2006, 02:50 AM) *
same problems here with a blank page (updating from sts v3)

on php.net i found a nice example...
CODE
<?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
CODE
<!-- 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 wink.gif
download at contributions page

sorry for this bad english
happy easter *fg*


WoW, thanx for the quick fix man!
cally
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:
CODE
    $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
Hunabku
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.gif ...

QUOTE (Hunabku @ Apr 13 2006, 11:13 AM) *
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
bkellum
QUOTE (Hunabku @ Apr 14 2006, 06:08 PM) *
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.gif ...
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
kokus
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.
bkellum
QUOTE (kokus @ Apr 14 2006, 06:40 PM) *
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
Frisser
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
Frisser
QUOTE (Frisser @ Apr 15 2006, 08:50 AM) *
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.gif
bkellum
QUOTE (Frisser @ Apr 15 2006, 03:05 AM) *
Ignore post - I see it's the same problem as 2 posts ago huh.gif
Hello Frisser, Just to be sure, what corrected your problem?

Thanks for any additional information you can provide,

Bill Kellum
Frisser
QUOTE (bkellum @ Apr 15 2006, 02:22 PM) *
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 smile.gif
dojo
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 ...
dojo
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 ..
kokus
QUOTE (bkellum @ Apr 14 2006, 09:24 PM) *
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
Hunabku
QUOTE (bkellum @ Apr 14 2006, 02:24 PM) *
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.
bkellum
QUOTE (Hunabku @ Apr 15 2006, 07:14 PM) *
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:

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


with


CODE
$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.gif

Hope this helps,

Bill Kellum
Hunabku
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.
in-session
hi,


1. Sorry for mine in English, I am German laugh.gif

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
MrsPhim
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!!
Pex
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
bkellum
QUOTE (MrsPhim @ Apr 17 2006, 02:40 AM) *
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
bkellum
QUOTE (Pex @ Apr 17 2006, 03:35 AM) *
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.