Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

HI,

 

I have just installed the latest version, I went to my admin area and edited the modules there

 

I have gone to my site and now see a page with links that do not work and an error message as follows

 

Shipping & Returns

Privacy Notice

Conditions of Use

Contact Us

 

Fatal error: Class 'infoBoxFooter' not found in /home/roundtree/public_html/includes/boxes/information.php on line 28

 

It could have something to do with installing the script at 4am, Anyone able to shed some light on this?

 

Thanks very much for any help

Link to comment
Share on other sites

HI,

 

I have just installed the latest version, I went to my admin area and edited the modules there

 

I have gone to my site and now see a page with links that do not work and an error message as follows

 

Shipping & Returns

Privacy Notice

Conditions of Use

Contact Us

 

Fatal error: Class 'infoBoxFooter' not found in /home/roundtree/public_html/includes/boxes/information.php on line 28

 

It could have something to do with installing the script at 4am, Anyone able to shed some light on this?

 

Thanks very much for any help

Jack, this would not have anything to do with the STS installation. You may have a separate contribution that you may have corrupted some how.

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 a great template engine for OScommerce.

 

oscommerce-2.2rc1

STSv4.5.4 ( 4.5 SP5 and 4.5.6 break my template I still do not know what causes such.)

http://www.BecksViolin.com

 

I am having a problem with applying template at infobox. Everything else seems to work just fine.

 

I am using default template for information box from STS package (sts_templates\full\boxes). However, I do not see the templates at my site at all.

 

Any idea?

 

TIA

FiveAngels

Edited by fiveangels
Link to comment
Share on other sites

Simple Template System (STS) README.txt v1.3

Contribution Author: Brian Gallagher @ DiamondSea.com

Contribution Author Email: [email protected]

 

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

WHAT IT DOES:

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

Lets you create simple HTML templates to customize the look and feel of OSC.

 

You simply create an HTML page that looks the way you want it to and put in

placeholders for the various elements wherever you want to position them.

 

For example, you would put "$cartbox" wherever on the page you want the

Shopping Cart box to appear. Put "$categorybox" where you want the Categories

box to appear. Put "$content" wherever you want the main page

content (the central part where all the magic happens) to appear, etc.

 

It does this by changing only a few /catalog/includes/ files, leaving all

other files untouched, making it easy to add other contributions later.

 

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

BONUS FEATURES: Simple HEADER TAG CONTROLLER Integration

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

This contribution also allows you to use WebMakers.com's

Header Tag Controller contribution without having to modify every file on

the system. Just copy the Header Tag Controller's include files into place

and STS will automatically add them to all pages without having to modify

every PHP script in the /catalog/ directory.

 

STS will auto-detect if Header Tag Controller is installed and use it if

available.

 

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

HOW TO INSTALL:

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

 

Installation Instructions are found in the readme.txt file included in the package. Please read the readme.txt file for a list of installation instructions, new features, new variables and other enhancements to STS.

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

HOW TO USE:

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

Just modify the

 

/catalog/includes/sts_template.html

 

file to look however you want. Use stylesheet settings or HTML setting to

provide a custom look and feel to your site and arrange elements wherever you

like them.

 

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

SUPPORTED TAGS:

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

Here are the tags that are supported so far (more sure to come in later

versions):

 

$headcontent: Put this string in your <head> section so that it can insert

the dynamic head content and javascript on pages that require it. This will

probably require putting the $headcontent in the <head> section in the source

code. It's a pain to do it this way, but it was the only way I could get it

working. Sorry!

 

<!--$headcontent--> : You can use this commented format of $headcontent to

keep the word "$headcontent" from displaying in your web authoring software.

 

NOTE: Do not put <title>...</title> tags in your header. It will be added

as part of the $headcontent variable, along with the Description and Keywords

meta tags if you have the WebMakers.com's Header Tag Controller contribution

installed.

 

$cataloglogo: The OSC logo and link

$urlcataloglogo: The URL used by the $catalog logo.

$myaccountlogo: The MyAccount graphic and link

$urlmyaccountlogo: The URL used by the My Account function

$cartlogo: The Cart graphic and link

$urlcartlogo: The URL used by the Cart function

$checkoutlogo: The Checkout graphic and link

$urlcheckoutlogo: The URL used by the Checkout function

$breadcrumbs: The "Top > Catalog > whatever..." breadcrumbs text and links

$myaccount: The text version of "My Account" and link. Changes to "Logoff" if logged on.

$urlmyaccount: The URL used by the MyAccount function.

$cartcontents: The text version of the "Cart Contents" function.

