Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hi,

 

I have installed STS several weeks ago, but it is partially working because of a trouble that I cannot fix myself... It seems not to use all the replacement files. What I mean by that is that it uses all the html files within the main folder but it skips the stylesheet and it is not looking for the images folder nor what is in it. I have really no clue what to do anymore, please help me!

 

Sincerely,

Dave

Light travels faster than sound. Thats why sometimes people look bright until they speak...

Link to comment
Share on other sites

geesh everytime i think i am done i run into another problem, i recently tried to install more_pics 6 but was not really what i wanted so i ended up going with ultra pics 2.7 (with the sts) installed and everything is working but was wondering what the place holders are for the content product template. there were no files included to explain this.

Link to comment
Share on other sites

David,

Not knowing or having access to your code, I would be willing to bet that you did not upload the files in the sts_inc folder, specifically includes/modules/sts_inc/sts_column_left.php file.

 

Bill,

 

thanks for that, I think it might be a lot more than that.

 

regards

David

Link to comment
Share on other sites

regards

David

im downloading a newer version of the contribution hoping it has the sts folder in it, the one i got did not earlier....will it include the placeholders for the extra pictures? or is that standard $largeimage $popup...ect

Edited by joshcamerote
Link to comment
Share on other sites

Bill,

 

thanks for that, I think it might be a lot more than that.

 

regards

David

 

David, for a quick reliable solution, do a file comparison of your store files and the files from the STS contribution. This will quickly show any files/folders missing from your installation.

 

The only other issue would be that your template page itself is missing the default code needed to pull in the content from the tags. I highly doublt this as some tags are showing and others are not. The only thing to come to mind here would be that some of your tags may have an end character while others do not which would cause this same type of behavior.

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

geesh everytime i think i am done i run into another problem, i recently tried to install more_pics 6 but was not really what i wanted so i ended up going with ultra pics 2.7 (with the sts) installed and everything is working but was wondering what the place holders are for the content product template. there were no files included to explain this.

 

Joshua,

As for any non-native function to osCommerce, you will need to tell STS what to do. STS comes "out of the box" with all of the functions and features of a stock osCommerce. If you install a new contribution, and you want full design controll of that contribution, you will have to create some STS tags to bring in that functionallity.

 

FYI: If the contribution is coded properly, then STS will automatically bring in the added functions with the $content tag. STS will do this perfectly without any added input from you. However, if you want to use the content template feature of STS to "control" the placement of these new functions as stated above, then you will have to either modify the PHP code of the newly installed contribution (UltraPics) or create STS tags to be used in a content template to pull in the functions.

 

You can find some STS add-ons located in the STSv4 Power Pack site (a site of available STS add-ons) that may already have the added tags needed for other contributions such as UltraPics.

 

The following will give you the tags needed for your popup image template to work with UltraPics:

 

/includes/modules/sts_inc/popup_image.php.

 

<?php
// Ultrapics mods
 $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
 $sts->template['productname'] = $products['products_name'];
 $sts->template['productmodel'] =  $products['products_model'];

	   if ($_GET['image'] ==0) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_lrg'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==1) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==2) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==3) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==4) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==5) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==6) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'],'','','', 'name="prodimage"');
 } elseif ($_GET['image'] ==7) {
 $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image'],'','','', 'name="prodimage"');
 } ?>

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 have installed STS several weeks ago, but it is partially working because of a trouble that I cannot fix myself... It seems not to use all the replacement files. What I mean by that is that it uses all the html files within the main folder but it skips the stylesheet and it is not looking for the images folder nor what is in it. I have really no clue what to do anymore, please help me!

 

Sincerely,

Dave

 

Dave, how are you referencing the stylesheet and images? As far as images, are the images displaying in your browser and not in your editor?

 

Link to your stylesheet as so: $templatedir/stylesheet.css (or whatever your stylesheet name is). This will link to the stylesheet located in your template folder.

 

As for your images, you should be using relative links, not absolute links. Absolute links are good to use during the designing stages of your shop so that you can see them in your WYSIWYG editor but should be converted to relative links before going live.

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

I am a newby I love your product and it works fine but for the life of me I can not figure out how to change my navigation bar! I want it to look something like this:

http://templatesellers.info/oscomercetempl...0823193e3abf294

Help would be greatly appreciated!

Thanks

If you are referring to the horizontal tabs going across the top then you would either need to install a contribution to do this for you or edit the PHP yourself to get the same effect.

 

