Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Please forgive me, but without understanding the end result you want, I am having a hard time determining what to suggest.

 

If the code is in the header of the page - where is the result being displayed? Why is the total number of items in the cart needing to be pulled by every page?

 

I'm asking because the answers will help me to know where the best place for the code might be as I'm having a hard time visualizing the point behind pulling to total number of items in the cart, especially since it is already done on every page that you show the shopping cart infobox on :blush:

 

thanks for replying TracyS,

 

well that code used to belong in the header, so it'll appear on every page.

When I put that code in my new STS template.. i get this error message:

Fatal error: Call to a member function get_products() on a non-object in /home/themaste/public_html/includes/sts_templates/tmm/sts_template.html on line 26

 

line 26 is where that php code is.


~Tracy
 

Share this post


Link to post
Share on other sites

Normally the catalog/stylesheet.css is the stylesheet that controls the templates - unless you have changed it.

 

What do you have in your Admin setup for STS ?

 

 

The only thing I am struggling with is finding the CSS stylesheet that control the elements with in STS. I tried changing the stylesheet catalog/stylesheet.css but it doesn't reflect the changes.

 

Also when i change the index page it does not reflect on all the pages throughout - is this normal? If so how to I edit the other pages?

 

If I could just get everything to work this tool would be priceless :) Thanks to all who have contributed to it.


~Tracy
 

Share this post


Link to post
Share on other sites

Have you installed the headertags contribution? Have you viewed the source code of your page through the browser to see what exactly is showing up inside the <head></head> tags?

 

Bill:

 

Thanks for the reply. The problem remains, in spite of the following in includes/languages/english.php:

// page title

define('TITLE', 'ClearViewBuilding.com');

 

Also checked includes/classes/sts.php & it is there. And, verified the <head> contents are placed correctly. Still getting "Untitled Document' on all pages.


~Tracy
 

Share this post


Link to post
Share on other sites

No, on the headertags contrib, but yes on the source code..aha, we might be getting closer to an answer now..what do you make of this?

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

</body>

</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>ClearViewBuilding.com</title>

 

<base href="http://beta.clearviewbuilding.com/">

 

 

 

Have you installed the headertags contribution? Have you viewed the source code of your page through the browser to see what exactly is showing up inside the <head></head> tags?

Share this post


Link to post
Share on other sites
I am new to STS and would like to give it a try. I have STS V4.5.8 installed on a test computer running V2.2 RC2a. If STS does what I hope it does, this will be excellent for making a template. I do have one small problem though. I have Cart in Header 1.23 installed and would like to keep it however STS makes it disappear. Any help on this issue would be greatly appreciated. Thank you.

 

Scott,

 

Here is a simple solution for you:

 

Just to clarify...

 

This will create a new STS tag called $headcart that will allow you to place shopping cart details in your header (or anywehre else you want it).

 

Add the following in includes/modules/sts_inc/sts_user_code.php:

 

$sts->start_capture();
$productno = $cart->count_contents();
$totalprice = $currencies->format($cart->show_total());

if ($productno > 1) {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEMS;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
} elseif ($productno == 0) {
echo ENTRY_HCART_EMPTY;
} else {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEM;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
}
$sts->stop_capture ('headcart');

 

Now add the following in includes/languages/engish.php:

 

 

// STS Show Cart In Header
define('ENTRY_HCART_EMPTY', 'Your cart is empty');
define('ENTRY_HCART_CONTAINS', 'You have ');
define('ENTRY_HCART_ITEM', '<a href="shopping_cart.php" class="trailText">item in your cart</a>');
define('ENTRY_HCART_ITEMS', '<a href="shopping_cart.php" class="trailText">items in your cart</a>');
define('ENTRY_HCART_PRICE', '');

Thats it! Now use $headcart anywhere you want in your STS template files.

 

Enjoy,


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
The only thing I am struggling with is finding the CSS stylesheet that control the elements with in STS. I tried changing the stylesheet catalog/stylesheet.css but it doesn't reflect the changes.

 