$urlcartcontents: The URL used by the MyAccount function.

$checkout: The text version of the "Check Out" function.

$urlcheckout: The URL used by the "Check Out" function.

 

$categorybox: The Category box

$manufacturerbox: The Manufacturer box

$whatsnewbox: The What's New box

$searchbox: The Search box

$informationbox: The Information box

$cartbox: The Shopping Cart box

$maninfobox: The Manufacturer Info box (blank if not used on a page)

$orderhistorybox: The Order History box (blank if not used on a page, ie: use not logged in)

$bestsellersbox: The Best Sellers box

$specialfriendbox: Either the Specials box or the Tell A Friend box (depending on page viewed)

$reviewsbox: The Reviews box

$languagebox: The Languages box

$currenciesbox: The Currencies box

$content: The main content of the page (the middle of the page)

$date: The current date

$numrequests: The "XXX requests Since DATE" text

$counter: The page view counter

$footer: The footer output from footer.php

$banner: The banner output from footer.php

 

$sid: The string for the Session ID in the format "SessionIdVarName=WhateverTheSessionIdIs"

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

DEBUGGING:

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

In the /catalog/includes/application_bottom.php file you can see the

following settings (near the top of the file):

 

$display_template_output = 1;

$display_normal_output = 0;

$display_debugging_output = 0;

 

Display_Template_Output (the default setting) will cause it to display the

template versions of the pages.

 

Display_Normal_Output will cause it to display the non-template version of

the pages.

 

Display_Debugging_Output will cause it to display debugging information

showing all of the blocks of data that it is using and how it translates

them into template variables.

 

You can use any or all of the settings in any combination. If you have both

Normal and Template output, the Template output will be displayed first.

 

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

REMOTE DEBUGGING:

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

You can toggle the debugging options via URL options. You can use the

following parameters in your URL to turn on/off options from your browser

 

sts_template=1 Turns on the Template display

sts_template=0 Turns off the Template display

sts_normal=1 Turns on the Normal display

sts_normal=0 Turns off the Normal display

sts_debug=1 Turns on the Debugging display

sts_debug=0 Turns off the Debugging display

sts_version=1 Turns on Version Number display

sts_version=0 Turns off Version Number display

 

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

SUPPORT:

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

 

For support, please post to this thread.

:'( [email protected]) Ok, I know I'm a moron but how do you actually DOWNLOAD the STS package?? Is it a tar bundle, a RAR , a ZIP??? And where exactly is it?? I've been reading these posts for hours and cannot find the location of the package. HELP THE MORON, PLEASE
Link to comment
Share on other sites

Thanks for a great template engine for OScommerce.

 

oscommerce-2.2rc1

STSv4.5.4 ( 4.5 SP5 and 4.5.6 break my template I still do not know what causes such.)

 

 

I am having a problem with applying template at infobox. Everything else seems to work just fine.

 

I am using default template for information box from STS package (sts_templates\full\boxes). However, I do not see the templates at my site at all.

 

Any idea?

 

TIA

FiveAngels

 

Nevermind, I found the problem. I edited box.php from the original OScommerce package and uploaded instead of from STS package.

 

Thanks

FiveAngels

Link to comment
Share on other sites

:'( [email protected]) Ok, I know I'm a moron but how do you actually DOWNLOAD the STS package?? Is it a tar bundle, a RAR , a ZIP??? And where exactly is it?? I've been reading these posts for hours and cannot find the location of the package. HELP THE MORON, PLEASE
Why in the world did you post an outdated readme file????

:thumbsup: TIP: The first post in most forums will give the download link for that particular contribution.

 

There is only one version of STS. You can download the latest version here:

http://www.oscommerce.com/community/contributions,1524

