Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

That version of UltraPics has been known to be buggy. Try an earlier version without the Lightbox addition.

 

Darn. Just my luck.

 

I have noticed that the images does open. But not as a separate window as would be expected but outside all frames still in the document. So if you klick an image and after that scroll down a mile there it is.

 

:blink:

Share this post


Link to post
Share on other sites
I managed to get this working ok. I had a LOT of trouble with products_info.php - how did you get on there? If you need a copy of products_info.php coded for ultra pics, sts and qtpro, PM me. Sorry I can't help with the other issues.

Rgds

Sol

 

Yeah the problem just surfaced. Dunno wheter I should cry or jump out of the window. :angry:

PM coming up!

Share this post


Link to post
Share on other sites
Hi Bill,

 

Thanks for your help Bill, I am using your instructions for adding additional boxes. Works good however I keep getting this error:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/content/i/v/y/ivyluxweb/html/catalog/includes/application_top.php on line 312

 

I am unsure why this is happening... and why it will disappear after a day if I don't touch the site. It happens when I try to insert an info box and there is an error in the box. Even if I fix the problem and reload all the backup files I still get the error.

 

Here is the code from my application_top.php from line 301 -319

 

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

 

// Shopping cart actions

if (isset($HTTP_GET_VARS['action'])) {

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

 

 

Sorry to keep bothering you and thanks for you assistance.

 

Thanks,

 

Mimi

Be sure that you took this out of the template:

<?php include(DIR_WS_BOXES . 'search2.php'); ?>

 

Also, check your STS Module settings. You may have entered a file to include that shouldn't be there. Set everything other than the template folder back to the default settings.


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

Hi,

 

First thanks so much for this Template System, and all the continuing hard work you are doing to coach the inept (like me) through this!

 

I have a new installation of osCommerce 2.2 Milestone 2 - fresh download. I have installed the Simple Template System (sts), got it working with the html I have put in there...

 

Install I have up at this time

 

BUT

 

The system is not sending email to a customer or to the Store Owner (Me)

The Tell a Friend is not working, and I did go in and check for it to work under the admin section.

 

I am unsure if this is an issue with the STS or the initial install...

 

Also wanted to add in Header Tags SEO contribution and felt sure I should address the above issues prior to doing so, but may as well ask: any issue I should be aware of with compatibility?

 

 

--

Beverly

Edited by GaitedHorses

Share this post


Link to post
Share on other sites
Hi,

 

First thanks so much for this Template System, and all the continuing hard work you are doing to coach the inept (like me) through this!

 

I have a new installation of osCommerce 2.2 Milestone 2 - fresh download. I have installed the Simple Template System (sts), got it working with the html I have put in there...

 

Install I have up at this time

 

BUT

 

The system is not sending email to a customer or to the Store Owner (Me)

The Tell a Friend is not working, and I did go in and check for it to work under the admin section.

 

I am unsure if this is an issue with the STS or the initial install...

 

Also wanted to add in Header Tags SEO contribution and felt sure I should address the above issues prior to doing so, but may as well ask: any issue I should be aware of with compatibility?

 

 

--

Beverly

 

Hello Beverly,

 

First, you need to tell your shop to send the emails. This is done in the admin section of your shop. Be sure to use the email format of name@yourdomain.com and not the email format that is suggested in the input box. OsC has an issue with that.

 

Regarding the Tell a Friend, be sure you are using the correct STS tag. Look in the STS User Manual for the tag listings and their definitions.

 

I have yet to install the Header Tags SEO but did assist Jack in creating the STS instructions that he included with that contribution so you should be covered. Give me a holler if you run into trouble.

 

Hope this helped you out,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hello Beverly,

 

First, you need to tell your shop to send the emails. This is done in the admin section of your shop. Be sure to use the email format of name@yourdomain.com and not the email format that is suggested in the input box. OsC has an issue with that.

 

Regarding the Tell a Friend, be sure you are using the correct STS tag. Look in the STS User Manual for the tag listings and their definitions.

 

I have yet to install the Header Tags SEO but did assist Jack in creating the STS instructions that he included with that contribution so you should be covered. Give me a holler if you run into trouble.

 

Hope this helped you out,

 

Thanks Bill,

 

On the Tell a Friend I am using $tellafriendbox which is what was on the original template and in the SYS User Manual.

 

TellF.gif

 

This Tell a Friend DID work before the install, or at least the box was there, did not check it. Box is no longer there, although the $tellafriendbox is.

 

I have the E-Mail Options set to send,

 

EMoption.gif

 

Took me 7 hours to install this and get it working, and now over 6 on these 2 details! LOL guess that is what I get for thinking I had it Whipped!

 

--

Beverly

Share this post


Link to post
Share on other sites
Beverly,

 

I see that this is not a stock version of osCommerce. Did you download it from this site (oscommerce.com)?

 

Sorta,,,, the initial install is through the control panel with my host. h-sphere is the control panel, but at initial instal it gives you the option to upgrade, then it downloads and installs the upgrade from oscommerce.com. Or at least that is what it appears to do, the version is the osCommerce 2.2 Milestone 2 that is running now on my site. So I assumed it got it from the oscommerce.com server when told to upgrade...

 

Are you thinking that was a false assumption?

:blink:

 

OH and BTW, how did you know it was not a stock version? Just curious.

 

1 more thing, the server has PHP Version 5.2.5 if that factors in...

 

--

Beverly

Edited by GaitedHorses

Share this post


Link to post
Share on other sites
Be sure that you took this out of the template:

<?php include(DIR_WS_BOXES . 'search2.php'); ?>

 

Also, check your STS Module settings. You may have entered a file to include that shouldn't be there. Set everything other than the template folder back to the default settings.

 

 

Thanks a bunch for all your help Bill!

 

Mimi

Share this post


Link to post
Share on other sites
Sorta,,,, the initial install is through the control panel with my host. h-sphere is the control panel, but at initial instal it gives you the option to upgrade, then it downloads and installs the upgrade from oscommerce.com. Or at least that is what it appears to do, the version is the osCommerce 2.2 Milestone 2 that is running now on my site. So I assumed it got it from the oscommerce.com server when told to upgrade...

 

Are you thinking that was a false assumption?

:blink:

 

OH and BTW, how did you know it was not a stock version? Just curious.

 

1 more thing, the server has PHP Version 5.2.5 if that factors in...

 

--

Beverly

 

A stock osC does not have the email options that was shown in the image you posted. You would have to install a contribution to have that. The PHP version does not matter regarding STS. The issue that I was driving at was to check to be sure this was not a CreLoaded or similar fork of osC since they are not compatible with STS. Most forks use a more "outdated" template system that does not have the features (or support) that STS offers.


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
The issue that I was driving at was to check to be sure this was not a CreLoaded or similar fork of osC since they are not compatible with STS.

 

Can you give me a hint as to how to check this?

 

Beverly

Share this post


Link to post
Share on other sites
The system is not sending email to a customer or to the Store Owner (Me)

 

 

Ok got this part sorted out, not really sure what made it work, but is its now....

 

$tellafriendbox is still in the CODE of the page, but not showing up ON the page..

 

Beverly

Edited by GaitedHorses

Share this post


Link to post
Share on other sites

I have lightbox for STS4 installed... running into this issue... others had an issue with the close box being outside the window – I didn't see anyone else having this issue. Taken from Safari 3. In Firefox it shows fine.

 

There is no need for the horizontal scrollbar – can't seem to get rid of them.

 

 

image.png

Share this post


Link to post
Share on other sites

Hi Bill,

 

I am running into some issues with my STS template conflicting with the contribution from Jack, Header Tags SEO, or vise versa. (Additionally, I have installed the Separate Price Contribution if that makes any difference... even though I have not seen any problems with this contribution conflicting thus far.) The problem that I am running into is that the header tags are not loading on my index page (or any page for that matter) due to the STS template. I assume that I have done something wrong with the installation of my STS template that is causing this problem. I am clueless on how to correct this. I have been using the "test" sts_template file if this makes any difference. Any direction is very much appreciated. Thank you.

 

Regards,

 

Mimi

Share this post


Link to post
Share on other sites
Hi Bill,

 

I am running into some issues with my STS template conflicting with the contribution from Jack, Header Tags SEO, or vise versa. (Additionally, I have installed the Separate Price Contribution if that makes any difference... even though I have not seen any problems with this contribution conflicting thus far.) The problem that I am running into is that the header tags are not loading on my index page (or any page for that matter) due to the STS template. I assume that I have done something wrong with the installation of my STS template that is causing this problem. I am clueless on how to correct this. I have been using the "test" sts_template file if this makes any difference. Any direction is very much appreciated. Thank you.

 

Regards,

 

Mimi

Mimi,

Read through my instructions on how to get Header Tags Controller to work with STS. I know this is not Header Tags SEO, but the STS configuration is the same so focus on those steps. The link is in my signature below.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hello

 

I installed STS and all I see is a blank page. I followed all the steps as described in the read me, uploaded all necessary files, then installed the modules from the admin yet all I see is a blank page where my oscommerce installation previously was. Has anyone any idea that might help? Thanks smile.gif

Share this post


Link to post
Share on other sites
Paul,

All I can tell you is that I have installed several STSv4.5.8 shops and none of them had an issue with upload times. Host maybe?

 

Bill,

I've analysed the performance issue and found some interresting things. First thing to mention is how i found this. Well i copied the logger class to the catalog side and adjusted it a bit to show ms units (instead of only whole seconds). Then i added a logging line:

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

echo $logger->write(__FUNCTION__ . ' ' . $block_name, 'STS');

}

 

