Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

sorry for the multi-post

I kept getting a "500 server error" ?

please delete

 

 

is that possible to design layout for the 'content' new page, for example, i wish to add a table or picture or include placeholders.

 

Assumed that i am trying to create new page(artgallery.php) to oscommerce, then i wish to design layout on this, i.e. add table, picture, put $placeholders there like i did with index.php.html with css.

 

If yes, please kindly give instructions step by step for noobs like me. :)

Share this post


Link to post
Share on other sites

Hey guys

Got a quick question I am hoping someone knows the answer to.

 

With STS Templates can you link to the Placeholders (i.e. $content, $categorybox) outside of the Catalog?

 

I have my oscommerce installed in the catalog and would like to use the placeholders on my Index page.

If that makes sense.

 

Thanks Tim

 

No, if what you mean by index page as non-osCommerce. However, you could use STS to create your home page (index.php_0.html) and place whatever placeholders you want there.


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

is that possible to design layout for the 'content' new page, for example, i wish to add a table or picture or include placeholders.

 

Assumed that i am trying to create new page(artgallery.php) to oscommerce, then i wish to design layout on this, i.e. add table, picture, put $placeholders there like i did with index.php.html with css.

 

If yes, please kindly give instructions step by step for noobs like me. smile.gif

 

If you created your artgallery.php page according to osCommerce standards (see my STS Tutorial on how to add a new page using STS in the STS Power Pack download section - a site devoted to all STS related add-ons - link in my signature below), then you would simply create a template named artgallery.php.html and upload it to your template folder "includes/sts_templates/*Your_template_folder*/artgallery.php.html.

 

The new template can use any of the STS placeholders just like all of the other STS templates in your template folder.

Have fun,


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 guys,

I'm kindof tearing my hair out here.

Need some help.

 

I'm having a ball with STS. Can't imagine how people get along without it.

 

I used a well known contribution to also use Lightbox with STS and ultrapics.

All works well, as designed to do.

 

But I NEED to use Shadowbox instead because I have to open non-image targets into it.

Only Shadowbox allows me to do that.

 

Should be easy enough.

Just copy how the guy who integrated Lightbox into STS did it and substitute Shadowbox files instead.

 

Nup....No good.

 

Shadow box works fine with templates turned off.

Turn them on however and no go.

 

I've done a file compare of the View Source codes to see where the difference is. There isn't any.

 

I've put the usual <script> code at the top of my template file.

 

Browser is finding the actual source files (According to View Source)

 

I've scoured various STS files to find some reference to Lightbox to see if I'm supposed to define it somewhere but no luck.

 

No luck in searching these forums or Addons site.

 

Can anybody point me in the right direction please?

Share this post


Link to post
Share on other sites

Hi guys,

I'm kindof tearing my hair out here.

Need some help.

 

I'm having a ball with STS. Can't imagine how people get along without it.

 

I used a well known contribution to also use Lightbox with STS and ultrapics.

All works well, as designed to do.

 

But I NEED to use Shadowbox instead because I have to open non-image targets into it.

Only Shadowbox allows me to do that.

 

Should be easy enough.

Just copy how the guy who integrated Lightbox into STS did it and substitute Shadowbox files instead.

 

Nup....No good.

 

Shadow box works fine with templates turned off.

Turn them on however and no go.

 

I've done a file compare of the View Source codes to see where the difference is. There isn't any.

 

I've put the usual <script> code at the top of my template file.

 

Browser is finding the actual source files (According to View Source)

 

I've scoured various STS files to find some reference to Lightbox to see if I'm supposed to define it somewhere but no luck.

 

No luck in searching these forums or Addons site.

 

Can anybody point me in the right direction please?

 

Are you using the Product Info Content template feature in STS? If so, turn if off temporarily to see if your shadowbox effect works.


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 guys,

I'm kindof tearing my hair out here.

Need some help.

 

I'm having a ball with STS. Can't imagine how people get along without it.

 

I used a well known contribution to also use Lightbox with STS and ultrapics.

All works well, as designed to do.

 

But I NEED to use Shadowbox instead because I have to open non-image targets into it.

Only Shadowbox allows me to do that.

 

Should be easy enough.

Just copy how the guy who integrated Lightbox into STS did it and substitute Shadowbox files instead.

 

Nup....No good.

 

Shadow box works fine with templates turned off.

Turn them on however and no go.

 

I've done a file compare of the View Source codes to see where the difference is. There isn't any.

 

I've put the usual <script> code at the top of my template file.

 

Browser is finding the actual source files (According to View Source)

 

