Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hey thanks to the one that helped me with my flash banner by the way....

 

Just one more quick question....I have changed most of my colors in the stylesheet and STS, but I can not find where to change the background colors for the product descriptions. The place where you click on a catergory and it displays like this

 

 

image price decription add to cart

 

It still has the orginal color of the website, and I want to change that, does anyone know what file I need to look into???

I'm glad the Flash code helped you out.

 

Your other issue:

I'm not sure why it would do that unless you installed some contribution that edits the product description. Otherwise, in your stylesheet.css file, you may need to edit the following class:

 

/*This is a GENERAL ROW Style for every other line of noted pages, a palest gray color*/
TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
 background: #f8f8f9;
}

/*This is a GENERAL ROW Style for every other line of noted pages, the same palest gray color but allows you to alternate 2 colors if you wish*/
TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
 background: #f8f8f9;
}

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 Bill and Rigadin, thank you both very much for your help. I tried both codes you sent me but none worked, I still get the default template, so I was wondering if I have to use another version of STS to make it work (I am using V. 1.8)

Link to comment
Share on other sites

Hello Bill and Rigadin, thank you both very much for your help. I tried both codes you sent me but none worked, I still get the default template, so I was wondering if I have to use another version of STS to make it work (I am using V. 1.8)
Opps...my suggestion was for the latest version 4.5.2.

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

Bell, yep you were right, I missed one code in my stylesheet. I think I am done and just want to thank everyone who made this contribution, works very good. Just one last question with that flash banner, I made the banner a little small for the resolution of most computers, and I was wondering who do I center that on the page?? Do I need to change the banner code like before and have a center align or something. I will still play around with it, but I am sure it is a simple thing.

Link to comment
Share on other sites

Bell, yep you were right, I missed one code in my stylesheet. I think I am done and just want to thank everyone who made this contribution, works very good. Just one last question with that flash banner, I made the banner a little small for the resolution of most computers, and I was wondering who do I center that on the page?? Do I need to change the banner code like before and have a center align or something. I will still play around with it, but I am sure it is a simple thing.
Thomas, use standard HTML tags to get the justification that you are looking for. You should be able to do this entirely inside your HTML template and not have to modify any of the PHP scripts 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

Thomas, use standard HTML tags to get the justification that you are looking for. You should be able to do this entirely inside your HTML template and not have to modify any of the PHP scripts of osCommerce.

 

 

Hey Bill thanks for the help, got it a ok now, just one quick question if you can answer this, I have made a flash and html template and I used the tags this contribution uses and got it all working, just one problem for instance, I have the $content on one of my pages and it is not word wrapping correctly, same with products, privacy etc. If I move my borders just a little to the right to make room for the little it misses, it just moves over more but not slove the ( I would say .5 inches) of text and pictures I missing. Is there anyway to set width to the $content??

Edited by tomtom98
Link to comment
Share on other sites

STS V4.5.2 AND HEADER TAGS CONTROLLER V2.6.3

 

I've installed the above contributions separately (unfortunately, I didn't see the bundled STS4 Power Pack until too late). STS is working really well. But HTC only works if I switch STS off.

 

With STS off, title, description and keywords meta tags are all correctly included in index.php, category page, "all products" page and individual product pages. The admin side of HTC appears to be working fine and is allowing me to save meta tags.

 

But with STS switched on, I get the default OSCommerce title and no decription or keywords meta tags.

 

I've switched on STS debug mode and then can see my HTC tags displayed in the $sts->template['applicationtop2header'] section of the debug code as follows:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">
<head>
<!-- ipl edit re Header Tags Controller -->
<title>Welcome to Cumbrian food - Lake District food - fine food</title>
<meta name="Description" content="We produce Cumbrian food, Lake District food, fine food." />
<meta name="Keywords" content="Cumbrian food, Lake District food, fine food" />
<meta name="robots" content="noodp" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- EOF: Generated Meta Tags -->
<base href="http://localhost/catalog/">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->

 

But these meta tags are not being inserted into the pages.

 