STS 4.5.4 for 2.2MS2 and RC1 (core STS version 4.5.4

STS v4.5 SP5 (upgrade to STS version 4.5.5 from 4.5.4)

 

Download the two files above and install STSv.4.5.4 first then STS v4.5.5 last.

 

You can find more STS add-ons at the STS Power Pack site. You will need the core STS files installed first unless you choose a STS bundle from the Power Pack site. The bundled versions of STS are the same version of STS, just with the add-on already integrated into it (meaning, it is not a different version of STS).

 

Hope this helped,

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

Can someone explain for me which file we need to download if we are trying to install this for the first time? I downloaded the very 1st one and that causes errors for my register_globals variable being turned off.

 

The latest versions do not look the same as the 1st release and I am not sure how to proceed.

 

Please let me know.

 

Thanks!

 

-- Chris

Link to comment
Share on other sites

Can someone explain for me which file we need to download if we are trying to install this for the first time? I downloaded the very 1st one and that causes errors for my register_globals variable being turned off.

 

The latest versions do not look the same as the 1st release and I am not sure how to proceed.

 

Please let me know.

 

Thanks!

 

-- Chris

Uhh...did you happen to see the post directly above yours? :blink:

 

Non-STS related: If you use the latest osCommerce release, RC1 Online Merchant, then you do not have to worry about Register Globals being on or off. If you are still having Register Global issues, then that means you need to upgrade to the latest version of osCommerce.

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

BTW,

 

I download STS package from http://addons.oscommerce.com/info/1524

 

To my knowledge, there are various of STS packages which contain many included other packages. Please do you search at http://addons.oscommerce.com/

 

Hope that's help

FiveAngels

 

I also have the same problem

 

Everything works fine, including HTC, until I activate use template for infoboxes; the template just gets destroyed after information box; I however don't find any box.php file in this contribution (very last version 4.5.6)

Is admin/includes/classes/box.php is the right file?

 

Can this have any relation with the fact that i use HTC (header tags controller), or is an independent problem?

 

Thanks

Link to comment
Share on other sites

I also have the same problem

 

Everything works fine, including HTC, until I activate use template for infoboxes; the template just gets destroyed after information box; I however don't find any box.php file in this contribution (very last version 4.5.6)

Is admin/includes/classes/box.php is the right file?

 

Can this have any relation with the fact that i use HTC (header tags controller), or is an independent problem?

 

Thanks

What problem would that be? The post that you referred to had a problem finding the latest version of STS.

 

I just looked at the lastest "full" version (not one of the upgrades) and the classes/boxes.php file is in there.

:thumbsup: In order to get STSv4.5.6, you first have to install the complete package STSv4.5.4. Then, to get all of the bug fixes since STSv4.5.4, you need to install the upgrades of STSv4.5.5 and STSv4.5.6. These upgrades are actually service packs to the full STS4.5.4 version.

 

I agree, it gets confusing when a full package is not uploaded for each service pack release. Maybe I will upload a complete full version that includes all of the latest bug fixes and service packs this weekend. :rolleyes:

 

See my link below on how to properly install HTC along side of STS.

 

Hope this helped,

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

Hello, :'(

When I create a template for my web site I have a problem because the template that I create for the english or the spanish part shows in the other language (it is in the menu Information) How can I separate that?

 

The menu is like this:

 

(Information English)

About us

Services

BOX_INFORMATION_NOSOTROS

Portfolio

Conditions

Privacy Notice

Contact Us

Login

 

(Information Spanish)

BOX_INFORMATION_ABOUT_US

BOX_INFORMATION_SERVICES

Nosotros

BOX_INFORMATION_PORTFOLIO

Condiciones de uso

Confidencialidad

BOX_INFORMATION_CONTACT

Login

 

Help me please!

 

Thank you

 

SXM

Link to comment
Share on other sites

Hello, :'(

When I create a template for my web site I have a problem because the template that I create for the english or the spanish part shows in the other language (it is in the menu Information) How can I separate that?

 

The menu is like this:

 

(Information English)

About us

Services

BOX_INFORMATION_NOSOTROS

Portfolio

Conditions

Privacy Notice

Contact Us

Login

 

(Information Spanish)

BOX_INFORMATION_ABOUT_US

BOX_INFORMATION_SERVICES

Nosotros

BOX_INFORMATION_PORTFOLIO

Condiciones de uso

Confidencialidad

BOX_INFORMATION_CONTACT

Login

 

Help me please!

 

Thank you

 

SXM

SXM,

 

The Simple Template System does not change the multilanguage capability of your osCommerce shop. However, just as in a non STS shop, you have to keep your different languages in mind when creating your images.

 

Regarding your specific situation, the following information may be of use to you:

 

This may help...

 

How to have a different image per language in STS:

 

Add the following code to your includes/modules/sts_inc/general.php file:

$sts->template['langid'] = $languages_id;

 

The above will create a STS tag called: $langid

 

Now you can create your images as so:

 

myimage1.jpg, myimage2.jpg, myimage3.jpg, etc, depending on how many languages you have in your shop, and save them in your images folder (or any osC folder such as images/banners).

 

:thumbsup: You can name the image anything you want but just keep them the same, just change the number according to the ID of the language that it represents. In other words, you do not have to name them "myimage". You could name them "languagemenu1.gif" or languagemenu2.gif" and so on.

 

:thumbsup: The number for the LangID will come from your specific osCommerce settings. To find the language ID for each of your shop's languages, go to your Admin, Localization, then select each language and view the ID in the URL.

 

Now add the following into your STS Template where you want the dynamic language image to appear:

<img border="0" src="images/myimage$langid.jpg">

 

The STS tag "$langid" will be replaced dynamically by the correct language id number that the user selects when viewing your shop.

 

For example:

english is ID=1 in my shop so the URL would be dynamically changed to "images/myimage1.jpg" if the user select the language "english" in my shop.

 

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

Hello guys!

 

I have a little problem,

 

I have STS installed, everything works as a charm, but when I use the advanced search / searchbox and get sent to the search_result page everything gets messed up.

 

The $sts-tags are shown aswell as the standard osc header info. The search results (product listing) and the template design is still working tho, but the tags don't.

 

Tried everything I could think of.

 

Can someone please help this dumb Swede? :-)

 