I've scoured various STS files to find some reference to Lightbox to see if I'm supposed to define it somewhere but no luck.

 

No luck in searching these forums or Addons site.

 

Can anybody point me in the right direction please?

 

Are you using the Product Info Content template feature in STS? If so, turn if off temporarily to see if your shadowbox effect works.


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

[...]

But I NEED to use Shadowbox instead because I have to open non-image targets into it.

[...]

Hi

 

Reading your post, I got curious about Shadowbox, and yes, you are right, it is a great thing. Not just images, but like any type of stuff (pure html, external websites, internal sites, flash, video, whatever) can be displayed on the SAME page, using a nice shadowbox effect.

 

The good news are that yes, I got it working perfectly with sts, on the main template, content templates for product info, content templates for other pages, everywhere. I will put things nicely together and will upload everything to the sts powerpack, probably tomorrow. I don't want to post without being absolutely sure that I didn't forgot anything.

 

For now (assuming that you got a little busy with the issue already) I can tell you following

1) You need to upload the shadowbox package to your stores root structure, first level, catalog/. It doesn't matter if you take the "build" or "source" version

 

2) You need to place the basic init to somewhere, where it can be red from all files that will be using shadowbox

<!-- BOF this section is the only one needed to run Shadowbox -->
<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
   language: 'en',
   players:  ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv']
});

// this is the general init. Particular functions are created in the related pages
</script>
<!-- EOF this section is the only one needed to run Shadowbox -->

For me I have it in my header.php.html, that I'm calling in all other files (default, index_0, various index, etc) via

<?php include("header.php.html"); ?>

It worked also in following places:Product_info.php.html (main level and content level), product_info.php (the stock osc file, into the <head> of html part, default.html

 

3) In the template files you can call the shadowbox in various ways, the most simple are:

        <a rel="shadowbox;width=400;" title="<?php echo(LINK_MAIL); ?>" href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>"  class="linSt1"><?php echo(LINK_MAIL); ?></a><br>

This I have in my footer.php.html (could be also part of the default.html, or index.php.html) and is opening the contact us form in a shadowbox wndow (text are defined in language files ofcourse)

other way:

<a rel="shadowbox;width=400;height=800;options={initialWidth:'100',initialHeight:'100'}" class="linSt2" title="<?php echo(TEXT_MORE_INFO4); ?>" href="index.html#inline-start"><?php echo(LINK_MORE); ?></a>

This is placed into a content product_info template, and is calling a plain html text, placed into a "hidden" <div> (by a css class). This hidden text can contain a text defined in a language file

<?php echo(TEXT_RELATED2); ?>

or a tag defined in the proper sts_inc/ file like $productdesc$

other way

<p><a class="linst2" onclick="account();">create account</a></p>

To use the "onclick", you need to have the corresponding function defined, could be done in the same file where the init function is placed, I do it in the fle where I call the function, for a better overview

function account(){
   Shadowbox.open({
       player:     'iframe',
       content:    url='create_account.php',
	title:		'<?php echo(TEXT_MORE_INFO2); ?>', // or $productname$
       width:      400
   });

(dont get confused by the text and tags I use, they are just for experimenting)

 

I hope this all make a sense for you. It's not like ready cooked, because I'm also still trying out the posibilities

 

For all people who want to have shadowbox with sts, please do NOT just copy paste, unless you want to experiment your self. I will upload everything after I'm sure what works and what not, and whats the best way to do something.

 

there are still issues I have, so I'm posting them for discussion:

 

1) In some files (for example contact_us.php) there are "continue" buttons. If this file is called into shadowbox, the result is that all next windows appear into the shadowbox, thats confusing. The solution I gave, is to make the "continue" to open the next window in parent, like this(file contact_us.php)

                <td align="right"><?php echo '<a href="' .   tep_href_link(FILENAME_DEFAULT)  . '"  target="_parent">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

So, it goes to the main page after closing. But I want it to go to the same page it was, so I do

                <td align="right"><?php echo '<a href="' .  $origin_href  . '"  target="_parent">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

But in this case it goes to the very top index file (an index.html in my case). For now I disabled the the continue button, using just the "close" tha comes with shadowbox, but it would be nice to keep the osC buttons as well

 

2) To make a file to appear nicely, you don't want to have again the page header and footer etc. The solution is to make a template for this page that contains just the $content. This is ok, if you call the file just via shadowbox links.

But what is with files that can be opened from many locations? example the login.php? It can come from link "login" but also from "checkout" if person is not logged in, or "myaccount" etc. Without shadowbox, the temlate looks like nothing. There is the way to try to change ALL links to be "rel="shadowbox". Other way to have 2 files doing the same thing(so I can have 2 templates), but is this not a "too much" just for having the effect?

 