I like to use a contribution that will take the default category.php file and convert the links to a non-ordered list so that I can use CSS to style it anyway I like.

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

 

Using the above contribution, I can then use the Infobox Template feature in STS to further customize the layout of the category listing.

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

hey bill.

 

still no luck , im going to start from the ground up with a fresh install.

 

what additional image (that has a popup or works with lightbox) would work best with sts, more specfically for a product content template page (in teh content folder). Or if you could explain how i might go about creating a place holder for the content page. More Pics 6 has one that worked but the image would not pop up, maybe if i were to reinstall fresh it would work.

thanks for any recommendations or guidance.

Link to comment
Share on other sites

Dave, how are you referencing the stylesheet and images? As far as images, are the images displaying in your browser and not in your editor?

 

Link to your stylesheet as so: $templatedir/stylesheet.css (or whatever your stylesheet name is). This will link to the stylesheet located in your template folder.

 

As for your images, you should be using relative links, not absolute links. Absolute links are good to use during the designing stages of your shop so that you can see them in your WYSIWYG editor but should be converted to relative links before going live.

 

You're the man!

 

Thank you so much!!!

 

Sincerely,

Dave

Light travels faster than sound. Thats why sometimes people look bright until they speak...

Link to comment
Share on other sites

I have a big problem!

I installed the featured products contribution with the sts contribution... My products from categories doesn't appear :( it's appears only the featured products on top and that's all. :(

I made a page in sts templates called: index.php.html... i think this is the problem because when i entry in a category products the url for category is like http://localhost/catalog/index.php?cPath=x...osCsid=xxxxxx... what i have to do to make the index appear with only featured products on page and the categories page with them products?

Many thanks in advance!

Link to comment
Share on other sites

I have a big problem!

I installed the featured products contribution with the sts contribution... My products from categories doesn't appear :( it's appears only the featured products on top and that's all. :(

I made a page in sts templates called: index.php.html... i think this is the problem because when i entry in a category products the url for category is like http://localhost/catalog/index.php?cPath=x...osCsid=xxxxxx... what i have to do to make the index appear with only featured products on page and the categories page with them products?

Many thanks in advance!

 

STS will automatically add the Featured Products that you added in your store's admin under Catalog | Featured Products (as long as you installed the Featured Products contribution correctly). If you did not add any products for a particular category, then of course, no products will be displayed for that category.

 

NOTE: STS has a home page template feature. Create a template called index.php_0.html and this will be your home page. All other category pages that do not have a specific template will use the index.php.html template 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

I have a couple of box corner artifacts (header images: corner_left/right) in my $content pane between the new products. All the other parts are gone so they are just hangin' out lookin' bad.

 

I turned off the box corner graphics in all the box php files that had them turned on:

 

new infoBoxHeading($info_box_contents, false, false);

 

I searched throughout the code using find and the osC cross reference trying to find where this is put together. I just don't have the $content parser/buffer figured out yet so I'm a bit fogged in at the moment.

 

Any ideas guys...

 

/r

If I say it's safe to surf this beach Captain ......

Then it's safe to surf this beach!

Link to comment
Share on other sites

I have a couple of box corner artifacts (header images: corner_left/right) in my $content pane between the new products. All the other parts are gone so they are just hangin' out lookin' bad.

 

I turned off the box corner graphics in all the box php files that had them turned on:

 

new infoBoxHeading($info_box_contents, false, false);

 

I searched throughout the code using find and the osC cross reference trying to find where this is put together. I just don't have the $content parser/buffer figured out yet so I'm a bit fogged in at the moment.

 

Any ideas guys...

 

/r

Rob,

 

The quickest way to do this is simply upload transparent gifs to replace the corner images. There is even a contribution to help you out with this:

 

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

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

I am trying to install osCommerce with 3 main contributions: STS, a Lightbox image popup, and a contribution for additional images. I can get the STS contribution installed fine however something always goes wrong when I try to install the other two. I have the latest release, RC2a. Can someone point me in the right direction for which contributions are the best for the lightbox popup and one for addditional images, both which need to work with STS. Most of the ones I have found are for MS2

Link to comment
Share on other sites

How do I know if I have osCommerce 2.2MS2 or osCommerce Online Merchant 2.2RC1? What are the differences? I just installed the latest version of osCommerce (oscommerce-2.2rc2a). I would like to install the STS addon, but I'm uncertain which folders I am suppose to copy the files from. Please help! :(

 