/Robert

Link to comment
Share on other sites

Hello.

 

I want to make a template only for the front page not all other pages. That is because I want a front page where no categories list is show ($categorybox) but it has to be shown everywhere else.

 

Problem is when I make a index.php.html it works for frontpage content and the list of product categories because index.php in oscommerce can show both the front page and the product categories list.

 

Do you have any ideas?

Link to comment
Share on other sites

With the index module enabled in admin, you can make a different template for each category. The main page is category 0, so if you create a template names index.php_0.php.html, it will be used for your main page, and only for it.

Link to comment
Share on other sites

I was running sts (a release from last month) without a hitch. Today I upgraded my store to the newest version of osC, installed the newest release of sts, and copied over my old template file. Now the whole layout of my store is a mess! The content is showing up to the right of the page instead of where it's supposed to be...some boxes show up some don't - what's different? What do I need to change?

Link to comment
Share on other sites

I was running sts (a release from last month) without a hitch. Today I upgraded my store to the newest version of osC, installed the newest release of sts, and copied over my old template file. Now the whole layout of my store is a mess! The content is showing up to the right of the page instead of where it's supposed to be...some boxes show up some don't - what's different? What do I need to change?

Brock,

A few things to consider:

  • How did you install STS? Did you use the RC1 files or the MS2 files?
  • Was it a manual install or did you just "copy" over the files from the contribution?
  • During the reinstall of STS, did you erase any custom code you may have added to your sts_user_code.php file? Did you erase any custom boxes from the boxes.php file?
  • During the reinstall of osCommerce, did you erase any custom CSS code to your stylesheet.css file?
  • Lastly, I can't vouch for the latest STS package but I feel confident enough with the member who bundled all of the bug fixes and updates that I'm sure that is not the problem, but you never know...

:thumbsup: Compare your old installation with your current setup by using a file comparison utility such as Beyond Compare or WinMerge. I know you kept a backup...didn't you? :blush:

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

 

A minor problem with secure pages + seo urls + STS. It loads the default template and not the SSL template so the images are broken and the page isnot secure.

 

I have the other SSL files working just fine (account.php, checkout etc..), it is the order id that sts is looking for.

 

Example problem url:

https://mysite.com/catalog/account_history_...php/order_id/25

 

if I upload a file called 25.html in the \catalog\includes\sts_templates\test\ directory then the page looks fine for this order id but not any other order id.

 

So it seems that the problem is STS looks for the template of the order id. So how do I tell STS to use one template for any order id?

 

Thank you.

Edited by nextprevious
Link to comment
Share on other sites

STS does not work correctly with Search Engine Friendly URL enabled, because URL looks like you have only folders (no .php nor .html file in URL), so the original php script is unknown to STS.

 

STS works fine with Ultimate SEO URL's from Chemo.

Link to comment
Share on other sites

With the index module enabled in admin, you can make a different template for each category. The main page is category 0, so if you create a template names index.php_0.php.html, it will be used for your main page, and only for it.

 

Thanks a bundle it works!

 

Just at little correction, the file should be called: index.php_0.html

Link to comment
Share on other sites

Hello guys!

 

I have a little problem,

 

I have STS installed, everything works as a charm, but when I use the advanced search / searchbox and get sent to the search_result page everything gets messed up.

 

The $sts-tags are shown aswell as the standard osc header info. The search results (product listing) and the template design is still working tho, but the tags don't.

 

Tried everything I could think of.

 

Can someone please help this dumb Swede? :-)

 

/Robert

 

 

Solved it! :)

 

Somehow this code was missing from the file.

 

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

 

Cheers!

 

/Rob

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