I installed STS first and wasn't clear how to install HTC. I have followed all the HTC installation instructions.

 

3 specific queries:

 

1. is it possible to get this working even though I've followed the full HTC 2.6.3 installation isntructions rather than allowing STS to auto-detect HTC?

 

2. in sts_display_output.php, I followed the following HTC instructions - the lines that are meant to be replaced were not present so I just inserted the new lines:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
   require(DIR_WS_FUNCTIONS . 'header_tags.php');
CHANGE TO
   require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
   require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

 

3. in the admin screens for STS, do I need to insert any HTC filenames in the boxes "files for normal template", "files for index.php template", "files for content template"?

 

Thanks for any help.

Link to comment
Share on other sites

After many requests...

 

STSv4.5.2 and HTCv2.6.3 Bundle has just been released. :lol:

 

You can find this contribution in the STS4 Power Pack site (see my signature below). If you do not see it there, give the moderators some time to accept (should be less than 24 hours).

 

Enjoy,

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 decided to take a screenshot to show you what I mean, if you look at my catergories, everything fits ok, but when you look at my new products, privacy, etc on the right column, its cuts off a little bit to the right, does anyone know how to make this fit?? And also see the blue background on the new products and serach, how do I change the color of that, I change the stylesheet and when I goto actual products, it is white, but the other still has that background, any suggestions??

 

see.jpg

see1.jpg

Link to comment
Share on other sites

I'm still having problems - but at least they're different problems than before!

 

I started again with my site using "UK-based oscommerce" then installed "All Products" contribution then "STS v4.5.2 with HTC v2.6.3". Have not installed any other contribs. All products works fine if STS is switched off. But with STS switched on, the all products page is blank - and view source shows only this code:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

 

With STS on, all other pages look great and header tags are also working.

 

I'm wondering whether the all products page isn't getting application_top.php for some reason?

 

I'd be very grateful if anyone can point me in the right direction. Thanks.

Link to comment
Share on other sites

I'm still having problems - but at least they're different problems than before!

 

I started again with my site using "UK-based oscommerce" then installed "All Products" contribution then "STS v4.5.2 with HTC v2.6.3". Have not installed any other contribs. All products works fine if STS is switched off. But with STS switched on, the all products page is blank - and view source shows only this code:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

 

With STS on, all other pages look great and header tags are also working.

 

I'm wondering whether the all products page isn't getting application_top.php for some reason?

 

I'd be very grateful if anyone can point me in the right direction. Thanks.

Mark, you should not be having any issues using STS & All Products together. Be sure you have installed the All Products contribution correctly and have not missed any files. Since that contribution creates a new page called allprods.php by using conventional osc methods, STS should pick it up as it does other pages such as contact_us.php with no issues.

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

Just a quick question for those in the 'know'.

 

I have STS 4.5.2 already installed and working great. I want to add the Header Tag Controller Contribution. Should I just follow the manual instructions included in the standalone HTC 2.6.3 download but just ignore any changes to /catalog/includes?

 

Reason I ask is that the bundled contribution doesn't have manual instructions.

 

Thanks for any info anybody can provide.

 

Rich

Link to comment
Share on other sites

Just a quick question for those in the 'know'.

 

I have STS 4.5.2 already installed and working great. I want to add the Header Tag Controller Contribution. Should I just follow the manual instructions included in the standalone HTC 2.6.3 download but just ignore any changes to /catalog/includes?

 

Reason I ask is that the bundled contribution doesn't have manual instructions.

 

Thanks for any info anybody can provide.

 

Rich

Rich, it is very easy to do a manual install just be using a file comparison tool such as the free WinMerge or Beyond Compare. :thumbsup:

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. Can someone tell me how to specifically exclude a page from an sts template so that it shows by default.

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

That should do the trick for you.

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

Rich, it is very easy to do a manual install just be using a file comparison tool such as the free WinMerge or Beyond Compare. :thumbsup:

 

I'm not on a Windows platform so I can't really use those file comparison applications.

 

I'm looking for a manual install, with step-by-step replace/add codes, etc.

 

