Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Oky doky Bill i'll print off the instruction. I must say i'm upload the file one by one via cpanel as my site have a few mods done to it and this way of uploading has always work for me in the past. But try ,try again i shall but this wan't be last you'll hear from me i bet blush.gifrolleyes.gif

 

Regrads DJ

 

ps thank you

 

 

That is not a reliable method of uploading files. You should purchase yourself a good FTP Client program.

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

That is not a reliable method of uploading files. You should purchase yourself a good FTP Client program.

 

which FTP cliient do you recomend then please.

 

dj :huh:

Link to comment
Share on other sites

 

 

I have innstald a fresh copy and the sts module but why can't I innstall? the infoboxses is missing. please help. thank you

 

What does your admin/modules.php file look like? Did you compare it with "Files for RC2"/admin/modules.php to see where your error was located?

 

Also, did you upload ALL OF THE FILES within the "STS" folder to your shop's "includes" folder, especially the includes/modules folder & files?

 

thumbsup.gif You are showing an incomplete installation of the STS contribution which requires two parts:

1. Upload each of the "new" files (STS)

2. and modify each of the effected osCommerce core files (Files for RC2).

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

What does your admin/modules.php file look like? Did you compare it with "Files for RC2"/admin/modules.php to see where your error was located?

 

Also, did you upload ALL OF THE FILES within the "STS" folder to your shop's "includes" folder, especially the includes/modules folder & files?

 

Posted Image You are showing an incomplete installation of the STS contribution which requires two parts:

1. Upload each of the "new" files (STS)

2. and modify each of the effected osCommerce core files (Files for RC2).

 

I have the same problem with this contribution, i have followed your instructions and i have ask you which ftp client to use i found one and used that and still the same thing. files are install in the right folders and the files that need modifing have been because i have other contriubtions install its not so simple for me .

 

Thank you for you time on this matter.

 

Regards dj

:)

Edited by djramm
Link to comment
Share on other sites

I have the same problem with this contribution, i have followed your instructions and i have ask you which ftp client to use i found one and used that and still the same thing. files are install in the right folders and the files that need modifing have been because i have other contriubtions install its not so simple for me .

 

Thank you for you time on this matter.

 

Regards dj

smile.gif

 

There are plenty of FTP programs and I didn't think it was the purpose of this forum to promote one over the other. Try Filezilla.

 

Regarding your issue being the same as the one above just means you both may have made the same error in your installation.

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

View Postdjramm, on 21 July 2010 - 02:15 AM, said:

I have the same problem with this contribution, i have followed your instructions and i have ask you which ftp client to use i found one and used that and still the same thing. files are install in the right folders and the files that need modifing have been because i have other contriubtions install its not so simple for me .

 

Thank you for you time on this matter.

 

Regards dj

Posted Image

 

 

There are plenty of FTP programs and I didn't think it was the purpose of this forum to promote one over the other. Try Filezilla.

 

Regarding your issue being the same as the one above just means you both may have made the same error in your installation.

 

I've fixed it thank you for you help. Really apprecate it.

 

Regards DJ :lol: :blush: :blink: :-"

Link to comment
Share on other sites

Topic: Contact and About Page Not Showing Content - STS

 

Hi all

I've searched this one and not found a solution yet. I've been trying out the STS-latest version and have created my own template, loaded it into the Modules section in the Admin Section and see the home page correctly. If I click on a link to the contact_us.php page it successfully finds and loads the page but none of the code from the page shows in the main area. The page displays identically like the home page. I've read the manual and see that the sts_template.php page has the includes for the header and the footer. I've not included these but don't see any code in them to affect the main area of the page.

Can anyone direct me in the right direction here?

Thanks,

Frank

 

 

Did you include the $content$ variable tag within each of the template pages?

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

Hi All,

 

I wonder if you could help me with creating a new contact us page.

 

I would like to simply remove the Categories part from all the pages except for the product_info page.

 

Many thanks

 

 

This very simple to accomplish using STS.

  1. First, you need to edit a master product_info template to be used for all product pages. In this template, you would need to be sure to have the categories box variable within the template so that the box will be displayed.
  2. Now, make a master index.php template that does not include the categories box variable to prevent the categories box from showing up on any of the category pages.
  3. Make a contact_us.php.html template page with the layout that you desire. If you want to change the content contact form, you would need to edit the actual contact_us.php page itself and any modifications you make will be displayed in the contact_us.php.html template.

 

 

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

  • 2 weeks later...

