Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Any help with this would be great.
Guldstrand,

 

You are missing some key points on what is required in each template page itself. :blush:

 

You need specific header code in every template page at the beginning so that standard osCommerce stuff gets "pulled" into your template. Stuff like JavaScript, Page Title, Metatags, CSS and so on. Without the proper code, your template will just be an ordinary HTML page not knowing what to do with osComnerce files. :'(

 

 

 

Here is the code that is required in each template page (this is also mentioned in the documentation as well as a blank template provided with this code:

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<p>This is a blank template. Replace this text with your content. Enjoy! 
Template by: Bill Kellum</p>
</body>
</html>

 

The DOCTYPE can be altered to meet your needs for validation. The "body" section will include your information, not the "This is a blank template..." :blink:

 

The styleshhet reference is what pulls your CSS file for each particular template page, so you can actually have an independent CSS file for a specific template page. :thumbsup:


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

 

Yes i know how to add new boxes, but my question was i want to change all my existing infoboxes

to boxes with a dropshadow around them, how can i achieve that with STS 4.3?

 

Thank you for your help,

Eric :D

You could either do it with CSS or edit the table within the infobox.php.html (or anyother specific infobox template) with shadow images where you want them to be.

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 upgraded this morning to 4.3 from 4.2. However, I am experiencing a few problems.

 

When i click on a category no content is displayed for that category. This is true in the default template that was provided in the contrib. and with my own templates. $content does not seem to be working properly. (this problem persisted from the 4.2).

 

when I go to /admin/modules/default in my admin section I do not have "use templates for infoboxes" available.

 

Any help would be greatly appreciated.

You are missing some of the installation files. Try re-installing all of the STSv4.3 files and follow the installation directions carefully.

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

Opps! :blush: :blush: :blush:

 

In the STSv4.3 with Header Tags v2.5.9, I forgot to include the template folder for "boxes" in the "new_files_only\catalog\includes\sts_templates\full" directory.

 

The boxes folder is in the correct place in the "all_files" directory so you can easily copy it from there. :thumbsup:

 

The proper folder structure is "catalog/includes/sts_templates/full/boxes". You will need this in order to use the infoboxes template feature in STSv4.3.

 

 

 

Hope this didn't screw anybody up. :-

 

BK


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 is the code that is required in each template page (this is also mentioned in the documentation as well as a blank template provided with this code:

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<p>This is a blank template. Replace this text with your content. Enjoy! 
Template by: Bill Kellum</p>
</body>
</html>

I allready have that code in my new template-files, but the css-file doesn?t "work" anyway. I can only see the html output (and the data to view the products) but without the css-classes. :(


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites
I allready have that code in my new template-files, but the css-file doesn?t "work" anyway. I can only see the html output (and the data to view the products) but without the css-classes. :(
If everything is working except for CSS, Try changing your DOCTYPE to the following:

 

 

 

 

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


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
If everything is working except for CSS, Try changing your DOCTYPE to the following:

 

 

 

 

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

That didn?t help either. :(


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites

I have the following at the top in the new template.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html $htmlparams>
<head>
<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="css/1.css">
</head>

 

But as i?ve wrote before, the css-file does not "show".


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites
I am also experiencing that problem. Checked and rechecked everything. Only thing installed besides this is SEO URLS contribution.

 

Cheers,

 

Santo

 

Something tells me that we might have to make a new thread in order to get a reply or two?


//Maz

Share this post


Link to post
Share on other sites
Tracy, keep in mind that since version 4, STS allows you to insert PHP code directly in the template page with no issues. So...you should be able to use standard PHP links with SID in your template page linked directly to your specific product.

 

Wow! I did not know that we could add PHP into our templates! AWESOME!!! :thumbsup:

 

Now - I have a new problem with the whole linking from within content thing :(

 

Here are two links for example:

 

<a href="<?php echo tep_href_link('product_info.php?cPath=1_17_25&products_id=32', '', 'NONSSL'); ?>">

 

and

 

<a href="<?php echo tep_href_link('product_info.php?products_id=44', '', 'NONSSL'); ?>">

 

Either option gives me the same problem. When I click on the resulting link - the information for the correct product shows - but the table with the available slaves does not.

 

To see the problem - go to http://www.mmherbs.dreamhosters.com

 

First - click on Women's Health > Pregnancy > Morning Sickness and then on Morning Sickness Balm

Notice the description at the top, and then the table of available products to purchase underneath.

 

Now - click on Women's Health and then just click the link in the text content to Morning Sickness Balm

Notice the description is still there, but the table of available products seems to disappear??

 

Any ideas?


~Tracy
 

Share this post


Link to post
Share on other sites
I am also experiencing that problem. Checked and rechecked everything. Only thing installed besides this is SEO URLS contribution.

 

Cheers,

 

Santo

OK, guys...I'll give a stab at this.

 

Check that you do not have Gzip on in the Admin settings. If you absolutely need it, then lower the Gzip setting.

 

Also, SEO URLS is very finicky when used with other contributions. Here is a post from Nov 2005 that may be of some interest to you:

 

To all those who are experiencing blank pages when enabling Ultimate SEO URLs:

 

I recently had an experiencing that you might appreciate. Working on 2 of my sites, I found that site1 had Ultimate SEO URLs working perfectly. I tgz'ed up the files, and copied them to site2, expanded the files and change the configure.php files appropriately.

 

With Ultimate SEO URLs enabled on site2, I got blank pages. Identical code to site1.

 

Here are a few differences (from admin/server_info.php):

site1:

- MySQL 4.0.25-standard

- HTTP Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP-CGI/0.1b

- PHP Version: 4.4.0 (Zend: 1.3.0)

 

site2:

- MySQL 4.1.12

- HTTP Server: Apache/1.3.33 (Unix) PHP/4.3.11

- PHP Version: 4.3.11 (Zend: 1.3.0)

 

Both sites are Linux.

 

I also have it working successfully on site3, with the following:

- MySQL 4.0.21-log

- HTTP Server: Apache/1.3.29

- PHP Version: 4.3.10 (Zend: 1.3.0)

 

The only way I was had any success getting it to work on site1 was by disabling Admin >> Configuration >> SEO URLs >> Enable SEO cache to save queries? . In the same section, I turned off product cache, categories cache, etc, just to be safe.

 

The contrib author is the one that suggested that I do that, so I don't take credit for this solution. I hope it helps a few others.

 

Edit: In case anyone is wondering if the problem, in my case, could have been that I had persistent connections enabled in configure.php, or that I had copied the cached files from one server to another (which could cause problems), that was not the case. I did clear the SEO URLs cache, but in my case I needed to disable cache entirely. HTH.

 

-jared


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
OK, guys...I'll give a stab at this.

 

Check that you do not have Gzip on in the Admin settings. If you absolutely need it, then lower the Gzip setting.

 

Also, SEO URLS is very finicky when used with other contributions. Here is a post from Nov 2005 that may be of some interest to you:

 

 

I simply disabled the GZip compression and it showed my template. Thanks! :)


//Maz

Share this post


Link to post
Share on other sites

Is it possible to use a oscommerce template from templatemonster.com with this contribution?

If so, what do i have to do?

 

And what about this?

I have the following at the top in the new template.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html $htmlparams>
<head>
<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="css/1.css">
</head>

 

But as i?ve wrote before, the css-file does not "show".


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites

Hey.. just noticed that the STS v4.3 with Header Tags Controller v2.5.9 dated Nov 6 has a different sts.php file. It's causing me problems on a fresh install. It looks like the sts.php in \includes\classes\sts.php in this release shows $Id: sts.php,v 4.1 2006/03/06 22:30:54 Rigadin Exp $ and the STS v4.3 dated Nov 2 shows $Id: sts.php,v 4.3 2006/23/09 22:30:54 Rigadin Exp $. I'm having problems getting the infobox options to work. No selection in admin.

Share this post


Link to post
Share on other sites

I just installed the initial v4.3 release dated Nov 2 and then did a manual upgrade for the HTC stuff. Everything is working beautifully!!!

Share this post


Link to post
Share on other sites

Is there a simple way to make a content file for the frontpage (index.php), instead of the system using the default index.php file in oscommerce can be a pain as it detects php between the columns. I tried to create content/index.php.html which failed.


//Maz

Share this post


Link to post
Share on other sites
Hey.. just noticed that the STS v4.3 with Header Tags Controller v2.5.9 dated Nov 6 has a different sts.php file. It's causing me problems on a fresh install. It looks like the sts.php in \includes\classes\sts.php in this release shows $Id: sts.php,v 4.1 2006/03/06 22:30:54 Rigadin Exp $ and the STS v4.3 dated Nov 2 shows $Id: sts.php,v 4.3 2006/23/09 22:30:54 Rigadin Exp $. I'm having problems getting the infobox options to work. No selection in admin.
Sorry, you screwed up on your install. The STSv4.3 with HTCv2.5.9 does indeed have the correct catalog/includes/classes/sts.php file. You must have uploaded the wrong sts.php file in the wrong directory. Follow the instructions carefully.

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 it possible to use a oscommerce template from templatemonster.com with this contribution?

If so, what do i have to do?

 

And what about this?

Where is your stylesheet located? If it is in your catalog directory, the following link should work:

 

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

 

or you could use the real path:

 

<link rel="stylesheet" type="text/css" href="http://www.yourdomain.com/catalog/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

Still having problems.. Okay took a base install of osCommerce and installed STS v4.3 with HTC. All seems to be working So I installed the Faqdesk module. All options turned on in admin and everything is showing with the FAQdesk. So I turn on STS and the faqdesk infobox goes away. So I go to the \includes\modules\sts_inc and edit the sts_user_code.php with

 

$sts->start_capture();

// require(DIR_WS_BOXES . 'new_thing_box.php');

include(FILENAME_FAQDESK_STICKY);

$sts->stop_capture('sticky', 'box'); // 'box' makes the system remove some html code before and after the box. Otherwise big mess!

 

$sts->start_capture();

// require(DIR_WS_BOXES . 'new_thing_box.php');

include(FILENAME_FAQDESK);

$sts->stop_capture('sticky1', 'box'); // 'box' makes the system remove some html code before and after the box. Otherwise big mess!

 

$sts->start_capture();

require(DIR_WS_BOXES . 'faqdesk.php');

$sts->stop_capture('sticky2', 'box'); // 'box' makes the system remove some html code before and after the box. Otherwise big mess!

 

take each new variable and place it in the \includes\sts_templates\test\sts_template.html file. But the infobox doesn't reappear. Can anyone help with this?

Share this post


Link to post
Share on other sites
take each new variable and place it in the \includes\sts_templates\test\sts_template.html file. But the infobox doesn't reappear. Can anyone help with this?
This is a "general" statement. You will need to place the tag in the template that you want the new boxes to appear in. Don't forget about the end character in your tags. If you are using "$content#" instead of "$content", then you will need to add the "#" end character after you new box tag.

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
Where is your stylesheet located? If it is in your catalog directory, the following link should work:

 

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

 

or you could use the real path:

 

<link rel="stylesheet" type="text/css" href="http://www.yourdomain.com/catalog/stylesheet.css">

The stylesheet-file is located in a new template folder (under /sts_templates) called "test".


I am who I am, unfortunately.

Share this post


Link to post
Share on other sites

Hey.. thanks bkellum for all your help. I added

 

<?php DEFINE ('STS_END_CHAR', '$'); ?>

 

to the sts_template.html which caused all my variable strings to display on the index page. So I went back into the file and added $ to the end of the strings. Which caused all my variable strings to change to the corresponding infoboxes, index, etc. However the new strings sticky, sticky1, and sticky2 strings just disappear and no infobox is displayed?

Share this post


Link to post
Share on other sites

I've got a real bare-bones question. As mentioned in another question, I've got osCommerce+STS+register_globals installed and 'seemingly' (not live yet) working fine. The site is for a T-Shirt company, they are only selling 7-8 kinds of shirts, but with a few attributes. The problem is, I've got a pre-designed website (which I'm not really at liberty to alter that much design-wise) that doesn't seem to fit the paradigm that osC seems to work inside of.

 

When setting up the osC catalog, in order to get around the inability to track multiple attributes as separate items, I set up a category for each type of shirt; i.e. Long-Sleeve Tee, Short-Sleeve Tee, Hoodie, etc. The products under those categories are Large-Red, Large Blue, Med-Red, Med-Blue, etc.

 

The way the site is navigated is you click on say Short Sleeve Shirt from the menu bar on the left (an analog to the category box, but I'm slightly afraid to mess with that and may opt for using the $urlcat_ variables instead), and you get a nice big pic, the item name, price, description, etc. (all things which can be easily addressed with $variables using STS), but there aren't multiple products on the page. There's just one description for all of them, and you can click on a javascript navigator to change the picture to show what the shirt looks like in each color.

 

To actually SELECT THE SHIRT you want to buy, you select the color from the dropdown, and select the size from a dropdown, fill in the qty in a text field and click 'add to cart'.

 

Here's where I start having palpatations. osC 'seems' to be designed to grab the category and product id from a GET string which is determined using some PHP variables which I'm having a hard time tracking down.

 

Is there a way for a non-PHP coder to have the 'add to cart' button grab the value from the color and size fields, and match up the appropriate product from the catalog? I'm a little unclear about how items are added to the cart, and the extent to which we can steer away from the default method of laying out templates.

 

What would seem to be the easiest if it worked would be to have only one category and 7-8 products with both color and size attributes, but from what I've read in the forums, there's no good way to track stock for attribute combinations (i.e., Long-Sleeve Tee, Blue, Sm: qty:2 | Short Sleeve Hoodie, Grey, Lg: qty 27, etc.)

 

Am I going about this all wrong, and/or have overlooked something tremendously obvious?

 

Sorry for the panicked noob question, but I'm a panicked noob with a deadline fast approaching! :( Any help would be appreciated, and please let me know if I'm not making sense in the asking of my question.

 

Sincerely,

Sam

Share this post


Link to post
Share on other sites

I have a clean os commerce download that I installed 4.3 with header tags over. I am getting the following error when I go to my domain name:

 

1054 - Unknown column 'categories_htc_title_tag' in 'field list'

 

select categories_name as name, categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from categories_description where categories_id = '0' and language_id = '1'

 

[TEP STOP]

 

I have not been able to locate the problem. Great contrib.

Thanks

Edited by jcman27

Share this post


Link to post
Share on other sites
I have a clean os commerce download that I installed 4.3 with header tags over. I am getting the following error when I go to my domain name:

 

1054 - Unknown column 'categories_htc_title_tag' in 'field list'

 

select categories_name as name, categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from categories_description where categories_id = '0' and language_id = '1'

 

[TEP STOP]

 

I have not been able to locate the problem. Great contrib.

Thanks

 

After removing the file name "headertags.php" from the default, index and products modules my index.php page starting working again, however I now get the same error in my admin/catalog/categories/products page so I am not able to add or edit categories or products.

 

Thanks

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

×