Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

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?

 

David,

You need to upload the STS files as well.

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

ALLO!

 

I just installed STS (v4.5.8) on a clean install of osCommerce 2.2-MS2. But when I go to view the catalog (www.mysite.com/catalog) I get nothing but a blank page. I've tried to install it twice (including re-uploading the files to the server, and activating STS in the osC Admin page). From what I can tell I've followed every direction...

 

What am I missing?

 

Thanks!

Link to comment
Share on other sites

ALLO!

 

I just installed STS (v4.5.8) on a clean install of osCommerce 2.2-MS2. But when I go to view the catalog (www.mysite.com/catalog) I get nothing but a blank page. I've tried to install it twice (including re-uploading the files to the server, and activating STS in the osC Admin page). From what I can tell I've followed every direction...

 

What am I missing?

 

Thanks!

Try this:

Use a file comparison tool such as Beyond Compare or WinMerge to compare your files on your server with the files from the contribution. This will easily show you any code that is misplaced or missing that may be causing the blank page.

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,

 

Does anyone know a good place to get STS templates. The osCommerce templates I have been seeing on the web seem to be stand-alone osCommerce installs.

 

What are my options regarding purchasing pure STS templates?

 

Thanks!

Link to comment
Share on other sites

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

PM coming up!

 

 

Hi I managed to get UltraPics, QTPro and STS all working happily in the products_info.php file (although not without a lot of huffing and puffing!)

 

I'd be happy to share it with you - send me a PM.

 

If anyone can suggest where would be a good place to upload it, I can do that...

 

Cheers

Sol

Link to comment
Share on other sites

Hi I managed to get UltraPics, QTPro and STS all working happily in the products_info.php file (although not without a lot of huffing and puffing!)

 

I'd be happy to share it with you - send me a PM.

 

If anyone can suggest where would be a good place to upload it, I can do that...

 

Cheers

Sol

You should post all STS addons, tips, templates to the STSv4 Power Pack site. This site is dedicated for such. Link is in my signature below.

 

Thanks for sharing!

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,

 

Does anyone know a good place to get STS templates. The osCommerce templates I have been seeing on the web seem to be stand-alone osCommerce installs.

 

What are my options regarding purchasing pure STS templates?

 

Thanks!

PM me for a link but you should know that you can easily convert any of the osC templates into a STS template.

 

Here is my step by step:

Post # 2587 in the STSv4 Forum