3) I want to make the shopping cart to open in such a effect after adding a product.

The solution is to define a function

function addCart(){
   Shadowbox.open({
       player:     'iframe',
       content:    url='shopping_cart.php',
       width:      400
   });
}

and then to make the link(button) as follows

	<p><a class="linst2" onclick="addCart();">$addtocartlarge$</a></p>

This works, adding the item to the cart BUT: osCommerce is reloading the page (from admin show cart=false) after pressing "add to cart", so there is no time to see the effect. I don't know how to disable the reloading, maybe something to do in application_top.php?

 

------------

Well I hope that I didn't confuse you more than necessary and I'm sorry for spamming the forum with such a huge post. I hope that some people will find an interest in doing this.

 

Have a nice sunday :)

Edited by multimixer

Share this post


Link to post
Share on other sites

Hello, I am trying at the moment to install STS. I have read the install.html file but it doesn't make sense to me.

 

Is all I am doing attempting to copy the files to there respective locations? For example I just copy the contents of each folder to my directory on my webserver. It is asking me to overwrite files when I do this. Can someone point me to a simple guide of which files to copy where. I know I sound like an idiot but I have read all I can and am very stuck.

 

Thank you for you time.

Share this post


Link to post
Share on other sites

I cannot seem to figure out how to install STS. I have read the install.html and Im not sure which files to copy or how to do the configure section below it. I tried copying just everything in the install files I downloaded but it did not seem to do anything.

 

Any help would be great thanks!

Share this post


Link to post
Share on other sites

I cannot seem to figure out how to install STS. I have read the install.html and Im not sure which files to copy or how to do the configure section below it. I tried copying just everything in the install files I downloaded but it did not seem to do anything.

 

Any help would be great thanks!

 

First, you need to know what version of osC that you have installed: MS2, RC1, RC2 or v3.

 

STS will not work on v3.

 

1. Then, upload all of the files (keep folder structure in place) from the "STS" folder to the same folders on your server.

 

2. Then, either upload all of the files from one of the osC version folders (MS2, RC1, RC2) to the same folders on your server or follow the directions included to insert each line of modified code to the files specified.

 

3. Configuration: Once all of the files are uploaded, simply login to your admin, click on "modules" and then select STS. Click on the install button for STS Default Module. Open the STS Default Module by clicking on the "Edit" button. Select "true" to use templates and then type in the STS template folder you want to use (it comes out of the box with "test" or "full", you can add more later). Click "Save" and there you go.


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

First, you need to know what version of osC that you have installed: MS2, RC1, RC2 or v3.

 

STS will not work on v3.

 

1. Then, upload all of the files (keep folder structure in place) from the "STS" folder to the same folders on your server.

 

2. Then, either upload all of the files from one of the osC version folders (MS2, RC1, RC2) to the same folders on your server or follow the directions included to insert each line of modified code to the files specified.

 

3. Configuration: Once all of the files are uploaded, simply login to your admin, click on "modules" and then select STS. Click on the install button for STS Default Module. Open the STS Default Module by clicking on the "Edit" button. Select "true" to use templates and then type in the STS template folder you want to use (it comes out of the box with "test" or "full", you can add more later). Click "Save" and there you go.

 

I don't understand what you mean in part 2. I did manage to get STS to show up in modules by copying all the STS files from the download onto my server. I then hit install. I have OSC RC2 I believe but I don't know where these folders are? They are not in the sts thing I downloaded. Also now that I have done it when I do the test page /includes/sts_templates/test/sts_template.html it just shows up the stuff like $checkout etc. The boxes are not there!

Share this post


Link to post
Share on other sites

I don't understand what you mean in part 2. I did manage to get STS to show up in modules by copying all the STS files from the download onto my server. I then hit install. I have OSC RC2 I believe but I don't know where these folders are? They are not in the sts thing I downloaded. Also now that I have done it when I do the test page /includes/sts_templates/test/sts_template.html it just shows up the stuff like $checkout etc. The boxes are not there!

 

 

When all else fails, do the manual install or you could use the files from RC1.


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

Here's a new one.

 

I have STS running fine except for this.

 

I have installed the "Product Attribute - Option Type" Contribution which basically, "...allows the use of various option types when setting up product attributes. With the current milestone of osCommerce, all options are displayed as select lists. This contribution specifically adds Text Options, Radio Buttons, Checkboxes and Textarea fields."

 