Please help. I have a new shop I am trying to put together for my partner. She has a very specific design in mind which is actually a very simple one but I cant find a template close enough to try and replicate, so I'm trying to use sts. I've installed a new osc and uploaded all the sts files and clicked on the install button in the admin side of osc but then when I change the template the shop doesnt change at all. Any advice?

Link to comment
Share on other sites

Hi,

 

Hope someone can help me...I installed the latest version of STS and all works and looks great EXCEPT, printing of the pages, I had to create a print.css file to use when printing pages to block out certain codes & the page template that was causing a 1 page print to be a 3/4 page print.

 

ANYWAY, my only problem I have is if I try to print a category page with a large number of products, it doesn't break up the product page; what it's doing is (in Internet Explorer), the first page is blank and the second page contains the products that should overflow onto the next page. But again, the first page is blank it's not showing. But the funny thing is, in FireFox the first page of products show but the second page doesn't, totally stumped!

 

I HOPE SOMEONE CAN HELP ME because this has been driving me crazy for 2 weeks now, I searched high and low.

 

Regards,

 

Jane

Link to comment
Share on other sites

Hi,

 

Hope someone can help me...I installed the latest version of STS and all works and looks great EXCEPT, printing of the pages, I had to create a print.css file to use when printing pages to block out certain codes & the page template that was causing a 1 page print to be a 3/4 page print.

 

ANYWAY, my only problem I have is if I try to print a category page with a large number of products, it doesn't break up the product page; what it's doing is (in Internet Explorer), the first page is blank and the second page contains the products that should overflow onto the next page. But again, the first page is blank it's not showing. But the funny thing is, in FireFox the first page of products show but the second page doesn't, totally stumped!

 

I HOPE SOMEONE CAN HELP ME because this has been driving me crazy for 2 weeks now, I searched high and low.

 

Regards,

 

Jane

 

Nevermind, I fixed it :thumbsup: !

 

In case anyone else has this problem, i used

overflow: visible;

withing the print.css stylesheet.

 

Hope that helps someone.

 

Regards,

 

Jane

Link to comment
Share on other sites

Nevermind, I fixed it thumbsup.gif !

 

In case anyone else has this problem, i used

overflow: visible;

withing the print.css stylesheet.

 

Hope that helps someone.

 

Regards,

 

Jane

 

Thanks for taking the time to post back. thumbsup.gif

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

Hello,

 

I'm not sure where to post this but I'm trying to sort through some errors kicked out by KissER from FWR Media. I am getting errors that read like the following:

 

Error Type: [E_NOTICE] Undefined index: sts_debug

Error Type: [E_NOTICE] Undefined index: sts_template

 

Both of these errors reference the following code:

 

 function update_from_url () {
// Allow Debugging control from the URL
if ($_GET['sts_debug'] == MODULE_STS_DEBUG_CODE) {
$this->display_debug_output = true;
}

// Defines constants needed when working with templates
if ($_GET['sts_template']) {
$this->template_folder = $_GET['sts_template'];
} else {
$this->template_folder = MODULE_STS_TEMPLATE_FOLDER;
}

}

 

Any ideas as to what the problem may be?

 

Thanks.

Link to comment
Share on other sites

Hi Bill,

first of all thanks for all your great work in the community (been using lots of code from you in the past years).

 

I have a question, I'm trying to integrate the following contrib on my OSC which of course runs STS:

Ajax attributes images

 

What it does is simply linking an option to a an image, so that by slecting the corresponding option you can see a corresponding image in realtime.

 

Unfortunately, when the ajax call happens in product_info.php the result given is not the content I'm supposed to retrive but the HTML code of the STS template.

 

I suppose the two contributions have issues because of this code:

 

    <script language="javascript">

