Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

What version of STS are you using now? Is STS even installed at the moment?

 

I wouldn't recommend installing anything until you figure out what the problem is that is causing your blank page in both the admin and the front end. If you have STS installed now, then you need to go into the admin and turn it off to see if that takes care of your blank page.

 

I'm thinking this is not realted to STS at all but rather a fouled osC RC2a upgrade. Try your RC2a upgrade again or install RC2a from scratch and then install STSv4.6.

 

 

Hi, I installed a free sts template in 2005.

I was unsure if I installed sts contribution, but when I look in admin in my old store (not able to enter the nuew one), there is no sts in there to turn on or off.

Also ckecked my database in phpMyadmin, and cannot find anything there, so I guess I only have installed a template and not the contribution. Is that possible?

 

When I look into my sts files, they have different versions:

 

$Id: sts_start_capture.php,v 1.1 2003/09/22 05:16:09 jhtalk Exp $

$Id: sts_display_output.php,v 1.2 2004/02/05 05:57:12 jhtalk Exp $

$Id: sts_product_info.php,v 1.3 2004/02/05 09:36:00 jhtalk Exp jhtalk $

 

Could the old sts template files themselves make my site go blank if not updated to match the new RC2 files?

Even if the sts contribution is not installed?

 

If not, I will have to go through all changed files for the RC2 upgrade to see if I have missed something there (shop has many mods).

 

Also, is it possible for me to install later the sts 4.6 version on these old sts files?

 

 

Thanks :-)

Best regards

Kjolebutikken

Link to comment
Share on other sites

Hi, I installed a free sts template in 2005.

I was unsure if I installed sts contribution, but when I look in admin in my old store (not able to enter the nuew one), there is no sts in there to turn on or off.

Also ckecked my database in phpMyadmin, and cannot find anything there, so I guess I only have installed a template and not the contribution. Is that possible?

 

When I look into my sts files, they have different versions:

 

 

 

Could the old sts template files themselves make my site go blank if not updated to match the new RC2 files?

Even if the sts contribution is not installed?

 

If not, I will have to go through all changed files for the RC2 upgrade to see if I have missed something there (shop has many mods).

 

Also, is it possible for me to install later the sts 4.6 version on these old sts files?

 

 

Thanks :-)

 

 

You must have a much older version (prior to STSv3) so you will not have anything in the admin but you will have configuration files in your includes/configure.php. You should remove each line of STS code in your configure.php. You should also remove all STS lines of code from the other files in your shop. You could do this be using a file comparison tool to compare your shop with a stock RC2a shop.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

You must have a much older version (prior to STSv3) so you will not have anything in the admin but you will have configuration files in your includes/configure.php. You should remove each line of STS code in your configure.php. You should also remove all STS lines of code from the other files in your shop. You could do this be using a file comparison tool to compare your shop with a stock RC2a shop.

 

So what you are saying is that I have to remove all old sts on my shop before installing the sts 4.6 version?

In addition to removing all sts code, I also must delete all sts files?

 

Do you think these old sts codes are the cause if the site gone blank?

 

Yes, it seems to be old, (v1.1 / 1.2 / 1.3 from 2003 - 2004) as far as I can see.

 

 

Thanks :-))

Best regards

Kjolebutikken

Link to comment
Share on other sites

You should enable the following modules:

STS Default

STS Index

 

Then, select your template folder that you want to use for all of your templates in the STS Default module.

 

Then, create your template that you need using the following naming syntax below and save it in the template folder that you selected above:

TIP

Here is a quick rundown of common template names:

 

  • sts_template.html
    • = Default template

    [*]index.php.html

    • = Default Category template (used for all category pages that do not have a specific template page created for it – if you didn’t have this template, STS would use sts_template.html).

    [*]index.php_0.html

    • = Home page template

    [*]index.php_x.html

    • = Specific category template where x = the category ID. This template will create your custom category template(s) that you are interested in.

    [*]index.php_x_y.html

    • = Specific subcategory template where x = the category ID and y = the subcategory ID

    [*]product_info.php.html

    • = Default Product template (used for all products, in all categories, if no specific product template is found).

    [*]product_info.php_c23.html

    • = Product template for all products in a specific category (23 in this example – change to the category ID needed)

    [*]product_info.php_23.html

    • = CONTENT template for product ID 23. All content template should be saved in the SGP/content/ folder. Review the sample content template provided in the STS template “full/content” folder. The STS Module Product Info must be enabled in order to use this STS feature. This template is not recommended unless you really know what you are doing since you would need to make modifications to it if you ever added new osCommerce contributions to your shop.

    [*]popup_image.php.html

    • = Template for the product popup image.

    [*]index.php.mfr.html

    • = Default Manufacturer template page (used for all manufacturer pages that do not have a specific template page created for it - if you didn’t have this template, STS would use sts_template.html).

    [*]index.php.mfr_x.html

    • = Specific Manufacturer template where x = the manufacturer ID.

 

