Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hello,

 

I am new to the boards and I am trying your STS plugin, which is a great add-on. But I am having trouble skining the sts. How can I make it so all the boxes can have different css styles?

 

Here is the skin I am working on, http://daemonprojects.com/shoppingcart/

 

has you can see the boxes all use the same css, "Product" How can I make it so they all runn off a different style? I need no style in the middle content box, but on the right top box I need to have a diffrent style and also on the left boxes.

 

is this possible?

 

Thanks,

DE

Yes, it is possible.

 

Some tips for Infobox template use:

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

 

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

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

thank you for the reply.

 

Now is there a list of file names for the content and boxes folders? That would be great, all I have are the following.

 

Boxes:

- catalog_advanced_search.php.html

- catalog_shopping_cart.php.html

- infobox.php.html

- infobox_information.php.html

- infobox_information_header.php.html

- infobox_product_listing.php.html

 

content:

- product_info.php_26.html

 

Any more file names would be great so I could customize it easier.

 

- DE

Link to comment
Share on other sites

thank you for the reply.

 

Now is there a list of file names for the content and boxes folders? That would be great, all I have are the following.

 

Boxes:

- catalog_advanced_search.php.html

- catalog_shopping_cart.php.html

- infobox.php.html

- infobox_information.php.html

- infobox_information_header.php.html

- infobox_product_listing.php.html

 

content:

- product_info.php_26.html

 

Any more file names would be great so I could customize it easier.

 

- DE

You can create infobox templates to be used for any PHP scripts in the following locations:

 

Includes/modules

 

Includes/boxes

 

Also any “boxes” listed in the root directory such as shopping_cart.php and advanced_search.php. These boxes require a different naming syntax. See the infobox templates that begin with “catalog” as an example. Also, see chapter 6 of the STS User Manual for more details on this.

 

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

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.

 

im just getting the $varible printed to screen not the actual content? i have followed your instructions and have installed twice - any ideas what i could be be doing / not doing?

 

many thanks in advance

 

+ I cant seem to find this info in the file you specify!?

 

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;

cjmuser

Edited by cjmuser
Link to comment
Share on other sites

im just getting the $varible printed to screen not the actual content? i have followed your instructions and have installed twice - any ideas what i could be be doing / not doing?

 

many thanks in advance

 

+ I cant seem to find this info in the file you specify!?

 

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;

cjmuser

The info that you posted above is not related to the newest version of STSv4.5.8 so it does not apply at all.

Please follow the installation instructions included in the STSv4.5.8 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 !

sorry if my english is no very good.

 

I have instaled a osCommerce Online Merchant v2.2 RC.

 

I want put my own themplate personal desing

 

I've downladed the STS4.5.8, but I don´t install, because I need resolve some questions.

In the link of Power Pack I can see a lot of liks to download contributions

 

firts, I must download the lasted link of Mega Power Pack ?? and after download the following contributions created about Power Pack?

 

or how I must atack the power pack?? because i cant understand how funcion has the Power Pack and his instalation

 

thanks.

Link to comment
Share on other sites

Hi !

sorry if my english is no very good.

 

I have instaled a osCommerce Online Merchant v2.2 RC.

 

I want put my own themplate personal desing

 

I've downladed the STS4.5.8, but I don´t install, because I need resolve some questions.

In the link of Power Pack I can see a lot of liks to download contributions

 

firts, I must download the lasted link of Mega Power Pack ?? and after download the following contributions created about Power Pack?

 

or how I must atack the power pack?? because i cant understand how funcion has the Power Pack and his instalation

 

thanks.

The STS Power Pack is NOT a contribution but rather a site that lists the STS addons that are available for STSv4x. You have to have STSv4.5.8 before you can use any of the STS addons listed in the STS Power Pack site.

 

The addons are totally optional and should only be used if you need that specific function.

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

Everything is working for me except the popup image. all it does is pop up a new window the size of a small image. If you expand it, its the default template with no content and all the place holders showing. So the question is, How do you get sts to simply pop up a large image?

Link to comment
Share on other sites

Everything is working for me except the popup image. all it does is pop up a new window the size of a small image. If you expand it, its the default template with no content and all the place holders showing. So the question is, How do you get sts to simply pop up a large image?
STS is working fine. It's your cart that is configured incorrectly.

 

When the pop-up image in your cart is coming up as a template page instead of the larger image ... It is most likely because of the Use Search-Engine Safe URLs being set to TRUE in your configuration. Try turning off "Use Search-Engine Safe URLs (still in development) which is on the MY STORE page of Configuring your catalog.

 

 

