Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Thanks for all the help guys; I've now got my product templates working!!

 

Only thing is, they display "  " at the top in standard font. Anyone know what this is/how to get rid of it?

 

Thanks!

 

Andy.

:thumbsup: Andy, a few pages back in this thread:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1105341

or

http://www.oscommerce.com/forums/index.php?s=&...t&p=1108881

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 not sure if this is an STS issue but I have looked into every other possibility I can think of. I want to change the symbol that appears in the breadcrumbs navigation between Top, Catalog, etc. and replace it with a small image. I found the line of code in header.php and replaced the symbol » with the code for my image. However, the original symbol is still appearing. It isn't cached in my browser. I'm wondering if STS doesn't capture this part of header.php?

 

Thanks.

Link to comment
Share on other sites

Hi.

 

I'm trying to custom product_info page (content) but all i see is a blank page :'(

 

I've installed several contributions (More Pics 6, thumbnail on the fly, totalb2b, ...) so i think the problem might be here. I've already read somewhere in this forum that I need to change /catalog/includes/modules/sts_inc/product_info.php according to the contributions I've installed and that's what i'm trying to do.

 

But I can't see effects of my changes. Only the blank page. I've tried to use debug mode but nothing appears either. Don't know what else to do. Any idea, pls?

 

Billsoft.

Link to comment
Share on other sites

I think I've finally found the problem:

 

It seems the product_info module was badly configured:

i changed

Files for content template

sts_user_code.php;product_info.php;headertags.php

to

sts_user_code.php;product_info.php and it seems to work now!

 

What a newbie i am! :thumbsup:

 

 

Hi.

 

I'm trying to custom product_info page (content) but all i see is a blank page :'(

 

I've installed several contributions (More Pics 6, thumbnail on the fly, totalb2b, ...) so i think the problem might be here. I've already read somewhere in this forum that I need to change /catalog/includes/modules/sts_inc/product_info.php according to the contributions I've installed and that's what i'm trying to do.

 

But I can't see effects of my changes. Only the blank page. I've tried to use debug mode but nothing appears either. Don't know what else to do. Any idea, pls?

 

Billsoft.

Edited by billsoft
Link to comment
Share on other sites

I think I've finally found the problem:

 

It seems the product_info module was badly configured:

i changed

Files for content template

sts_user_code.php;product_info.php;headertags.php

to

sts_user_code.php;product_info.php and it seems to work now!

 

What a newbie i am! :thumbsup:

Bill, I'm not sure what would be causing your blank page issues with your content templates but you will need the headertags.php file to be included in the files for content template. Be sure that you have installed the header tags controller correctly. If you do not use the Header Tags Controller contribution, then you would not need to include that file name.

 

:thumbsup: By the way, if you have the following setting in your store's admin set to true: "Use Search Engine Friendly URLS", then that could be causing your blank page issues.

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

I'm not sure if this is an STS issue but I have looked into every other possibility I can think of. I want to change the symbol that appears in the breadcrumbs navigation between Top, Catalog, etc. and replace it with a small image. I found the line of code in header.php and replaced the symbol » with the code for my image. However, the original symbol is still appearing. It isn't cached in my browser. I'm wondering if STS doesn't capture this part of header.php?

 

Thanks.

Debbie,

Try making the following modification to your breadcrumb code:

 

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ' . tep_image(DIR_WS_IMAGES . 'your_image.gif') . ' '); ?></td>

OR, if that does not work...

 

Find the following line in catalog/includes/modules/sts_inc/general.php:

 

$sts->template['breadcrumbs'] = $breadcrumb->trail(' » ');

 

Modify it something like so...

 

$sts->template['breadcrumbs'] = $breadcrumb->trail(' ' . tep_image(DIR_WS_IMAGES . 'your_image.gif') . ' ');

 

Hope that helped you out,

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...got it working.

 

Debbie,

Try making the following modification to your breadcrumb code:

 

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ' . tep_image(DIR_WS_IMAGES . 'your_image.gif') . ' '); ?></td>

OR, if that does not work...

 

Find the following line in catalog/includes/modules/sts_inc/general.php:

 

$sts->template['breadcrumbs'] = $breadcrumb->trail(' » ');

 

Modify it something like so...

 

$sts->template['breadcrumbs'] = $breadcrumb->trail(' ' . tep_image(DIR_WS_IMAGES . 'your_image.gif') . ' ');

 

Hope that helped you out,

Link to comment
Share on other sites

I have installed HTC with STS4 and it is working except my META tags are showing up at the top of the HTML page, before the HTML and HEAD opening tags. Any idea what might be going on here?

 

Thanks

Hello Debbie, do you have the following in your templates:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->

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

Yes, I had those tags at the top of my templates. I was looking at general.php and I see this:

 

$sts->template['headertags']= "<title>" . TITLE ."</title>";

 

Should

"<title>" . TITLE ."</title>";

have been replaced with some variables during installation?

 

Thanks

 

Hello Debbie, do you have the following in your templates:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->

Link to comment
Share on other sites

I just tried to incorporate some pretty mouseover buttons - http://www.oscommerce.com/community/contributions,2348 but it didnt work - mouseover not showing, and main product image in product_info.php not showing (javascript error - expecting a ")" )

 

Firstly - has anyone tried to do this? My search pointed to no results apart from this thread... but I dont want to (re) read all those thousands of messages).

 

If you are feeling charitable and you are good with php, maybe glance over this code - its very simple:

Theres two functions tep_image_button and tep_image_submit in "includes/functions/html_output.php"

The 1/2 dozen lines after "// add mouseover-effect" are all thats needed to be added according to the contribution. Then just drop in some renamed mouseover button images.

 

// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

	// START STS v4.4:
  global $sts;
	  $src = $sts->image_button($image,$language);
	  if ($src!='')
		$image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
		else 
  // END STS v4.4
$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

  // add mouseover-effect
  $normal_image = tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image);
  $idx = strrpos ($normal_image, ".");
  if ($idx === false)
 exit ("Invalid image: $image");
  $highlight_image = substr($normal_image, 0, $idx) . "_hl" . substr ($normal_image, $idx);
  if (file_exists ($highlight_image))
 $image_submit .= " onMouseOver=\"this.src='$highlight_image'\" onMouseOut=\"this.src='$normal_image'\"";

  $image_submit .= '>';