Hi,

 

Im using the standard settings, please see image below

osc_sts_default.jpg

 

This is how the settings look for Product info

osc_sts_prod_inf.jpg

 

So I am putting the product_info.php.html into the "single" folder. This is what I get on the site when I go to view a product (I have re-arranged the layout product_info.php.html file so I can identify when it is being used, as it happens it doesnt matter because only the tags are visible)

osc_sts_prod_inf_live.jpg

 

Can you please shine some light on what is happening and what I need to do?

Edited by RMD27
Link to comment
Share on other sites

So what you are saying is that I have to remove all old sts on my shop before installing the sts 4.6 version?

In addition to removing all sts code, I also must delete all sts files?

 

Do you think these old sts codes are the cause if the site gone blank?

 

Yes, it seems to be old, (v1.1 / 1.2 / 1.3 from 2003 - 2004) as far as I can see.

 

 

Thanks :-))

 

Hi,

 

For what it's worth, in my extremely limited exeprience and knowledge of OSC. When I had problems with the site going blank after adding a new contribution it was always down to the fact that the version of php on my server was old.

Link to comment
Share on other sites

Hi,

 

For what it's worth, in my extremely limited exeprience and knowledge of OSC. When I had problems with the site going blank after adding a new contribution it was always down to the fact that the version of php on my server was old.

 

 

OK, thanks :-)

But the reason I upgraded to RC2a is just because my host has a newer version of php (5).

Best regards

Kjolebutikken

Link to comment
Share on other sites

Hi,

 

For what it's worth, in my extremely limited exeprience and knowledge of OSC. When I had problems with the site going blank after adding a new contribution it was always down to the fact that the version of php on my server was old.

 

 

OK, thanks :-)

But the reason I upgraded to RC2a is just because my host has a newer version of php (5).

Best regards

Kjolebutikken

Link to comment
Share on other sites

Hi all,

 

I have a smaller query I don't seem to know the answer to:

 

How can I make a link like:

 

<?php echo tep_href_link(FILENAME_INDEX_FR, '', 'NONSSL'); ?>

 

change the current language to say: language=fr ? Should the link change the current language or the file index_fr.php?

 

 

Thanks,

Link to comment
Share on other sites

Hi,

i have a problem - totally clean install of OSC2.2 RC2, appears fine on install with no errors or warnings.

 

now i've installed the files for STS v4.6, whether i leave it disabled or enable it, on the store front i get the warning "Warning: I am able to write to the configuration file: /home/sites/{mysite}/public_html/shop/includes/configure.php. This is a potential security risk - please set the right user permissions on this file"

 

nomatter what i change the user permissions to, the error remains.

Link to comment
Share on other sites

Hi,

i have a problem - totally clean install of OSC2.2 RC2, appears fine on install with no errors or warnings.

 

now i've installed the files for STS v4.6, whether i leave it disabled or enable it, on the store front i get the warning "Warning: I am able to write to the configuration file: /home/sites/{mysite}/public_html/shop/includes/configure.php. This is a potential security risk - please set the right user permissions on this file"

 

nomatter what i change the user permissions to, the error remains.

 

 

This will not have anything to do with STS as STS does not modify any of the configure.php files. You need to login to your host account and change the permissions to that file (not through FTP).

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

This will not have anything to do with STS as STS does not modify any of the configure.php files. You need to login to your host account and change the permissions to that file (not through FTP).

 

 

 

i appreciate that it doesn't modify any of the configure.php files, but maybe it changes the file which sends this warning in some way?

I've tried changing the permissions, they all seem fine, and the OSC installation runs fine before i install STS - only after i upload the sts files with the rsc ones does it start to show the warning.

 

I'll perhaps try one file at a time to see which file i upload causes the issue.

Link to comment
Share on other sites

all the sts files go on ok, still no problem, then rc2 admin files, no problem.

when i upload the rc2 includes, the error appears.

 

This is not a problem but a warning that your configure.php files have not the right permissions. The issue has nothing to do with sts. Maybe you see a message that you wasn't seeing before, even you should.

 

The only solution, as posted by Bill too, is to go to your cpanel and set the correct permissions (644 or 444) on BOTH files, there are many threads in the forum about this

