Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

2.  Click to enlarge doesnt work (tried the bug fix in contrib section).

 

 

I also must testify to this bug fix not working and actually being written very poorly. Using STS template for product_info.php is basically unusable until the CLICK TO ENLARGE bug is fixed for real.

 

I'm wondering if I will encounter more problems with other custom template pages that need javascript. ACK!

Link to comment
Share on other sites

I also must testify to this bug fix not working and actually being written very poorly.

 

Ok, nuff complaining...STS still rocks...forget about the bug fix for image enlarge - it's too complicated to install and creates extremely bad code with javascripts layered all over the place.

 

Here's the simple fix I used:

 

replace your product_info.php.html link with this block of code ripped from the orginal product_info.php:

 

<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

 

I placed that chunk between

 

<td class="smallText" align="center">

 

and

 

</td>
    	 </tr>
     </tbody>
  	 </table>

 

from the product_info.php.html demo file, by the way. The greater problem with STS and the enlarge function is that a custom class was not created for the function (ie, $imageenlarge link doesn't exist to plug in like you do the other parts).

 

Hope that helps!

Edited by protogabe
Link to comment
Share on other sites

Hello.

 

Can someone help me with the slow loading issue?

 

I have also tried changing my store name in /includes/languages/english.php from Homepage-osCommerce: to the correct name and it's not working. I was able to make the change before all the mods. Any help with this one?

 

Clesha

Thanks!

Clesha

Link to comment
Share on other sites

I am having this same problem.

Fresh install of osCommerce.

Overwrite files with the files from the STS3.

Change the configuration file.

 

Get the errors posted below, as well as a javascript error on every page. No idea what that is all about. Anyone have any ideas?

 

I am also using easyphp to run this on my local machine for testing.

Thanks!

 

 

I just installed the latest version of sts. I followed the instructions in the readme file and tried both the easy and advanced install procedures however in both cases I get the following warnings whenever I load my webpage:

 

Notice: Undefined index: no_sts in c:\easyphp1-8\www\catalog\includes\application_top.php on line 18

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\easyphp1-8\www\catalog\includes\application_top.php:18) in c:\easyphp1-8\www\catalog\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\easyphp1-8\www\catalog\includes\application_top.php:18) in c:\easyphp1-8\www\catalog\includes\functions\sessions.php on line 67

 

Can anybody help?

 

Thanks

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

No idea what this code is but if I remove lines 197-203 in catalog/includes/application_top.php

if ($spider_flag == false) {

tep_session_start();

$session_started = true;

}

} else {

tep_session_start();

$session_started = true;

 

It removes the 2 errors

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\program files\easyphp1-8\www\includes\application_top.php:18) in c:\program files\easyphp1-8\www\includes\functions\sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\includes\application_top.php:18) in c:\program files\easyphp1-8\www\includes\functions\sessions.php on line 67

 

Anyone have any idea why this would be and do I need that code? lol It has something to do with blocking spiders?

My admin has Block Spiders set to false.

Force cookie use set to False.

Actually everything in my sessions is set to false as that is how it comes but I may want to change that in the future so if I remove that code does it mean I won't be able to block spiders?

 

Store sessions on my config is set to mysql

 

 

Still can't figure out why it is not picking up either of the template inside the sts_templates folder though or what the javascript error is. If I figure it out I will be back. :)

Edited by wendyjames

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Uh oh...

 