To the start_capture and stop_capture, this shows clearly where the ms's are going.

First thing i notice is that i have a "categorybox" and a "dmcatbox" (from Dynamenu_for_osCommerce_v1_11) taking about 250ms + about 750ms. And that basically says it all.

 

I've done some tests:

Going back to the original "categorybox" give me a parsetime of 0.920s without sts and 0.932 with sts. So at this moment it's fair to say that sts itself is not the bottleneck.

 

I will have to dive into the dynamenu for winning some performance back ;)

 

Regarding sts i see a nice improvement. Would it be possible to first build a collection of required boxes and then conditionally parse/capture its contents? I my case i have the overhead of parsing/capturing the "categorybox" while i'm not even using it... It looks do-able to me, Bill what are your thoughts on this?

Share this post


Link to post
Share on other sites
Mimi,

Read through my instructions on how to get Header Tags Controller to work with STS. I know this is not Header Tags SEO, but the STS configuration is the same so focus on those steps. The link is in my signature below.

 

 

Hi Bill,

 

Thanks for the link! I have followed you instructions exactly and am close to completing this contribution. Unfortunately for me I have come to one step and can not move forward:

 

- catalog\includes\languages\english\header_tags.php (for each language in your shop)

This file was not included in the HTC from Jack. Any suggestions on what I should do?

 