I already have STS installed and working good, along with a bunch of other contributions, everything is working fine...

 

However i'd like to have the Header Tags 2.6.3 contribution installed, so i'm thinking to do it manually I could follow the instructions for the HeaderTags 2.6.3 contrib and leave out modifications to the catalog/includes files? I would add the additional catalog/include files but not have to do any changes to any other catalog/includes/ files.

 

It seems like that should work, but i'm not sure.

 

I just want to add the HeaderTags contrib on top of a stable STS 4.5.2 installation.

Link to comment
Share on other sites

Admin side of HTC must be installed like usual, nothing to do with STS.

Do not make any modification in catalog files, but copy the new files from HTC (to language folders and one file to catalog/includes).

From the STS Power Pack (HTC for STS), you'll find a file headertags.php that must be copied to catalog/includes/modules/sts_inc.

In Admin > Modules > STS, for each module you are using, add headertags.php to the list of "files to include" (after sts_user_code.php).

That's it.

 

- Chris

Link to comment
Share on other sites

Admin side of HTC must be installed like usual, nothing to do with STS.

Do not make any modification in catalog files, but copy the new files from HTC (to language folders and one file to catalog/includes).

From the STS Power Pack (HTC for STS), you'll find a file headertags.php that must be copied to catalog/includes/modules/sts_inc.

In Admin > Modules > STS, for each module you are using, add headertags.php to the list of "files to include" (after sts_user_code.php).

That's it.

 

- Chris

Chris is correct in the above. Another solution would be to download the prior STS/HTC bundle in the Power Pack site just to crab the STS/HTC manual install instructions. The installation is very similar. I did not have the time to recreate the manual instructions for the newest bundle. Maybe if I have time I will do that. I'm not aware of any non-windows file comparison tools (I think Beyond Compare is linux based as well).

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 the help!

 

I managed to get most of the admin installed but ran up against a problem with a couple of contributions I installed previously, the Product Attributes Contribution and the Additional Images contribution.

 

Its in the admin/categories.php file, my file looks like this:

   if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) ) {
// BOF: Additional Images: Added: , p.products_image_med, p.products_image_pop, p.products_image_description
  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

Which I need to somehow replace with:

//HTC BOC

  if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

  $product = tep_db_fetch_array($product_query);							

  //HTC EOC

 

Any ideas? My main concern is the first line: if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) ) {

 

That is the part of the Product Attributes contribution that is changed from the original code.

 

But I could probably use help on the rest of the query as well! :'(

Edited by redbone
Link to comment
Share on other sites

I don't know if this will work or not, but what if I did this?

 

 if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) ) || (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

Does this look like it would work?

 

I'm not really up on PHP (yet)...

Link to comment
Share on other sites

 if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) ) || (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

 

Well, that didn't work. I got an 'unexpected T_BOOLEAN_OR' error.

 

How can I get

if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) ) {

and

if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {

 

combined into one statement so that it will work?

 

Everything else works fine with the contribution, but unfortunately with this error, I can't add any more products :-(

Link to comment
Share on other sites

Ok, finally got it to work thru some trial and error.

 

I used this:

 

	if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) || (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) )) {

 

Seems to have worked!

 

Whew.

Link to comment
Share on other sites

Ok, finally got it to work thru some trial and error.

 

I used this:

 

	if (isset($HTTP_GET_VARS['pID']) && ( empty($HTTP_POST_VARS) || $HTTP_GET_VARS['action_att']) || (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) )) {

 

Seems to have worked!

 

Whew.

Rich, this part of the installation should be asked over at the Header Tags Controller forum. Maybe someone over there has already crossed that same bridge and you could compare notes with them. :thumbsup:

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

Re: Blank "all products" page when using STS/HTC.

 

I resolved my problem of a blank all products page by editing catalog/includes/header_tags.php:

 

- changed

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

- to

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Does this sound OK?

 

Something similar was suggested in the installation docs for HTC - although I was using your STS/HTC bundle. In the HTC docs, it suggested a similar edit - but to a different file (sts_display_output.php).

 

Thanks.

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