New guy trying this using the tutuorial and all and everything crashed on me :(

 

Here's the error I'm receiving...

 

Warning: main(includes/sts_display_output.php): failed to open stream: No such file or directory in /home/content/B/r/a/Branigan/html/catalog/includes/application_bottom.php on line 18

 

Warning: main(includes/sts_display_output.php): failed to open stream: No such file or directory in /home/content/B/r/a/Branigan/html/catalog/includes/application_bottom.php on line 18

 

Fatal error: main(): Failed opening required 'includes/sts_display_output.php' (include_path='.:/usr/local/lib/php') in /home/content/B/r/a/Branigan/html/catalog/includes/application_bottom.php on line 18

Link to comment
Share on other sites

sorry for the double post... now i know where to post for sts support.    i'm kind of confused,and i cannot find a solution for my problem: i noticed recently that all my downloadable products bigger than 12mb were NOT working anymore. the link is correctly highlighted, the files are all correctly placed, but the customer gets a '500 internal server error' .. every file smaller than 12mb works perfectly (the files are all in the /download/ folder ) ...

 

then, i realized that what was causing the problem was STS template, because i uninstalled it and everything started working fine again...all biigger files could be downloaded again..

 

has anyone experienced this problem ? i want to continue using sts template, i really like it . thanks everyone !!

 

Did you ever get that 500 Internal Server Error problem solved? I'm having the same problem for people that are trying to download from my site. The files that they are trying to download are only 8mb at the most. Any suggestions?

Web Development, 365... 366 in a leap year.

Link to comment
Share on other sites

I noticed that the only way to get the subcategories to display is if there are NO PRODUCTS OUTSIDE the subcategory boxes (inside the main category box). If there is even 1 product, it won't display the subcategories. By the way, when they do display, they appear in the main body area, where I have a $content command.

 

 

I am having this exact problem. Was there a fix for this? I read almost every one of these 125 pages, and didn't see it. Thanks for the contrib, btw. I look forward to trying out v3

Edited by linuxdave

LinuxDave

Link to comment
Share on other sites

I am having this exact problem. Was there a fix for this? I read almost every one of these 125 pages, and didn't see it. Thanks for the contrib, btw. I look forward to trying out v3

 

I believe this is an osC problem, not an STS one.

 

Sorry...

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I'm having trouble with making my template show everywhere. Like on the myaccount page, login, invoice, etc. I'm not sure from the readme but for like the login.php I would just make a template login.php.html and put it in the ststemplates folder? If so would I still use $content for the main part of the page to show the information?

 

my e-mail, [email protected]

Link to comment
Share on other sites

Oh it seems it has to do with https:// links and pages. On your site faqs it said

Make sure that all no url's referenced in your template pages start with HTTP:// (ie: http://me.com/catalog/images/blah.gif)

 

All URL's should start with a slash (ie: /catalog/images/blah.gif) or a a directory (ie: blah.gif).

 

If you have ANYTHING on an HTTPS: (SSL) page that references an HTTP: address, IE won't display the lock icon. This includes Stylesheets and Javascript include files.

 

How in the world would I go about doing that and making my template show on https pages such as login and account stuff?

Edited by airbourne
Link to comment
Share on other sites

I have previously installed prior versions of STS and have had no troubles with the template systems. I am attempting to install the updated version for a new site that I am working on, however, I am running into a huuge problem with the templates. I am tempted to believe that it is something simple that I am overlooking, and that is what is soo frustrating.

 

My issue is this - I have installed STS-3_00b2 according to the instructions. The normal sts_template.html works fine, however as soon as I try to add images to that page I have a problem with them loading. I can go to www.mydomain.com/store/includes/sts_templates/mysite/sts_template.html and the images load with no problems. But when going to the www.mydomain.com/store link I get the lovely little red x's.

 

Any help would be greatly appreciated.

 

Thanks!

Link to comment
Share on other sites

I would like to change my template according to the language selected by user. Is it possible? The problem is that i have some images in greek language and i want them to be replaced by english images when user changes oscommerce language into english.

 

any ideas how to do that?

please help...

Link to comment
Share on other sites

I successfully added the STS cont. and it's all working great apart from the fact that the enlarge product image does not work. Any ideas what I've done wrong? I'm pretty new to OSc so perhaps I've forgotten to do something basic??

Link to comment
Share on other sites

my site has SSL on the Account related pages and then goes back to http for the rest of the site. I cannot get to account related pages without putting https:// in the url. if i put http:// it does not go there. Isn't there some fix that will make STS be compatible with switching from ssl to non ssl pages?

Edited by airbourne
Link to comment
Share on other sites

I've installed this on a clean Osc and it works great.

 

However, I'd like to try it out with another Osc that I've been learning with, it has Admin Acess Control and Infobox Skin Manager and Infobox Admin installed. The column_left and column_right.php is too challenging for me to merge. I've tried several ways and I keep getting errors. There seems to be no way to merge them or it will require hell lots of time(for a newbie) to figure out.

 

Anyone has successfully merged the Admin Acess Level Account + Infobox Skin Manager + Infobox Admin together with STS?

Edited by tuppergirl
Link to comment
Share on other sites

hi brian, terrific contribution youve created. i have a couple of questions, and hopefully they are easy for you to answer. ive been tooling around with the STS for a few hours now, and I have come up with a couple of questions:

 

1) Ive been trying to use $imagelarge or $imagesmall to make my product image appear on my modified product_info.php.html page, and each time all I get are broken links. Any help with this code

 

<td width="400" height="400">
  $startform
  <table>
  <tr>
    <td><img src="$imagesmall" border="0"></td>
  </tr>
     
  <tr>
    <td width="200" class="pageHeading" valign="top">$productname<br>$productmodel</td>
    <td width="200" class="pageHeading" valign="top">$regularpricestrike $specialprice</td>
  </tr>
</table>

 

2) where does STS pull the default locations of images of variables like cartlogo and how can i make my own variables to work in STS?

 

Thanks for your help.

 

Danny

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