Also when i change the index page it does not reflect on all the pages throughout - is this normal? If so how to I edit the other pages?

 

If I could just get everything to work this tool would be priceless :) Thanks to all who have contributed to it.

 

YOU have to tell STS what stylesheet to use just as you would a typical HTML page.

For example: Place the stylesheet.css file in your template folder and then link to it as so...

<link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">


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,

 

I'm currently having problems with the Catmenu.

The drop-down menu simply won't allow me to access the subcategories I have set up in the admin.

 

For instance, when I choose a subcategory 'dresses' in the category of 'clothes' with the dropdown menu, rather than accessing the sucategory through /index.php?cPath=1_21, it would bring up /index.php?cPath=21. That is to say, it would for some reason miss out the '1_'. This is the case with all subcategories. Is one of my files corrupted or something?

 

Please can anyone help? Thanks.

Edited by tharada

Share this post


Link to post
Share on other sites

TracyS:

 

I need them because on the header it will say "You have # items in your shopping cart."

Share this post


Link to post
Share on other sites
TracyS:

 

I need them because on the header it will say "You have # items in your shopping cart."

 

 

Did you see my solution above for adding the shopping cart in your header for 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
Scott,

 

Here is a simple solution for you

Thank you :)

 

Now I just need to learn how to make it not ugly...

Share this post


Link to post
Share on other sites
If you let us know what page you are wanting to change the pageHeading tag on - we will better be able to help you.

Thanks TracyS,

Actually after that post, I managed to find out which files and where I had to edit.