When I have option types listed from a product_info page, STS forces dropdowns. The whole point of installing "Option Types" contribution was to be able to add text fields to the product options. This works when I disable product_info pages and just use OSC product_info.

 

Is there any way to tell STS to just treat option types like OSC default does so I can get out of strict dropdowns.

 

Thanks.

Gabe

 

still looking for a solution on this problem. has anyone found a way around this? there has to be some solution

Share this post


Link to post
Share on other sites

still looking for a solution on this problem. has anyone found a way around this? there has to be some solution

 

What version of STS are you using as the one used in the quote you posted was before version 4 came out. STSv4 handles things quite differently than the previous versions so the solution would be quite different.

 

thumbsup.gif The STS Power Pack site (site dedicated to all STS add-ons) has an add-on that may meet your needs.


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 need help...I am new to the os commerce and am having difficulties adding the sts into my files...I would love to change the look of my store, i have downloaded and added all the sts files and when i try to go into modules to change over i get this error message:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@designinspirations.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Can anyone help me figure out what i am doing wrong, I am getting very frustrated as this is now the fourth time that I have tried redone everything.

 

thanx

Share this post


Link to post
Share on other sites

I need help...I am new to the os commerce and am having difficulties adding the sts into my files...I would love to change the look of my store, i have downloaded and added all the sts files and when i try to go into modules to change over i get this error message:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@designinspirations.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Can anyone help me figure out what i am doing wrong, I am getting very frustrated as this is now the fourth time that I have tried redone everything.

 

thanx

Share this post


Link to post
Share on other sites

Help me!!!

 

I am new to this oscommerce and am trying to change the look of my store...I have downloaded and change all the files with the sts, when i try to go to modules and set the sts to use a template i get this error message:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@designinspirations.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

I have redone this four times and am getting very frustrated, is there someone out there that can help figure what is going wrong...I even downloaded 4.9 this evening and tried again...

 

thank you for your time

Share this post


Link to post
Share on other sites

Are you using the Product Info Content template feature in STS? If so, turn if off temporarily to see if your shadowbox effect works.

Hi Bill,

No content templates being used.

I'm actually trying to open Shadow box from index.php_0.html

 

 

The good news are that yes, I got it working perfectly with sts, on the main template, content templates for product info, content templates for other pages, everywhere. I will put things nicely together and will upload everything to the sts powerpack, probably tomorrow. I don't want to post without being absolutely sure that I didn't forgot anything..............

 

Thanks George,

I'm posting just to let you know I saw your post.

Bit pushed for time but I'm working my way through your post and trying to apply what you've written.

I'll come back here when I have some news.

 

Cheers

Jim

Share this post


Link to post
Share on other sites

[...]

Bit pushed for time but I'm working my way through your post and trying to apply what you've written.

I'll come back here when I have some news.

[...]

 

Thanks for the reply. After you have some results from your trials please post them, I'm also testing around :)

 

You need to post the init to the <head> of your index.php_0.html.

 

Also do not forget to place this on top (replacing the doctype you have)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

 

I forgot to mention in before, but it's importand

Edited by multimixer

Share this post


Link to post
Share on other sites

Help me!!!

 

I am new to this oscommerce and am trying to change the look of my store...I have downloaded and change all the files with the sts, when i try to go to modules and set the sts to use a template i get this error message:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@designinspirations.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

I have redone this four times and am getting very frustrated, is there someone out there that can help figure what is going wrong...I even downloaded 4.9 this evening and tried again...

 

thank you for your time

 

This would have to do with your host or something wrong in your .htaccess file. *Nothing to do with STS


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

What version of STS are you using as the one used in the quote you posted was before version 4 came out. STSv4 handles things quite differently than the previous versions so the solution would be quite different.

 

thumbsup.gif The STS Power Pack site (site dedicated to all STS add-ons) has an add-on that may meet your needs.

 

Thanks for the reply. Using STS v4.5.8 with Option Types v2.1.3. I have checked the power pack but there is nothing relating to Option Types Attributes in there. I know it has something to do with the product_info.php file in the STS directory but I'm not sure exactly how to edit it to get it to work properly together

Share this post


Link to post
Share on other sites

Thanks for the reply. Using STS v4.5.8 with Option Types v2.1.3. I have checked the power pack but there is nothing relating to Option Types Attributes in there. I know it has something to do with the product_info.php file in the STS directory but I'm not sure exactly how to edit it to get it to work properly together

 

If you do not insist to have a preview of the "images options" and if you can live with the small problems that still exist, you can use this post here. It will do what you want. Try it out and post the results or ideas for improvement

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

×