function createRequestObject() {

   var req;

   if(window.XMLHttpRequest){
	  req = new XMLHttpRequest();
   } else if(window.ActiveXObject) {
	  req = new ActiveXObject("Microsoft.XMLHTTP");
   } else {
	  req = NULL;
	  alert('Probleem met het aanmaken van hetXMLHttpRequest object');
   }

   return req;

}

   var http = createRequestObject();

   function sendRequestSearch(iets) {

      http.open('get', 'ajaximage.php?zoek='+iets);
      http.onreadystatechange = handleResponseSearch;
      http.send(null);

   }

   function handleResponseSearch() {




      if(http.readyState == 4 && http.status == 200){
         if(http.responseText) {
            document.getElementById("zoek_resultaten").innerHTML = http.responseText;
         } else {
            document.getElementById("zoek_resultaten").innerHTML = "   ";
         }

      } else {
         document.getElementById("zoek_resultaten").innerHTML = "   ";
      }

   }

</script>   

 

 

Any work around suggested?

 

thanks!

Link to comment
Share on other sites

Hi,

 

I'm having a bit of a nightmare... The site was working fine (with STS) until two days ago. Out of the blue it just stops. No one has been playing with the code or anything.

 

Anyway, I backup everything that was there and then revert back to the copy i had made of the site when I put it live - the working version. This didn't work, when i loaded index.php which was a blank screen. When i checked the source all i got was

 

<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->

 

and that's IT (same for all other pages)

 

however, the admin still worked, and my site came back when i disabled STS (note - sts WAS working previously)

 

I also contacted my hosting to check if they'd changed anything, and they hadn't. I got them to do a restore to last week too, but this still didn't help.

 

I've updated sts to the 4.6, and admin side it seems to work - however i've found a problem with my includes/column_right.php file. When I put the final

// START STS 4.1 
}
// END STS 4.1

in as told by the installation, i get a blank index.php page. Without the final } something loads - the core bits such as what is in the language index.php file but none of the template layout. grr.

 

Can someone help?

 

Before you say it -

  • I've compared my old column_right, the one in the 4.6 download, and my old backup one.
  • I've gone over ALL the installation procedure from scratch 5 or 6 times.
  • I've searched about every possible keyword phrase i can think of for this problem to find if someone else has had it on here

 

I've included the column_right.php

 