In fact, almost all the file is required to edit under osC distribution - catalog/*.php

Share this post


Link to post
Share on other sites
I am new to STS and would like to give it a try. I have STS V4.5.8 installed on a test computer running V2.2 RC2a. If STS does what I hope it does, this will be excellent for making a template. I do have one small problem though. I have Cart in Header 1.23 installed and would like to keep it however STS makes it disappear. Any help on this issue would be greatly appreciated. Thank you.

 

 

Also,

 

Don't forget about the use of the following STS tag:

 

$cartcontents

 

What is it?

Text link to the Shopping Cart page. It will use the text HEADER_TITLE_CART_CONTENTS defined in language files (includes/languages/english.php and other languages).

It will use SSL if available.

Note: Prior STS v4.5, this placeholder was not using SSL.

 

Created in: includes/modules/sts_inc/general.php

Possible use: text link in header.


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

Ugh. Well, I had this problem myself, and I couldn't tell ya what is causing it for certain. My solution was to remove the <!DOCTYPE through </head> from my index.php and product_info.php files. I don't know if that is the best solution or not. You can check your index.php and your template for index.php and see which one is calling the correct <title> tag and then remove whichever one is not calling it.

 

Maybe Bill can shed some light on what causes the duplicate head information and a better resolution?

 

No, on the headertags contrib, but yes on the source code..aha, we might be getting closer to an answer now..what do you make of this?

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

</body>

</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="en">

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>ClearViewBuilding.com</title>

 

<base href="http://beta.clearviewbuilding.com/">


~Tracy
 

Share this post


Link to post
Share on other sites

 

Jerry, check your DOCTYPE and make sure it is appropriate for your template page.

Try changing it to the following:

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


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

bkellum: thanks! I didn't see it cause it was for someonw else, turns out we wanted the same things :D

 

I have another problem, when you go into a category, here it doesn't show the products list. it's just blanks. not all of the categories is filled in yet, but i know for a fact that "Inspirational Art" category has items in there already.

 

What are the files that's involved in this case? Just for the record, I only installed, STS, Lightbox, UltraPics. I haven't really altered any of the other files. So I am a bit lost.

Share this post


Link to post
Share on other sites
bkellum: thanks! I didn't see it cause it was for someonw else, turns out we wanted the same things :D

 

I have another problem, when you go into a category, here it doesn't show the products list. it's just blanks. not all of the categories is filled in yet, but i know for a fact that "Inspirational Art" category has items in there already.

 

What are the files that's involved in this case? Just for the record, I only installed, STS, Lightbox, UltraPics. I haven't really altered any of the other files. So I am a bit lost.

You may have a category or product ID 25 template that does not have the $content tag so STS is not pulling in the product data.


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

bkellum: what does that mean exactly? do I need to insert the $content tag into another file somewhere? I might just do a fresh reinstall see how it goes? or maybe I can post the coding of the files that's involved in here?

Share this post


Link to post
Share on other sites
bkellum: what does that mean exactly? do I need to insert the $content tag into another file somewhere? I might just do a fresh reinstall see how it goes? or maybe I can post the coding of the files that's involved in here?

 

Michael,

Do you have the $content tag in your template? The $content tag is responsible for pulling in the data that is not showing up on your page.


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 do have the $content tag on my template. If you have a look at the other pages on that website, you will see that it's reading the data.. just not the categories.

Share this post


Link to post
Share on other sites
I do have the $content tag on my template. If you have a look at the other pages on that website, you will see that it's reading the data.. just not the categories.

 

Try turning STS off in the Default Module to see if the categories show up. If so, then the problem is not within your template.

 

Also, look in your index.php file to be sure you have not commented out the sections that need to be pulled in.

 

As a last resort (or a good start), compare your files with the files from the contribution using a good file comparison tool such as Beyond Compare or WinMerge.


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

Hey guys,

 

Just curious if someone knows of a contribution that already does this (or something real similar).

 

I need to create another section that would basically be another category with sub-categories. The problem is, we don't want it in the category menu. We want to break it out all by itself and graphically highlight it's existance. The category actually doesn't have any products in it - just suggestions on which products to use for certain situations.

 

Any thoughts on a contribution that would allow me to do this? The main reason I want to use categories and subcategories for this is so the site search feature will search through the information. So if you know of another way to accomplish this and have it searchable that would be great too!

 

TIA! :blush:


~Tracy
 

Share this post


Link to post
Share on other sites
Hey guys,

 

Just curious if someone knows of a contribution that already does this (or something real similar).

 

I need to create another section that would basically be another category with sub-categories. The problem is, we don't want it in the category menu. We want to break it out all by itself and graphically highlight it's existance. The category actually doesn't have any products in it - just suggestions on which products to use for certain situations.

 

Any thoughts on a contribution that would allow me to do this? The main reason I want to use categories and subcategories for this is so the site search feature will search through the information. So if you know of another way to accomplish this and have it searchable that would be great too!

 

TIA! :blush:

 

Hi Tracy,

 

Have you given any thought to the More Category Boxes contribution?


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

 

Just curious if someone knows of a contribution that already does this (or something real similar).

 

I need to create another section that would basically be another category with sub-categories. The problem is, we don't want it in the category menu. We want to break it out all by itself and graphically highlight it's existance. The category actually doesn't have any products in it - just suggestions on which products to use for certain situations.

 

Any thoughts on a contribution that would allow me to do this? The main reason I want to use categories and subcategories for this is so the site search feature will search through the information. So if you know of another way to accomplish this and have it searchable that would be great too!

 

TIA! :blush:

 

Also, if you want to do it the "manual" way, you could follow this post (it's old but pretty simple - basically creating your categories as normal in the admin and then create a query to leave out the categories for the second box. You then have to create an infobox and then manually link to those left out categories):

http://forums.oscommerce.com/index.php?showtopic=149840


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

Hmmm- I will check that out too! Thanks again!

 

 

Also, if you want to do it the "manual" way, you could follow this post (it's old but pretty simple - basically creating your categories as normal in the admin and then create a query to leave out the categories for the second box. You then have to create an infobox and then manually link to those left out categories):

http://forums.oscommerce.com/index.php?showtopic=149840


~Tracy
 

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

×