( http://www.oscommerce.com/forums/index.php?sho...p;#entry1131089 )

 

You can also use ANY web template and easily add in your STS tags and presto, you have a STS 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

Hello there!

 

Im getting in to sts right now and let me tell you it kicks some serious tuchy.

 

Im wondering now What those files in the folder "full" relates to?

 

In the manual page 13 there is a description of placeholders. therde one $cataloglogo:

 

Since v4.3: header_logo.gif, in template folder/images/english (or other language).

 

The folder "template folder" were might I find it?

Can I have the same image for all of my language?

 

It would really help a lot if some friendly soul could tell me...

 

All the best,

 

SimonSay

Link to comment
Share on other sites

I have just converted the Modern Template for RC2a ( http://www.oscommerce.com/community/contri...ons,6094/page,5) into a STS Template.

 

You can download it at the STS Power Pack site (a site dedicated to All STS Addons).

 

http://addons.oscommerce.com/info/4456

 

Enjoy!

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

I figured out my previous question.. I should create new folders with the name of ex: "index.php.html"

 

New question:

May I ask where the content to the "$content" variabel is?

 

All the best,

SimonSays

This is not correct.

 

The sts_templates is the main depository for all of your custom template folders such as full, test, or any other additional template folders that you may add. You can not delete the sts_templates directory but you can delete any template folder within it such as full, test, etc.

 

The template folder should include your templates such as index.php.html, sts_template.html (default template), box templates, content templates, etc.

 

The $content tag pulls in the data that is being requested. The actual content is spread out through many different php files within your store.

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 is not correct.

 

The sts_templates is the main depository for all of your custom template folders such as full, test, or any other additional template folders that you may add. You can not delete the sts_templates directory but you can delete any template folder within it such as full, test, etc.

 

The template folder should include your templates such as index.php.html, sts_template.html (default template), box templates, content templates, etc.

 

The $content tag pulls in the data that is being requested. The actual content is spread out through many different php files within your store.

 

 

I see..

 

so I can have all my templates in the sts_templates folder?... How then do I name the files? I guess the first is index.php.html What is the next step? How do I know with php file the Content in the $content variabel comes from, that i need to change?

 

 

I have read the manual.. and there are alot of question marks. Pleace point me to the right page....

Thank you so much for your answer! Im farely new to all this... Much appreceated!

Edited by SimonSay
Link to comment
Share on other sites

I see..

 

so I can have all my templates in the sts_templates folder?... How then do I name the files? I guess the first is index.php.html What is the next step? How do I know with php file the Content in the $content variabel comes from, that i need to change?

 

I have read the manual.. and there are alot of question marks. Pleace point me to the right page....

Thank you so much for your answer! Im farely new to all this... Much appreceated!

No,

You can have all your templates in the sts_templates/*your template folder*/, where *your template folder* would be either "full" or "test" or "my_templates" or whatever folder name that you created.

 

When you install STS, the default template folder is "test". This should be changed to your template folder. I suggest changing it to "full" since the "full" template folder demonstrates on the folder structure for "boxes", "images" and "content" folders. These folders include your infobox templates, your template images, and your content templates (if you use them).

 

At this point, do not mess with any content templates as you need to familarize yourself with STS and osCommerce first.

 

Read the included files in the "doc" folder of the contribution. These files explain how STS chooses which template to use for each PHP file being called for in the browser. These files also explain how you should name your templates.

 

Hope this helped,

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

No,

You can have all your templates in the sts_templates/*your template folder*/, where *your template folder* would be either "full" or "test" or "my_templates" or whatever folder name that you created.

 

When you install STS, the default template folder is "test". This should be changed to your template folder. I suggest changing it to "full" since the "full" template folder demonstrates on the folder structure for "boxes", "images" and "content" folders. These folders include your infobox templates, your template images, and your content templates (if you use them).

 

At this point, do not mess with any content templates as you need to familarize yourself with STS and osCommerce first.

 

Read the included files in the "doc" folder of the contribution. These files explain how STS chooses which template to use for each PHP file being called for in the browser. These files also explain how you should name your templates.

 

Hope this helped,

 

Thank you..

Now I start to roll down the right hill ;-)

 

All the best!

Link to comment
Share on other sites

My $categorycssmenu doesn't show up.

Everything works but $categorycssmenu doesn't..

When I get in to the shop there is no box it just the text " $categorycssmenu ", how did I fix that?

Thomas,

 

If you are referring to the Modern Template RC2a for STS, then be sure you have uploaded the includes/boxes/categories_cssmenu.php file as well as the includes/modules/sts_inc/sts_column_left.php file from the template contribution.

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, I am trying to add javascript to STS, I have this in my main body:

 

<td valign="top" id="VU" width="300">

<img src="images/wine1.gif" name='SlideShow' width=300

 

And this in my header:

 

<script type="text/javascript">

// © 2000 www.CodeLifter.com

// http://www.codelifter.com

// Free for all users, but leave in this header

// NS4-6,IE4-6

// Fade effect only in IE; degrades gracefully

 

// =======================================

// set the following variables

// =======================================

 

// Set slideShowSpeed (milliseconds)

var slideShowSpeed = 3000

 

// Duration of crossfade (seconds)

var crossFadeDuration = 3

 

// Specify the image files

var Pic = new Array() // don't touch this

// to add more images, just continue

// the pattern, adding to the array below

 

Pic[0] = 'images/wine1.gif'

Pic[1] = 'images/wine2.gif'

Pic[2] = 'images/wine3.gif'

Pic[3] = 'images/wine4.gif'

Pic[4] = 'images/wine5.gif'

 

// =======================================

// do not edit anything below this line

// =======================================

 

var t

var j = 0

var p = Pic.length

 

var preLoad = new Array()

for (i = 0; i < p; i++){

preLoad = new Image()

preLoad.src = Pic

}

 

function runSlideShow(){

if (document.all){

document.images.SlideShow.style.filter="blendTrans(duration=2)"

document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"

document.images.SlideShow.filters.blendTrans.Apply()

}

document.images.SlideShow.src = preLoad[j].src

if (document.all){

document.images.SlideShow.filters.blendTrans.Play()

}

j = j + 1

if (j > (p-1)) j=0

t = setTimeout('runSlideShow()', slideShowSpeed)

}

</script>

 

 

When I go to view the page, the first image is there but the slideshow doesn't work, it just stays on the 1st image but doesn't transition to the next one. What am I doing wrong? Is using Javascript in STS possible?

Link to comment
Share on other sites

Hi, I am trying to add javascript to STS, I have this in my main body:

 

When I go to view the page, the first image is there but the slideshow doesn't work, it just stays on the 1st image but doesn't transition to the next one. What am I doing wrong? Is using Javascript in STS possible?

DeeUK,

STS has no issues at all with using JavaScript. It is implemented the same as any other web page.

 

You can include a javascript file from inside a template by placing the file in your template folder and in the header of your template you could link to it by adding this:

<script LANGUAGE="JavaScript" SRC="$templatedir/yourjavascriptfile.js"></SCRIPT>

 

You could also use the extracss tag for any external files as well, not just external css files. I find the above a lot simpler though.

 

Note: I didn't have time to debug your script so you might want to make sure the script is good to begin with.

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

Link to comment
Share on other sites

Thanks for your reply BKellum.

I just wondered as I simply copied and pasted the script from another website which worked perfectly but doesn't on the oscommerce one. I will go through it all again and try to see what the problem is:0)

Link to comment
Share on other sites

Let me know if this is not the right place for questions about STS.

 

In my sts_template.php template file, I have my $cartbox placed where I want it in the code--- but I don't want it to show up if the cart is empty.

 

I was looking to use something like the following:

 

<?php

if($cart->count_contents() >0)

echo "$cartbox";

?>

 

but that code won't work in the template file, because the count_contents() function only works with the files directly under the catalog folder that have included application_top.php (right?). Meanwhile, the "$cartbox" is only meaningful in the STS template files, not in files that are directly under the catalog folder.

 

So, how do I get the shopping cart box to only show up when it has items?

Link to comment
Share on other sites

Let me know if this is not the right place for questions about STS.

 

In my sts_template.php template file, I have my $cartbox placed where I want it in the code--- but I don't want it to show up if the cart is empty.

 

I was looking to use something like the following:

 

<?php

if($cart->count_contents() >0)

echo "$cartbox";

?>

 

but that code won't work in the template file, because the count_contents() function only works with the files directly under the catalog folder that have included application_top.php (right?). Meanwhile, the "$cartbox" is only meaningful in the STS template files, not in files that are directly under the catalog folder.

 

So, how do I get the shopping cart box to only show up when it has items?

If you want the STS tag $cartbox to function differently from the stock osC behavior, then you need to modify the tag itself or create a new tag altogether.

 

In order to modify the $cartbox tag, you would need to edit the following in includes/modules/sts_inc/sts_column_left.php:

  require(DIR_WS_BOXES . 'shopping_cart.php');
 $sts->restart_capture ('cartbox', 'box'); // Get shopping cart box

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

If you want the STS tag $cartbox to function differently from the stock osC behavior, then you need to modify the tag itself or create a new tag altogether.

 

In order to modify the $cartbox tag, you would need to edit the following in includes/modules/sts_inc/sts_column_left.php:

  require(DIR_WS_BOXES . 'shopping_cart.php');
 $sts->restart_capture ('cartbox', 'box'); // Get shopping cart box

 

Thanks for the reply. I think what I really want to do is insert some code in the template file that only shows up if the cart is not empty.

In other words, when I reference $cartbox, I want it to show up in the exact same way. But, I want to have some PHP in the sts_template.php file that says if(cart not empty) echo 'my html' else echo 'other'

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