Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Have anyone managed to get the Page Cache contribution working with STS?

It's truly a wonderful contribution that significantly increases the page loading time but I can't get the shopping cart items updated dynamically, it cache's the whole page.

 

Any help is highly appreciated :thumbsup:

Share this post


Link to post
Share on other sites

Hi, having read the user manual and going over files included in sts 4.4 i'm afraid i'v been unable to solve my problem :( Basically i want to edit the layout of the sections 'New Products For February' and the view of all the products under a category. I do not want to make specific ones for certain categories, just a template for them all. How do i go about doing this? I would also like to add the buttons 'add to cart' and 'view' item for each product listed. Is there a way i can do this? I'm also unsure of what callouts to use to call these functions for seperate products. I would really appreciate any help with this :)

Share this post


Link to post
Share on other sites

Okay I feel like I'm taking crazy pills. I installed STS and everything was moving along fine, and then I hit a wall and I can't figure out what I'm doing wrong. All I want to do is change the font size/color of the links on the boxes on the left side and I've tried stylesheets and plain HTML in both the main template and the files in the boxes folders and nothing is working. Someone please help me before I throw my computer off a cliff.

 

Here's the site: http://shop.etsyglass.com/

Share this post


Link to post
Share on other sites

Hi everyone,

 

I've got a tiny problem with my SSTSv4.3.3 with HTCv2.6.0 Bundle install.

 

Great News...

I can access both STS menu and also activate the HTC menu from the /catalog/admin/ control panel. Both STS and HTC's functions are active and working. :lol:

 

Bad News...

- However, when accessing osC's Module submenu's (either Payment, Shipping, STS, Order Total), none of the modules are displaying correctly in a menu format. :angry:

 

A screengrab of the error I see can be found here...

http://www.beckenham.id.au/osc/osCerror.jpg

 

So for each module's information that can't be displayed correctly, the following error is returned...

Warning: main(/Library/WebServer/Documents/shop/catalog/includes/languages/english/modules/sts/sts_default.php) [function.main]: failed to open stream: Permission denied in /Library/WebServer/Documents/shop/catalog/admin/modules.php on line 136

Warning: main() [function.include]: Failed opening '/Library/WebServer/Documents/shop/catalog/includes/languages/english/modules/sts/sts_default.php' for inclusion (include_path='.:') in /Library/WebServer/Documents/shop/catalog/admin/modules.php on line 136

 

 

Line 136 of /admin/modules.php refers to this part of code....

    include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/' . $module_type . '/' . $file);

 

I suspect the aliases prescribed in /admin/includes/filenames.php are not being read correctly. However, changing permissions of this file, and /admin/modules.php hasn't helped.

 

 

Install notes.

1. Running Test site on Apache 1.x on OSX, PHP4.4.4., mod_rewrite on, all the usual.

2. osc base install -> ultrapics installed -> minor other plugins

3. SSTSv4.3.3 with HTCv2.6.0 Bundle installed using TextWrangler file-comparison tool. All files were manually compared and STS/HTC required code changes were adopted into the earlier install.

 

 

Any ideas?

-Tim

Edited by crikey

Share this post


Link to post
Share on other sites

Check the permission of language files in admin/includes/languages/english/modules/ for the 3 sts modules (sts_default, sts_index, sts_product_info).


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

Thank rigadin for the wonderful contribution. I do have a slight problem integrating sts with htc. The problem is that I am not really sure if my header tags are working with the STS system. After a lot of hacking and messing around I finally copied the header_tag.php file into the catalog/includes/modules/sts_inc folder and added the file name to the "Files for index.php template" and the "Files for content template". This did fill the tags for my products but it filled them with all the same thing. See my site and click on some products and view source and take a look at the header tags. They are all the same. I was under the assumption that the header tags would be filled with the product description, or something more useful than the title of my website. I must have missed something down the road. Oh and the other thing that triggered the thought of a problem is that when you click on a product the text below the product always reads "Currently viewing: Your one stop shop for HDTV's, GPS Receivers, Home Theater Systems, Car Stereos, and much more.", which happens to be my header tag for my index page. (I know this is a poor header tag, however I am just trying to fix the problem before I tune.) So....long story short.....I would like to know if indeed I have everything installed correctly or if I have missed something someplace.

 

Thanks

Steve

Share this post


Link to post
Share on other sites

Help,

 

I have installed STS and works great I have one problem, I had an additional ifoboxe called phponline it has a file phponline.php in the boxes directory, how do I go about creating a place holder so I can add this to my site using STS

Share this post


Link to post
Share on other sites
Help,

 

I have installed STS and works great I have one problem, I had an additional ifoboxe called phponline it has a file phponline.php in the boxes directory, how do I go about creating a place holder so I can add this to my site using STS

 

Ok I have manged to get teh PHPOnline box to display by doing this

 

Edit the includes\modules\sts_inc\sts_user_code.php and add this

 

// PHPOnline Live Support Box

$sts->start_capture();

require(DIR_WS_BOXES . 'phponline.php');

$sts->stop_capture('phponlinebox', 'box'); // Get PHPonline Box

 

Then to your html file the place holder is $phponlinebox

 

 

The problem I have now is that when I click on it, it won't launch, If I turn off STS and click on the PHPOnline button it launches fine,

 

Any Ideans ?

 

This is the code for the phponline

<?php
/*
 phpOnline Infobox, v 1.0 21-APR-2005 by Dayana Networks Ltd.

 Compatible with phpOnline v 1.5 and above

 Copyright 2005 Dayana Networks Ltd.

 osCommerce
 [url="http://www.oscommerce.com/"]http://www.oscommerce.com/[/url]

 Copyright © 2000,2005 osCommerce

 Released under the GNU General Public License

*/


//////////// Configuration ///////////////
// Please change these variables

// Full URL to phpOnline Main directory (without trailing slash)

$phpOnline_base_url = "http://www.xxxx.xxx/phponline";



// Type of Status Indicator:
//    1 -> Dynamic (Flash Based)
//    2 -> Statis (image based)
// Note that image based indicator has added on phpOnline 1.5.1

$phponline_status_indicator_type = 2;


//////////////////////////////////////////


?>

<script language="javascript"><!--
function phpOnlinePopupWindow() {
var url = "<?php echo $phpOnline_base_url.'/client.php';?>";
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=no,copyhistory=no,width=550,height=400,screenX=150,screenY=150,top=150,lef
t=150')
}
//--></script>
</head>

<!-- phpOnline Info Box //-->
<tr><td>

<?php

$phponline_info_box = array();
$phponline_info_box[] = array('align' => 'left',
                             'text'  => BOX_HEADING_PHPONLINE
                            );
new infoBoxHeading($phponline_info_box, false, false);




$phponline_info_box = array();
if($phponline_status_indicator_type==1)
{

$phpOnlineFlashIndicator  = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" HEIGHT="60" WIDTH="120" id="status" ALIGN="" border="0">';
$phpOnlineFlashIndicator .= '<param name="base" value="'.$phpOnline_base_url.'/"><PARAM NAME=movie VALUE="'.$phpOnline_base_url.'/status.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff><param name="salign" value="TL"><param name="scale" value="NoBorder">';
$phpOnlineFlashIndicator .= '<EMBED base="'.$phpOnline_base_url.'/" src="'.$phpOnline_base_url.'/status.swf" menu=false quality=High bgcolor=#ffffff  NAME="status" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" salign="TL" width="120" height="60" scale="NoBorder"></EMBED></OBJECT>';

$phponline_info_box[] = array('align' => 'center',
       	                      'text'  => $phpOnlineFlashIndicator
                                    );

}
if($phponline_status_indicator_type==2)
{
$phponline_info_box[] = array('align' => 'center',
                                     'text'  => '<a href="java script:phpOnlinePopupWindow()">' . tep_image($phpOnline_base_url.'/statusimage.php' , BOX_INFORMATION_PHPONLINE ).  '</a><br>'
                                    );
}


new infoBox($phponline_info_box);

?>
</td></tr>
<!-- card_eof //-->

Share this post


Link to post
Share on other sites

Hi, i'm looking to get this working and everything seems fine and i've copied all the bits needed. But when in admin, i go the module, click default and click the true to activate it, it doesn't save and just keeps reverting to false.

 

Anyone know what i'm doing wrong. The only other module i have is ultimate seo urls.

 

Cheers

Share this post


Link to post
Share on other sites
Hi, i'm looking to get this working and everything seems fine and i've copied all the bits needed. But when in admin, i go the module, click default and click the true to activate it, it doesn't save and just keeps reverting to false.

 

Anyone know what i'm doing wrong. The only other module i have is ultimate seo urls.

 

Cheers

Hello my friend. The problem is from a bug in the modules portion of the latest version of osCommerce 060817. I posted a fix for STS users but it applies to all 060817 oscommerce users as well. You can find it here:

 

osC MS2 060817 Module Patch for STSv4.2 & 4.3


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 must say, I truly love this contribution. I uploaded this then paid for the graphics to add to my site (did not buy their whole template system- which was more money but may have been worth it?)

Anyway, I am also tring to use the printable catalog contribution since I only have an online store and wanted to offer it as a useful feature for my customers.

I am thinking the printable catalog does not work with STS? I have added and then tried using a direct link to it on my page since I don't really use the information box where this mod was added to. But then when uploaded to the web if I click on it, it will go to the page but I see nothing and it doesn't even use the STS template page. (I get the STS template page with the contents part missing and the other info on the page displays with the actual tags and not the info the tag should have called up.) Does this make sense? To see my site Click Here. Now on my html pages I have added the My Account/ Log Off and site search on the left hand column and did my links to the real php pages. I wanted to add the words for Printable Catalog just below the my account link (above the search box). If anyone is familar with the Printable catalog mod and can offer any hints or advise please let me know.

I also seemed to have changed some coding (not sure where) and the heading title for my boxes do not appear. Thought it was in the stylesheet but that did not fix it either. Above the search box the words "Quick Find" are there- just invisible. Any thought of what I need to change to get them visible again is also welcomed.

Thanks so much for any help.

Pattie

Share this post


Link to post
Share on other sites

Pattie,

I went to your site but did not see any evidence of the issues that you posted. I do not use the PDF catalog contribution but giving it a quick look I do not see anything in it that would cause problems with STS. If it creates a new page and that page is created in the typical osCommerce fashion, then STS should pick it up. If you do not want STS to use a template for this page, you can customize the code to skip this page so that it uses the standard layout.

 

 

As for the link to the PDF Catalog, I would assume you would create the link just as you would any other link in osCommerce. I suggest that you check on the specific forum dedicated to that contribution as they would probably give you a more detailed answer.

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

Error message;

Warning: Cannot modify header information - headers already sent by (output started at /home/margauxs/public_html/nijo-import/includes/classes/boxes.php:2) in /home/margauxs/public_html/nijo-import/includes/functions/general.php on line 33

 

Hello,

 

I am new to osCommerce, but used to build in Joomla.

Since I like the functionallity of osCommerce better, I am migrating to osCommerce.

 

OK, some facts;

I'm running osCommerce 2.2-MS2 on PHP 5.0.5 with a MySQL 4.1.21 Database.

 

Started some days ago, and installed STS4.4 this morning.

So far so good, all seemed to work fine, until I tried to complete an order.

The above error message came up and looking through this threat didn't unfortunatly help me.

I have looked through the different "cannot modify header" errors, but need some "check this - check that" help or maybe a link to a specific threat.

 

Thanks a lot,

 

John

Share this post


Link to post
Share on other sites

Blank Search Glitch

 

I am new to OSCommerce and I installed the STS 4.4 Contribution.

OSCommerce and STS are phenomenal work.

 

Everything works fine, but while playing around with the store i clicked the search box without typing anything in and I received this message in my browser:

 

Fatal error: Call to a member function on a non-object in /hsphere/local/home/sarahqs/theblackberrypatch.com/includes/functions/html_output.php on line 78

 

I took a look at html_output.php and found that line 78 was related to STS.

 

$sts->image($src); // Take image from template folder if exists.

	// START STS v4.4:
  global $sts; 
	  $sts->image($src); // Take image from template folder if exists.
// END STS v4.4

 

I installed STS by pasting over the modified files on a new install, and modified html_output.php a second time by installing the 19 February 2007 version of More_Pics_6 for 2.2 ms2 with a compare and merge program.

 

I thank everyone for their time in advance!

Share this post


Link to post
Share on other sites
Blank Search Glitch

 

I am new to OSCommerce and I installed the STS 4.4 Contribution.

OSCommerce and STS are phenomenal work.

 

Everything works fine, but while playing around with the store i clicked the search box without typing anything in and I received this message in my browser:

 

Fatal error: Call to a member function on a non-object in /hsphere/local/home/sarahqs/theblackberrypatch.com/includes/functions/html_output.php on line 78

 

I took a look at html_output.php and found that line 78 was related to STS.

 

$sts->image($src); // Take image from template folder if exists.

 // START STS v4.4:
global $sts; 
$sts->image($src); // Take image from template folder if exists.
// END STS v4.4

 

I installed STS by pasting over the modified files on a new install, and modified html_output.php a second time by installing the 19 February 2007 version of More_Pics_6 for 2.2 ms2 with a compare and merge program.

 

I thank everyone for their time in advance!

Karl, this is a known bug in STS4.4 with the tep_image function.

There is a fix in the STS4 Forum. You can find it in post #1513 (page 76):

http://forums.oscommerce.com/index.php?s=&...t&p=1023674

Have fun,

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
Thank rigadin for the wonderful contribution. I do have a slight problem integrating sts with htc. The problem is that I am not really sure if my header tags are working with the STS system. After a lot of hacking and messing around I finally copied the header_tag.php file into the catalog/includes/modules/sts_inc folder and added the file name to the "Files for index.php template" and the "Files for content template". This did fill the tags for my products but it filled them with all the same thing. See my site and click on some products and view source and take a look at the header tags. They are all the same. I was under the assumption that the header tags would be filled with the product description, or something more useful than the title of my website. I must have missed something down the road. Oh and the other thing that triggered the thought of a problem is that when you click on a product the text below the product always reads "Currently viewing: Your one stop shop for HDTV's, GPS Receivers, Home Theater Systems, Car Stereos, and much more.", which happens to be my header tag for my index page. (I know this is a poor header tag, however I am just trying to fix the problem before I tune.) So....long story short.....I would like to know if indeed I have everything installed correctly or if I have missed something someplace.

 

Thanks

Steve

When you go into admin- click on Header Tags, then Fill Tags (just like the install instructions tell you) if you only select to fill all tags for categories, manufacturers and products (like the install instructions) then you will get the title for all the tags. When you read that first question

Fill products meta description with Products Description?  Yes  No Limit to  characters

and answer it with a YES and then fill in how many characters to add...then you will actually get that many characters of your description showing up as the description tag.

I also had a problem tring to modify the default tags in my admin panel so I changed it in the actualy php coding on my computer and re-uploaded to my site. This fix solved the problem.

Hope this tidbit helps.

Pattie

Edited by pattie1970

Share this post


Link to post
Share on other sites
Pattie,

I went to your site but did not see any evidence of the issues that you posted. I do not use the PDF catalog contribution but giving it a quick look I do not see anything in it that would cause problems with STS. If it creates a new page and that page is created in the typical osCommerce fashion, then STS should pick it up. If you do not want STS to use a template for this page, you can customize the code to skip this page so that it uses the standard layout.

As for the link to the PDF Catalog, I would assume you would create the link just as you would any other link in osCommerce. I suggest that you check on the specific forum dedicated to that contribution as they would probably give you a more detailed answer.

Bill,

Sorry, I did not link to the pdf catalog on my site yet because it was not working. What I get is the page showing up with my default STS template but no content. When I disable the STS, then the catalog shows up.

I am not too familar with php, how would I customize the code to skip the page so a STS template is not used? If I knew how to do this it would definitely solve the problem I am having. The pdf catalog (as well as the other catalog contributions I saw) all use the "normal" osc layout. Also, do you know how I could use a different stylesheet for this once I skip that page from showing up as a STS page?

Thanks SO much for your help.

Pattie

Share this post


Link to post
Share on other sites

Is there a way to dynamically decide the template used on the "My Account", "Shopping Cart", and throughout the checkout process? I have somewhat of a unique situation where I run two stores side-by-side. They sell the same product (with very minor differences), so it makes sense for me to have it all in the same cart.... at least it did to me :)

 