<?php
// START STS 4.1
if ($sts->display_template_output) {
$sts->restart_capture ('content');
}
else 
{
//END STS 4.1
/*  $Id: column_right.php 1739 2007-12-20 00:52:16Z hpdl $  

osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  

Copyright (c) 2003 osCommerce  Released under the GNU General Public License*/  

require(DIR_WS_BOXES . 'shopping_cart.php');  if (isset($HTTP_GET_VARS

['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');  if 

(tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 

'order_history.php');  
//secure seal  Box v1.0
include(DIR_WS_BOXES . 'securelogo.php');  if (isset($HTTP_GET_VARS['products_id'])) 
{    if 

(tep_session_is_registered('customer_id')) 
{      $check_query = tep_db_query("select 

count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = 

'" . (int)$customer_id . "' and global_product_notifications = '1'");      $check = 

tep_db_fetch_array($check_query);      if ($check['count'] > 0) {        include

(DIR_WS_BOXES . 'best_sellers.php');      }
else {        include(DIR_WS_BOXES . 

'product_notifications.php');      }    }
else {      include(DIR_WS_BOXES . 

'product_notifications.php');    }  }
else {    include(DIR_WS_BOXES . 

'best_sellers.php');  }  if (isset($HTTP_GET_VARS['products_id'])) {    if (basename

($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 

'tell_a_friend.php');  } else {    include(DIR_WS_BOXES . 'specials.php');  }
//  require (DIR_WS_BOXES . 'reviews.php');   if (substr(basename($PHP_SELF), 0, 8) != 'checkout') 
{    include(DIR_WS_BOXES . 'languages.php');    
include (DIR_WS_BOXES . 'currencies.php');  
require(DIR_WS_BOXES . 'memberlogin.php'); }

// START STS 4.1 
}
// END STS 4.1
?>

 

Thanks for any help that can be given. I don't understand why re-uploading my backed up working copy of the site isn't just fixing this.

 

regards

Edited by barneybruce
Link to comment
Share on other sites

Hi,

 

I'm having a bit of a nightmare... The site was working fine (with STS) until two days ago. Out of the blue it just stops. No one has been playing with the code or anything.

 

Anyway, I backup everything that was there and then revert back to the copy i had made of the site when I put it live - the working version. This didn't work, when i loaded index.php which was a blank screen. When i checked the source all i got was

 

<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->

 

and that's IT (same for all other pages)

 

however, the admin still worked, and my site came back when i disabled STS (note - sts WAS working previously)

 

I also contacted my hosting to check if they'd changed anything, and they hadn't. I got them to do a restore to last week too, but this still didn't help.

 

I've updated sts to the 4.6, and admin side it seems to work - however i've found a problem with my includes/column_right.php file. When I put the final

// START STS 4.1 
}
// END STS 4.1

in as told by the installation, i get a blank index.php page. Without the final } something loads - the core bits such as what is in the language index.php file but none of the template layout. grr.

 

Can someone help?

 

Before you say it -

  • I've compared my old column_right, the one in the 4.6 download, and my old backup one.
  • I've gone over ALL the installation procedure from scratch 5 or 6 times.
  • I've searched about every possible keyword phrase i can think of for this problem to find if someone else has had it on here

 

I've included the column_right.php

 

<?php
// START STS 4.1
if ($sts->display_template_output) {
$sts->restart_capture ('content');
}
else 
{
//END STS 4.1
/*  $Id: column_right.php 1739 2007-12-20 00:52:16Z hpdl $  

osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  

Copyright (c) 2003 osCommerce  Released under the GNU General Public License*/  

require(DIR_WS_BOXES . 'shopping_cart.php');  if (isset($HTTP_GET_VARS

['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');  if 

(tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 

'order_history.php');  
//secure seal  Box v1.0
include(DIR_WS_BOXES . 'securelogo.php');  if (isset($HTTP_GET_VARS['products_id'])) 
{    if 

(tep_session_is_registered('customer_id')) 
{      $check_query = tep_db_query("select 

count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = 

'" . (int)$customer_id . "' and global_product_notifications = '1'");      $check = 

tep_db_fetch_array($check_query);      if ($check['count'] > 0) {        include

(DIR_WS_BOXES . 'best_sellers.php');      }
else {        include(DIR_WS_BOXES . 

'product_notifications.php');      }    }
else {      include(DIR_WS_BOXES . 

'product_notifications.php');    }  }
else {    include(DIR_WS_BOXES . 

'best_sellers.php');  }  if (isset($HTTP_GET_VARS['products_id'])) {    if (basename

($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 

'tell_a_friend.php');  } else {    include(DIR_WS_BOXES . 'specials.php');  }
//  require (DIR_WS_BOXES . 'reviews.php');   if (substr(basename($PHP_SELF), 0, 8) != 'checkout') 
{    include(DIR_WS_BOXES . 'languages.php');    
include (DIR_WS_BOXES . 'currencies.php');  
require(DIR_WS_BOXES . 'memberlogin.php'); }

// START STS 4.1 
}
// END STS 4.1
?>

 

Thanks for any help that can be given. I don't understand why re-uploading my backed up working copy of the site isn't just fixing this.

 

regards

 

I'd say your host DID do something or you were hacked. You should have went over your files via FTP to see when the last time they were updated. Check all root files on your server to make sure a hacker didn't do something there.

 

Also, you could be dealing with a database problem. Try uninstalling STS via the admin and then log out. Login again to install STS to refresh the database.

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

  • 2 weeks later...

Hello,

 

I'm not sure where to post this but I'm trying to sort through some errors kicked out by KissER from FWR Media. I am getting errors that read like the following:

 

Error Type: [E_NOTICE] Undefined index: sts_debug

Error Type: [E_NOTICE] Undefined index: sts_template

 

Both of these errors reference the following code:

 

 function update_from_url () {
// Allow Debugging control from the URL
if ($_GET['sts_debug'] == MODULE_STS_DEBUG_CODE) {
$this->display_debug_output = true;
}

// Defines constants needed when working with templates
if ($_GET['sts_template']) {
$this->template_folder = $_GET['sts_template'];
} else {
$this->template_folder = MODULE_STS_TEMPLATE_FOLDER;
}

}

 

Any ideas as to what the problem may be?

 

Thanks.

 

Does anyone know why these would be kicked out as errors?

Link to comment
Share on other sites

Download the bkellum 15 Feb 2010 version.

 

The person who has uploaded the last two obviously is having issues with zip files.

 

>_<

 


 

Added in edit - I have reported the corrupt zip files.

 

Maybe they will be removed soon.

Edited by germ

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

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