:blink:

 

 

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.

Link to comment
Share on other sites

How do I know if I have osCommerce 2.2MS2 or osCommerce Online Merchant 2.2RC1? What are the differences? I just installed the latest version of osCommerce (oscommerce-2.2rc2a). I would like to install the STS addon, but I'm uncertain which folders I am suppose to copy the files from. Please help! :(

 

:blink:

:blink: Why did you post the contents of the outdated readme text above???? :blink:

The latest version of STS is STSv4.5.8. It is TOTALLY different from the STS version you posted above.

 

You stated that you just installed osCommerce-2.2rc2a. There is your answer. You have Online Merchant Release Candidate 2a so you should upload the files for RC2 as well as the STS files.

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

I am trying to install osCommerce with 3 main contributions: STS, a Lightbox image popup, and a contribution for additional images. I can get the STS contribution installed fine however something always goes wrong when I try to install the other two. I have the latest release, RC2a. Can someone point me in the right direction for which contributions are the best for the lightbox popup and one for addditional images, both which need to work with STS. Most of the ones I have found are for MS2

 

Andrew,

Try the UltraPics + Lightbox + STS contribution. This bundle does not make any edits to any STS files.

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

Andrew,

Try the UltraPics + Lightbox + STS contribution. This bundle does not make any edits to any STS files.

 

Would that be this contribution: http://addons.oscommerce.com/info/1642

 

I am assuming I would need to get one of the older files, like "Ultra Pics 2.07.01 (2.04.1 + LightBox + CCGV + STS)" am I correct? I think I did try this one before, with the file added on May 22, 2008, but I stopped because of the extreme differences in the files, the ones included were more than 4 years old. This also says it is for the MS2 version of osCommerce, I have RC2a

Link to comment
Share on other sites

i actually figured alot of stuff out on my own, andrew i tried using hte same setup that bill refered to you and i did not have any luck with it. I figured out how to use the more pics 6 v2 with lightbox and sts and looks good.

 

 

Question for bill or any other sts expert.

 

I installed Product extra fields, more pics 6 and a simple newsletter code. Everything works great but the STS product content page will not load, the product layout stays on default, also popup windows do not work goes directly to the file.

Do you know what file is should look into to try to fix this (what file request this information?)

 

thanks

Link to comment
Share on other sites

i actually figured alot of stuff out on my own, andrew i tried using hte same setup that bill refered to you and i did not have any luck with it. I figured out how to use the more pics 6 v2 with lightbox and sts and looks good.

 

 

Question for bill or any other sts expert.

 

I installed Product extra fields, more pics 6 and a simple newsletter code. Everything works great but the STS product content page will not load, the product layout stays on default, also popup windows do not work goes directly to the file.

Do you know what file is should look into to try to fix this (what file request this information?)

 

thanks

 

See the response I posted earlier:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1271845

 

Also, keep in mind that the lightbox contribution heavily modifies the javascript for the popup-image link so your problem most likely would be there.

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

See the response I posted earlier:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1271845

 

Also, keep in mind that the lightbox contribution heavily modifies the javascript for the popup-image link so your problem most likely would be there.

 

 

I did a fresh reinstall of osCommerce so i'll try this again, I was afraid last time because I had installed some other additional image contributions before I tried UltraPics, so I will try the UltraPics + Lightbox addon right after I install STS.

Link to comment
Share on other sites

After I did a fresh install, I installed the latest version of STS by just copying all the files over replacing any that it needed then I copied all the files from the latest "UltraPics 2.08 with Lightbox 2.04"

 

Then I imported the SQL file that was needed for the contribution. I created a test product with the regular image and then an extra one and this is the error that I get on all of the product pages:

 

Warning: main(includes/modules/additional_images.php) [function.main]: failed to open stream: No such file or directory in /homepages/8/**********/htdocs/techsurplus.net/product_info.php on line 169

Warning: main() [function.include]: Failed opening 'includes/modules/additional_images.php' for inclusion (include_path='.:/usr/lib/php') in /homepages/8/**********/htdocs/techsurplus.net/product_info.php on line 169

 

Lightbox seems to be working fine for the regular image but none of the additional images are showing up. Should I have used the file named "Ultra Pics 2.07.01 (2.04.1 + LightBox + CCGV + STS)" instead?

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