I'm able to segregate the products using STS and category templates, but it reverts back to the main template during checkout.

 

Thanks for any help or suggestions to head in a completely different direction.

 

(I tried appending ?sts_template=mysite to the placeholders for the cart, account, login, etc. links. I knew it was a long-shot, but as I suspected, it didn't work)

 

Ned.

Share this post


Link to post
Share on other sites

Ned, just create a template for those pages like checkout_success.php.html, etc. When the customer gets to those portions of the site, STS will use the template you created instead, just like it does for all of the other pages in your site.

By the way, I'm assuming you are using STSv4.x.


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

Quick question,

with the design of my site I think it would look better if I did not have any of the headers on the "content" section of my sie (you know- the part that was default to say "what's new here" and "let's see what we have here".

When I remove the wording, the spaces still exsist.

Any clue where I can fix that to remove it entirely...or know of the place in the forums or contributions that might help?

Thanks so much!

Pattie

Share this post


Link to post
Share on other sites
Quick question,

with the design of my site I think it would look better if I did not have any of the headers on the "content" section of my sie (you know- the part that was default to say "what's new here" and "let's see what we have here".

When I remove the wording, the spaces still exsist.

Any clue where I can fix that to remove it entirely...or know of the place in the forums or contributions that might help?

Thanks so much!

Pattie

Pattie, would you be interested in replacing that text with the actual category/subcategory name? If so, Check out the STS4 Power Pack site (link in my signature below) and download the STS tips and tricks. I think I placed instructions in there to do just that.

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
Pattie, would you be interested in replacing that text with the actual category/subcategory name? If so, Check out the STS4 Power Pack site (link in my signature below) and download the STS tips and tricks. I think I placed instructions in there to do just that.

I do have the whole download and followed the instructions but I think I changed the code somewhere else with one of the other downloads because it didn't appear correctly with the category names. What I really want to get rid of is some of the blank space that appears above the category name. On each page I get about 1/2" of blank space then the category name appears. I know this is because I deleted the wording for the "What's New", etc. from the english language file but the blank space is still there. I have also not use pics for most catagories but the space where the pic would normally go is still there which pushes my content further down the page. Does that make sense?

My preference would be to delete it all so the page is centered better and starts closer up on the page.

I'll try looking thru the contributions again, I am almost certain there is one to delete the blank lines and one for not using category pics.

I'll let you know if I can find them.

Thanks,

Pattie

Share this post


Link to post
Share on other sites
Ned, just create a template for those pages like checkout_success.php.html, etc. When the customer gets to those portions of the site, STS will use the template you created instead, just like it does for all of the other pages in your site.

By the way, I'm assuming you are using STSv4.x.

 

Thanks for the quick reply... how do I tell it to use one set of templates as opposed to the other? It's almost like I have two stores in one, and want to keep the same look-and-feel throughout each.

 

For example, I'm here: product_info.php?cPath=30_35&products_id=56. STS looks at the URL strings to determine the template used, correct? When I click over to Cart Contents, it strips the strings and shows "shopping_cart.php".

 

Thanks again!!

 

Ned

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

×