Link to comment
Share on other sites

yes, i agree, it's a warning, not an error, but no, it's not my eyesight, i've reloaded everything 4 or 5 times now, and each time there is no warning at all from the original install, as my hosts have 1-click install that works absolutely fine - the configure.php is in fact set as 600 after the install, and is still 600 after i try to upload all the STS files. This warning only appears after i upload the STS RC2 files, and even then, only the files that overwrite existing files in the includes directory.

Link to comment
Share on other sites

Hi,

 

Im using the standard settings, please see image below

osc_sts_default.jpg

 

This is how the settings look for Product info

osc_sts_prod_inf.jpg

 

So I am putting the product_info.php.html into the "single" folder. This is what I get on the site when I go to view a product (I have re-arranged the layout product_info.php.html file so I can identify when it is being used, as it happens it doesnt matter because only the tags are visible)

osc_sts_prod_inf_live.jpg

 

Can you please shine some light on what is happening and what I need to do?

OK, let me put in another way :) , can anyone suggest some reasons why the product_info template would show the actuals tags themselves (as shown above in the 3rd image) and not the actual content as it should.

Link to comment
Share on other sites

Hi,

 

How do I vertical center my OSC under STS 4.6.

 

I have follow this contribution Verticaly Center OSC (working IE6 through 8),it is successful if not enable STS,

 

after that I copied the stylesheet.css to my template folder and modify the sts_template.html pointing to correct css file,but it doesn't work with the vertical center function,what is the problem?

 

 

Verticaly Center your oscommerce webshop with this easy CSS code that should work on all browsers including IE6 through 8.

Play with the width and padding under #container to fit your needs :) Enjoy

Open /catalog/stylesheet.css

Find the following code (this code can differ depending on what changes you have done to your stylesheet.css file):

BODY {
 background: #ffffff;
 color: #000000;
 margin: 0px;
}


Replace with:

BODY {
 background: #ffffff;
 color: #000000;
 margin: 0;
 padding: 0;
 text-align:center; 	
}

#CONTAINER {
 width: 990px; 
 margin-left: auto;
 margin-right: auto;
 margin-top: 20px;
 padding: 1 10 10 10;
 background: #ffffff;
 position:relative;
 overflow:hidden;
}

----

Open /catalog/include/header.php

Find the following code:

 if ($messageStack->size('header') > 0) {
   echo $messageStack->output('header');
 }
?>

Straight after add the following code:

<div id="CONTAINER">

----

Open /catalog/include/footer.php

Find the following code:

   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

Straight after add the following code:
</div>

----

Link to comment
Share on other sites

OK, let me put in another way smile.gif , can anyone suggest some reasons why the product_info template would show the actuals tags themselves (as shown above in the 3rd image) and not the actual content as it should.

 

 

Yes. Take a look at the product_info.php.html file that came with the contribution to see where you went wrong. Make sure you have everything within the form tags. Also, you will need to turn on the proper STS modules in the admin.

 

Also, make sure you did not make the newbie mistake of turning "Enable Search Engine Friendly URL's" to true in the admin. This should never be enabled as the results will be unpredictable behavior such as what you are experiencing.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

i appreciate that it doesn't modify any of the configure.php files, but maybe it changes the file which sends this warning in some way?

I've tried changing the permissions, they all seem fine, and the OSC installation runs fine before i install STS - only after i upload the sts files with the rsc ones does it start to show the warning.

 

I'll perhaps try one file at a time to see which file i upload causes the issue.

 

 

I just do not know how to explain it any other way than what I already have.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Yes. Take a look at the product_info.php.html file that came with the contribution to see where you went wrong. Make sure you have everything within the form tags. Also, you will need to turn on the proper STS modules in the admin.

 

Also, make sure you did not make the newbie mistake of turning "Enable Search Engine Friendly URL's" to true in the admin. This should never be enabled as the results will be unpredictable behavior such as what you are experiencing.

Hi Bill, thank you for getting back to me.

 

OK, I made a fresh install with only STS V4.6.

 

NO SEO urls, nothing edited. STS Modules Default, Index and Product Info installed (is this what you mean by "proper STS modules?").

 

In the instructions at 4.8.2 it says "To change the position of the content elements of the product_info page, you have to create a content template. The folder to put these templates is named "content" and is located inside the template folder having all of the other STS templates. For example: includes/sts_templates/multiple/content/." when I put product_info.php_26.html into sts_templates/single/content/ I get the screenshot below