return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

// START STS v4.4:
  global $sts;
	$src = $sts->image_button($image, $language, true); // 3rd parameter to tell tep_image that file check has been already done
	if ($src!='') { // Take image from template folder if exists.
	  return tep_image ($src);
	}
// END STS v4.4

//   return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
// add mouseover-effect
  $normal_image = tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image);
  $idx = strrpos ($normal_image, ".");
  if ($idx === false)
 exit ("Invalid image: $image");
  $highlight_image = substr($normal_image, 0, $idx) . "_on" . substr ($normal_image, $idx);
  if (file_exists ($highlight_image))
 $parameters .= " onMouseOver=\"this.src='$highlight_image'\" onMouseOut=\"this.src='$normal_image'\"";

  return tep_image($normal_image, $alt, '', '', $parameters);
}

 

 

Maybe its easy to get it working, maybe not. I dont have the skill with php to say.

Mostly would be good to know if the concept should work or not with STS. Sometimes I can spend a whole day going down dead ends ...

 

thanks

Link to comment
Share on other sites

cross posting yet again, perhaps my idea for a separate thread for issues relating to combining HTC and STS just wasn't read?

 

Anyway, the head content works fine but the page content changes (category and manufacturer descriptions and <h#> tagging of category names) don't and they are a major reason for me for using HTC. Do I need to change index.php and product_info.php to add the HTC changes or do I need to do something somewhere else? As the immediate pp says it would be nice to know before faffing about barking up the wrong lamppost...

Link to comment
Share on other sites

cross posting yet again, perhaps my idea for a separate thread for issues relating to combining HTC and STS just wasn't read?

 

Anyway, the head content works fine but the page content changes (category and manufacturer descriptions and <h#> tagging of category names) don't and they are a major reason for me for using HTC. Do I need to change index.php and product_info.php to add the HTC changes or do I need to do something somewhere else? As the immediate pp says it would be nice to know before faffing about barking up the wrong lamppost...

Tracy,

STS already allows the user to add their own category and manufacturer descriptions directly on the template itself by creating a category or manufacturer template. I feel that HTC is best used for it's meta tag capabilities. Have you looked into the $headertags placeholder? You may need to modify it to include your descriptions.

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

Tracy,

STS already allows the user to add their own category and manufacturer descriptions directly on the template itself by creating a category or manufacturer template. I feel that HTC is best used for it's meta tag capabilities. Have you looked into the $headertags placeholder? You may need to modify it to include your descriptions.

 

But that would involve making templates for each category/manufacturer, no? Rather than using the database capability that already exists in HTC. I'll have a play around and see if I can see what it's doing, but obviously am open to suggestions/examples... While we're here, do you know why the $cataloglogo placeholder doesn't work?

Link to comment
Share on other sites

While we're here, do you know why the $cataloglogo placeholder doesn't work?

This will depend upon what version of osC and STS your are using...

For Online Merchant RC1 and STSv4.5.3:

You will need to name your logo "header_logo.gif" and save it in your template folder/images/english (or other language that you use) folder.

Or...you can modify the $cataloglogo tag in the modules/sts_inc/general.php file to point to a different named image:

 

	$sts->template['cartlogo'] = '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . tep_image(STS_TEMPLATE_DIR.'images/'.$language. '/header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>';

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

This will depend upon what version of osC and STS your are using...

For Online Merchant RC1 and STSv4.5.3:

You will need to name your logo "header_logo.gif" and save it in your template folder/images/english (or other language that you use) folder.

Or...you can modify the $cataloglogo tag in the modules/sts_inc/general.php file to point to a different named image:

 

	$sts->template['cartlogo'] = '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . tep_image(STS_TEMPLATE_DIR.'images/'.$language. '/header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>';

 

yep, I did the renaming/moving thing, it just shows in the header as $cataloglogo.

Link to comment
Share on other sites

yep, I did the renaming/moving thing, it just shows in the header as $cataloglogo.
Tracy, are you using an end character for the rest of your tags? If so, then you would need to do the same for the cataloglogo 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

THIS IS CRAZY!!!!!!!!!!!

 

I've been using STS version 42 for a LOOOONG time now, and used it with different sites. I was just working on one, editing the sts_template.html file, saved it, and refresh my browser, and NOW I GET A BLANK PAGE!!!!!!!!!!!!! I have not touched anything else, none of the sts files, I was just editing my html template file. I know it worked fine, since I have been editing it for a few days now everyday. I have no idea what to do to fix it, although I would consider myself pretty experienced using sts, and I've never had a problem. The funny thing is THAT I DID NOT TOUCH any other files, other than the same html file I have been working on.

 

Has this happened to anybody? How would I fix this?

 

Any help with this would be appreciated!

 

Thanks!

 

Allen

Link to comment
Share on other sites

so you guys know, if i do a view source on my new blank page, this is what I get

 

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<!-- footer_eof //-->

<br>

</body>

</html>

 

YEP, thats all you see in the source now

Link to comment
Share on other sites

Try your page in debug mode, that means add sts_debug=debug in the URL. You should see a list of all STS tags and their value, as well as path of template used.

 

- Chris

Link to comment
Share on other sites

Tracy, are you using an end character for the rest of your tags? If so, then you would need to do the same for the cataloglogo as well.

 

Thanks Bill, turned out to be user error of course, lol, helps when one types catalog rather than calatog...

Link to comment
Share on other sites

THIS IS CRAZY!!!!!!!!!!!

 

I've been using STS version 42 for a LOOOONG time now, and used it with different sites. I was just working on one, editing the sts_template.html file, saved it, and refresh my browser, and NOW I GET A BLANK PAGE!!!!!!!!!!!!! I have not touched anything else, none of the sts files, I was just editing my html template file. I know it worked fine, since I have been editing it for a few days now everyday. I have no idea what to do to fix it, although I would consider myself pretty experienced using sts, and I've never had a problem. The funny thing is THAT I DID NOT TOUCH any other files, other than the same html file I have been working on.

 

Has this happened to anybody? How would I fix this?

 

Any help with this would be appreciated!

 

Thanks!

 

Allen

Allen,

 

 

 

STS 4.2 and blank page issue:

 

 

 

Check that you do not have Gzip on in the Admin settings. If you absolutely need it, then lower the Gzip setting. This was fixed in later versions of STS so that using GZip would not be an issue.

 

 

 

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

Try your page in debug mode, that means add sts_debug=debug in the URL. You should see a list of all STS tags and their value, as well as path of template used.

 

- Chris

 

i tried that too, and its also BLANK, totally BLANK :'( I have no idea what to do

Link to comment
Share on other sites

Bill, thanks for your reply. I had gzip compression set to false and 5, so i lowered it to 0, and nothing, still getting a BLANK PAGE. And debug comes a BLANK page too!

 

What I don't get is that all I did these last few days was work on the html template file, and last night I was uploading it, while I upload, my dream weaver timed out. So that file wasnt uploaded properly. Then i went through FileZilla and manually removed that file and replaced it with a new one. And nothing!!! :'( It's been BLANK ever since.

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