Thank you,

 

Mimi

Share this post


Link to post
Share on other sites
Mimi,

Read through my instructions on how to get Header Tags Controller to work with STS. I know this is not Header Tags SEO, but the STS configuration is the same so focus on those steps. The link is in my signature below.

 

 

I replied this this comment once before and there is something I left out.

 

Also I am getting this error in my admin:

Warning: require(includes/boxes/header_tags_seo.php) [function.require]: failed to open stream: No such file or directory in /home/content/i/v/y/ivyluxweb/html/catalog/admin/includes/column_left.php on line 42

 

Fatal error: require() [function.require]: Failed opening required 'includes/boxes/header_tags_seo.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/i/v/y/ivyluxweb/html/catalog/admin/includes/column_left.php on line 42

 

:(

 

Mimi

Share this post


Link to post
Share on other sites
Hello

 

I installed STS and all I see is a blank page. I followed all the steps as described in the read me, uploaded all necessary files, then installed the modules from the admin yet all I see is a blank page where my oscommerce installation previously was. Has anyone any idea that might help? Thanks smile.gif

Hi ec,

 

Well, if you are sure that you have uploaded everything, it maybe that your FTP client failed in some way.

 

Try this, use a file comparison tool such as Beyond Compare or WinMerge to compare the files from the contribution and those on your server. This will be a fast and easy way to see if you misplaced some code or uploaded a file in the wrong folder.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Bill,

I've analysed the performance issue and found some interresting things. First thing to mention is how i found this. Well i copied the logger class to the catalog side and adjusted it a bit to show ms units (instead of only whole seconds). Then i added a logging line:

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

echo $logger->write(__FUNCTION__ . ' ' . $block_name, 'STS');

}

 

To the start_capture and stop_capture, this shows clearly where the ms's are going.

First thing i notice is that i have a "categorybox" and a "dmcatbox" (from Dynamenu_for_osCommerce_v1_11) taking about 250ms + about 750ms. And that basically says it all.

 

I've done some tests:

Going back to the original "categorybox" give me a parsetime of 0.920s without sts and 0.932 with sts. So at this moment it's fair to say that sts itself is not the bottleneck.

 

I will have to dive into the dynamenu for winning some performance back ;)

 

Regarding sts i see a nice improvement. Would it be possible to first build a collection of required boxes and then conditionally parse/capture its contents? I my case i have the overhead of parsing/capturing the "categorybox" while i'm not even using it... It looks do-able to me, Bill what are your thoughts on this?

 

Paul,

 

Nice work and good detail. I appreciate the effort.

 

Here is what I suggest ALL STS users do to speed up the performance of their shop:

 

  1. Remove any tags that are not being used (or you think you will never use them) from the tag defines. All STS tags are created in the catalog/includes/modules/sts_inc/ files.
  2. For example; if you are using the Dynamenu contribution, then you could easily remove the $categorybox tag that is used to pull in the stock osC category infobox. Open the catalog/includes/modules/sts_inc/sts_column_left.php file and comment out the following lines or remove them completely:
      $sts->restart_capture(); // Clear buffer but do not save it nowhere, no interesting information in buffer.
    // Get categories box from db or cache  
     if ((USE_CACHE == 'true') && empty($SID)) {
    echo tep_cache_categories_box();
     } else {
    include(DIR_WS_BOXES . 'categories.php');
     }  
     $sts->restart_capture ('categorybox', 'box');


  3. The above goes for any of the tags that you do not use in your shop.

Another thing to do is replace all of the STS tag names in your shop:

 

All variables created for the templates are placed in an array that needs to be sorted before replacing the placeholders, so placeholders are replaced starting from longest name to shortest name. Why? Look at these two placeholders:

$prod contains the text "Hello", $product_image contains a link to an image. If array is not sorted, the risk is that $product_image becomes $Hellouct_image during the replacement process, breaking the template.

 

By adding a stop character at the end of placeholders, like $prod$ instead of $prod, the sorting of the big array containing all the placeholders variables is not needed anymore.

To do so, you have to open your template, add the same end character to all placeholders, in our example "$", then tell the system to use this end char.

 

This is done by defining a constant in the template:

 

 

  1. Add this code at the beginning of your template to indicate you are using an end character:
    <?php DEFINE ('STS_END_CHAR', '$'); ?>


     
    NOTE: For content templates, add this instead of the above code:

    <?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>


  2. Then, add the '$" to the end of each of your STS tags so they go from this: $searchbox to this: $searchbox$

The system will detect that an end character is used and will not sort the big array.

If you already have several templates, this method allows you to modify them one by one.

 

Hope this has helped,


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 replied this this comment once before and there is something I left out.

 

Also I am getting this error in my admin:

Warning: require(includes/boxes/header_tags_seo.php) [function.require]: failed to open stream: No such file or directory in /home/content/i/v/y/ivyluxweb/html/catalog/admin/includes/column_left.php on line 42

 

Fatal error: require() [function.require]: Failed opening required 'includes/boxes/header_tags_seo.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/i/v/y/ivyluxweb/html/catalog/admin/includes/column_left.php on line 42

 

:(

 

Mimi

Mimi, if you placed the above in the STS Module for 'Files to Include', then remove them from being listed in the STS Module.

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
Mimi, if you placed the above in the STS Module for 'Files to Include', then remove them from being listed in the STS Module.

 

 

Bill,

 

I am not clear on what you are saying. Please explain what files you are referencing. I'm sure this is really simple and I just can't understand at the moment. I am still learning, thank you.

 

Mimi

Share this post


Link to post
Share on other sites

Hello again.

 

I thought I might try my luck in this thread as I have STS installed on my "shop".

 

I would really like to display my bestsellers horizontally rather than vertically as it is now. I was wondering if there was a way of doing this using the infobox templates in STS?

 

I have also installed Bestsellers Images (+db) so as I can display the images of the bestsellers.

 

Thanks for all your hard work!

Share this post


Link to post
Share on other sites

After a clean RC2a install and uploading my STS files from "Files for RC2", nothing else, and when I go to the admin interface, I see STS under modules. When I click on STS, the following displays, with the install button to the right. The install button does nothing.

 

 

Module Directory: /hermes/web07/b2348/as.penningt/public_html/catalog/includes/modules/sts/

 

Can you help me?

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

×