product_info_php_26_html_in_single_content.jpg

 

 

 

When I copy and paste the product_info.php_26.html into the "sts_templates/single" folder it picks up the $content tag at the top and uses it and leaves the rest of the tags as text, please see image below

product_info_php_26_html.jpg

 

 

This is a fresh install of rc2a with the only changes made being listed above. I understand the the 26 refers to the product ID but this doesnt seem to make any difference as the problems exist on every product page.

 

Does the default template supplied with the package (product_info.php_26.html) need to be changed in some way before it can be used?

 

Or if you need more info, please let me know

Link to comment
Share on other sites

Hi,

 

I'm also having the same problem as RMD27.... I have installed a fresh osCommerce RC2a install, nothing modified at all.

 

I then simply copied the STS files over the top and uploaded, no editing of files etc, nothing modified at all.

 

I enabled STS and everything seems ok except for the product_info page.... I am getting the same problem as above, which is that the content tags appear on the page.

 

Since I have not changed anything, and no errors come up I believe it could be a code bug in the current latest release?

 

I'm now new to osCommerce or PHP, but this is my first STS install so wondering if anyone can shed some light on this issue, otherwise nice contrib.

 

Yapa

Link to comment
Share on other sites

Hi,

 

I'm also having the same problem as RMD27.... I have installed a fresh osCommerce RC2a install, nothing modified at all.

 

 

 

Cant find an option to edit last post, but would like to say its now fixed (uploaded files with different ftp).

 

Thanks,

 

Yapa

Link to comment
Share on other sites

Cant find an option to edit last post, but would like to say its now fixed (uploaded files with different ftp).

 

Thanks,

 

Yapa

 

Yapa, thank you for putting your solution on the forum :thumbsup: , I tried Filezilla and STS seems to be working now. For some reason 2 files didnt get processed automatically with filezilla and I had to "process the queue" manually. Maybe it was these files that werent getting uploaded before that was the problem.

Link to comment
Share on other sites

Hello,

 

When using IE and when access to checkout.php page, IE send popup window with this message:

 

"This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"

 

This message popup every time when it's accessing the https page which is quite annoying. I found this article and it's because I used direct link with http and https in my ste_template.html file. My questions are:

 

1. how to use the tep_href_link() to specify the link to my root directory.

ex: http://mysite.com (without /index.php at the end)? like this?

<?php echo tep_href_link('mysite.com'); ?>

 

2. my sts_template.html has a script to link to the social bookmark site. The script looks like:

 

<div class="addthis_toolbox addthis_default_style"> <a href="http://addthis.com/bookmark.php?xxxxxxxxxx" class="addthis_button_compact">Share</a> <span class="addthis_separator">|</span> <a class="addthis_button_facebook"></a> <a class="addthis_button_google"></a> </div>

 

how to replace the direct link of http://addthis.com/bookmark.php?xxxxxxxxxx with tep_href_link()? like this?

<?php echo '<a href"' . tep_href_link('addthis.com/bookmark.php?xxxxxxxxxx') . '"'; ?>

 

3. I have a form in the sts_template.html and it looks like:

 

<form method="post" action="http://oi.vresp.com?" target="vr_optin_popup" onsubmit="window.open( 'http://www.response.com',  ); return true;" >

 

how to replace onsubmit="window.open( 'http://www.response.com'...) with tep_href_link()?

 

The whole idea is to get rid of "http" used in sts_template.html to avoid the secure popup message for IE browser. I tried but they don't work at all. I'm new to php so I'd really appreciate if anyone can share the knowedge here! :)

 

Thank you for your time!!

Link to comment
Share on other sites

Hi When I install I get the following error message

 

Warning: main(includes/classes/sts.php) [function.main]: failed to open stream: No such file or directory in /home/sites/.....com/public_html/merchandise/includes/application_top.php on line 501

 

Warning: main(includes/classes/sts.php) [function.main]: failed to open stream: No such file or directory in /home/sites/.......com/public_html/merchandise/includes/application_top.php on line 501

 

Warning: main(includes/classes/sts.php) [function.main]: failed to open stream: No such file or directory in /home/sites/.......com/public_html/merchandise/includes/application_top.php on line 501

 

Fatal error: main() [function.require]: Failed opening required 'includes/classes/sts.php' (include_path='.:/usr/share/pear') in /home/sites/......com/public_html/merchandise/includes/application_top.php on line 501

 

Can anyone assist at all please. I know there is a problem with one of the includes but am not sure what is wrong Version is RC2 fresh install also it has French language files and there was no french language folders which I did want.

 

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...