NOTE: You should never enable the Use Search-Engine Safe URLs setting since it has never been fully developed in the current osCommerce versions.

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

you can disragard this. i figured it out after staring at it forever. :blink:

 

That's OK. I admit that it isn't really obvious. A text link such as "Download Here" would be better than a very small not so obvious green arrow pointing downward.

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'm having trouble with the blueshop tutorial. I hit a snag programming

BOX_HEADING_SHOPPING_CART.

 

I have included the new code in sts_user_code.php and received the following error:

 

"Parse error: parse error, unexpected T_STRING in /.../oscommerce/catalog/includes/modules/sts_inc/sts_user_code.php on line 51"

 

My debugger list line 51 as:

 

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') . ' class="headerNavigation">' .

 

This looks like a syntax error, but I can't figure it out!

 

What does your experience say...

 

/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

Note to admin: Please enable Edit posts.

 

 

Let me restate the above problem.

 

The script will run if I comment out

 

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

/*

$sts->template['shoppingcartarea'] .= '<a href=' . tep_href_link(FILENAME_SHOPPING_CART) . '

class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a> · <a href=' .

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') . ' class="headerNavigation">' .

HEADER_TITLE_CHECKOUT . '</a>';

*/

}

 

The source is taken from page 24 of the eBook "Design an osCommerce Super Site using STS.

 

I am new to php so am learning it during this project - slow going. I'll solve this by taking the script apart piece by piece; I was hoping for some insight to expediate the process. The character string seems to be right - I may have misinterpreted something... But I probably have the spacing wrong...

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 apologize for posting so many times in a row...

 

 

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') is the culprit. On my editor two single quotes are spaced MUCH farther apart than they appear in the manual.

 

So... '' is two single quotes NOT one double quote. I should seen through this problem immediately... DUMB.

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 would like to install an ssl and dedicated ip on my server. I know that the STS didnt work with SEO URLS in the default admin. Will this be a problem. what links will I have to change, where do I change them in the admin. Is there a way to tell the system to use https: ? thanks

Link to comment
Share on other sites

I'm having trouble with the blueshop tutorial. I hit a snag programming

BOX_HEADING_SHOPPING_CART.

 

I have included the new code in sts_user_code.php and received the following error:

 

"Parse error: parse error, unexpected T_STRING in /.../oscommerce/catalog/includes/modules/sts_inc/sts_user_code.php on line 51"

 

My debugger list line 51 as:

 

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') . ' class="headerNavigation">' .

 

This looks like a syntax error, but I can't figure it out!

 

What does your experience say...

 

/r

 

 

http://www.oscbooks.com/support.php

Link to comment
Share on other sites

Note to admin: Please enable Edit posts.

 

 

Let me restate the above problem.

 

The script will run if I comment out

 

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

/*

$sts->template['shoppingcartarea'] .= '<a href=' . tep_href_link(FILENAME_SHOPPING_CART) . '

class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a> · <a href=' .

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') . ' class="headerNavigation">' .

HEADER_TITLE_CHECKOUT . '</a>';

*/

}

 

The source is taken from page 24 of the eBook "Design an osCommerce Super Site using STS.

 

I am new to php so am learning it during this project - slow going. I'll solve this by taking the script apart piece by piece; I was hoping for some insight to expediate the process. The character string seems to be right - I may have misinterpreted something... But I probably have the spacing wrong...

 

 

http://www.oscbooks.com/support.php

Link to comment
Share on other sites

I apologize for posting so many times in a row...

 

 

tep_href_link(FILENAME_CHECKOUT_SHIPPING, ", 'SSL') is the culprit. On my editor two single quotes are spaced MUCH farther apart than they appear in the manual.

 

So... '' is two single quotes NOT one double quote. I should seen through this problem immediately... DUMB.

 

 

http://www.oscbooks.com/support.php

Link to comment
Share on other sites

I would like to install an ssl and dedicated ip on my server. I know that the STS didnt work with SEO URLS in the default admin. Will this be a problem. what links will I have to change, where do I change them in the admin. Is there a way to tell the system to use https: ? thanks

David,

 

First off, STS works with SEO URLS.

 

Second, STS does not care if you are using an SSL certificate or not.

 

You will need to setup up osCommerce correctly to use a SSL certificate. The settings will need to be changed in two files: admin/includes/configure.php and includes/configure.php

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

After installing sts 4.5 i get LOADS of errors like - logger.php error

and stuff like that. I did manual installation and everythings in the right area, what went wrong???

 

Jacob,

 

Did you do a file comparison to be sure you have all of the code changes & additions in the correct locations?

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

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