Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Mike, at this time I do not use the Google Analytics Beta contribution.

 

Really, the only things to keep in mind regarding if other contributions will work with STS is the following:

 

  1. If the contribution makes edits to the product_info.php file AND you are using the content template feature for product_info templates, you will need to duplicate these edits in the sts_inc/product_info.php file. If you are not using the content template feature in STS, you do not need to do anything else as STS will automatically pickup the custom product_info edits with the $content tag in your template page.
  2. If the contribution makes a new infobox, you will need to create a new infobox tag in order for STS to "find" the new box and allow you to template it. Instructions for doing so are listed in the sts_user_code.php file or in the following link: http://forums.oscommerce.com/index.php?sho...p;#entry1141288
  3. If the contribution creates a page that should not be templated by STS, or you do not want it to be templated, simply "exclude" that page from being templated. See the following link for more info: http://forums.oscommerce.com/index.php?sho...p;#entry1222434

Well, as long as the contribution is created according to osC coding standards, then the above should about cover it.

 

Hope this helped,

 

Yes Bill, it helped.

Thank you very much for your help.

I start to understand a bit by bit what's going on and your explanation was very, very helpful.

I think I should start learning php (its code reminds me C++ in some way :) ).

What I do like to find is the map of defined objects and events in osCommerce (what is what). I'm not sure if I am clear what I am talking about.

Thanks again.

Mike

Thank you again!

Edited by AlwaysNewbie

Computers777dotcom

Share this post


Link to post
Share on other sites
I'm not sure about the bundle version that you mentioned but I bet you could simply add that line of code just before the last ? closing tag of that script.

Hi!

 

I tried to add the code just before the closing ?> tag but it still doesn´t work. Maybe the contribution doesn´t work with my new version of STS? Is there another similar contribution like this for STS or how do you add extra fields to product info template? Is it possible to use the existing placeholders with another type of content? (for example use the placeholder $moreinfolabel for some textinfo and not a link)

Share this post


Link to post
Share on other sites

Hello, i'm attempting to add the images as options contribution and cannot seem to find a way to get it to implement into the product_info for sts. I understand you can edit the product_info from includes\modules\sts_inc and insert the code from the contribution but it is formatted so different from the original that it just doesnt seem to work out. I need the custom product_info for sts so I cant turn it off. I have certainly been searching the forums but cannot seem to find the answer.

Does anyone have any ideas or easier instructions on how this might be accomplished?

 

thank you!

 

for example:

I figured that this line was the only useful code that needed to be added....

if (OPTIONS_AS_IMAGES_ENABLED == 'true') include ('options_images.php'); 

but it just calls upon a php file which will show the contribution but stops its functionality.

 

any ideas?

Share this post


Link to post
Share on other sites

Hi,

 

I have just downloaded 'STSv4.5.8_1_2' and am stuck in the final stages of modifying the files.

 

2.6.7 includes/functions/html_output.php

 

Find this: (this doesnt exist in my html_output.php file ????

$image_submit = '<input type="image" src=

 

Find this: (this doesnt exist in my html_output.php file ????

function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

 

I have installed "Ultimate_SEO_URLSv21d_UPDATED_1_2", I assume this may be the problem???

 

Can anyone possibly help?

Edited by webtastic

Share this post


Link to post
Share on other sites
Hi,

 

I have just downloaded 'STSv4.5.8_1_2' and am stuck in the final stages of modifying the files.

 

2.6.7 includes/functions/html_output.php

 

Find this: (this doesnt exist in my html_output.php file ????

$image_submit = '<input type="image" src=

 

Find this: (this doesnt exist in my html_output.php file ????

function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

 

I have installed "Ultimate_SEO_URLSv21d_UPDATED_1_2", I assume this may be the problem???

 

Can anyone possibly help?

Adam,

 

I have installed Ultimate SEO URLs v2.2 and it does not conflict at all with the installation instrucitons.

 

osC RC2a includes/funtcions/html_output.php looks like this (lines 73 & 74):

// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

Add this immediately afterwards:

 // START STS v4.4:
  global $sts; 
$sts->image($src); // Take image from template folder if exists.
// END STS v4.4

Then in the same file, find (lines 117-119):

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

Add this immediately afterwards:

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

Then in the same file, find (lines 133-135)

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

Add immediately afterwards:

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

 

So as you can see above, STS does not 'change' any code to this file, just adds to it. Use a good file comparison tool such as Beyond Compare or Winmerge to see the changes.

 

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

Share this post


Link to post
Share on other sites

Bill,

I installed Customer Testimonials 3.2b and try to get it work. As I understand, that contribution makes a new box, so I defined STS tag as it was suggested in the sts_user_code.php like this:

 

$sts->start_capture();

require(DIR_WS_BOXES . 'customer_testimonials.php');

$sts->stop_capture('testimonialsbox', 'box');

 

I added this lines right bellow the line

$sts->stop_capture('catmenu');

 

Then I added $testimonialsbox into the empty cell of right column of template I use.

Retsrted store and didn't see any changes. I checked source it generated and it was like this:

 

<!-- start testimonialsbox //-->

<!-- customer testimonials //-->

<!-- customer testimonials_eof //-->

 

<!-- end testimonialsbox //-->

As I inderstood it means that somehow any code defining testimonialsbox was not generated for some reason.

I did try to shut off STS but I didn't get testimonial box anyway.

I think when STS is shut box should be created by code I put in by Customer Testimonials contribution in the right column and customer_testimonials.php also. I saw you mention somewhere that contribution must follow some osCommerce standards, otherwize STS may not work with it. What your suggestion?

Thanks for any help.


Computers777dotcom

Share this post


Link to post
Share on other sites
Bill,

I installed Customer Testimonials 3.2b and try to get it work. As I understand, that contribution makes a new box, so I defined STS tag as it was suggested in the sts_user_code.php like this:

 

$sts->start_capture();

require(DIR_WS_BOXES . 'customer_testimonials.php');

$sts->stop_capture('testimonialsbox', 'box');

 

I added this lines right bellow the line

$sts->stop_capture('catmenu');

 

Then I added $testimonialsbox into the empty cell of right column of template I use.

Retsrted store and didn't see any changes. I checked source it generated and it was like this:

 

 

 

 

 

 

As I inderstood it means that somehow any code defining testimonialsbox was not generated for some reason.

I did try to shut off STS but I didn't get testimonial box anyway.

I think when STS is shut box should be created by code I put in by Customer Testimonials contribution in the right column and customer_testimonials.php also. I saw you mention somewhere that contribution must follow some osCommerce standards, otherwize STS may not work with it. What your suggestion?

Thanks for any help.

Michael,

 

You hit it on the head regarding the contribution not being coded correctly. It works by itself but because of the way the messagestack is coded it causes problems with other contributions.

 

Take a look at the following links:

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

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

 

It details the problem and offers a work around. Also, I know Tracy uses this contribution and I was able to help her get it going with 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
Michael,

 

You hit it on the head regarding the contribution not being coded correctly. It works by itself but because of the way the messagestack is coded it causes problems with other contributions.

 

Take a look at the following links:

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

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

 

It details the problem and offers a work around. Also, I know Tracy uses this contribution and I was able to help her get it going with STS.

 

Bill,

I woke up this morning and first deal checked my e-mail. :)

I made changes as you suggested in sts.php and testimonials appears right away.

Thank you so much. I'm just wondering if you ever you sleep? :lol: :lol: :lol:


Computers777dotcom

Share this post


Link to post
Share on other sites

Hello,

 

I have recently installed this contribution. I have already improved my template but I have a probelm with the box "new product".

 

First of all, here is an image to illustrate it:

image3mz5.png

image3mz5.98b83c12c5.jpg

 

As you can see, the corners are too small so the box has some problems. On the right of this image, you can see one of my infobox and there is no problem on it. More over, on my basic design (teh one withtout sts), I don't have any problem with corners and I did not touch to those images.

 

 

Would you have any idea in order to help me?

 

Thank you!

Share this post


Link to post
Share on other sites

Hi,

 

i am using .........sts for website.

 

i want to add some boxes (hard code using html) in middle (content) of index.php

 

like latest news , latest offer, etc

 

these boxes should only appear on main page ................not on anyother page..............

 

is this possible.......

Share this post


Link to post
Share on other sites
Hi,

 

i am using .........sts for website.

 

i want to add some boxes (hard code using html) in middle (content) of index.php

 

like latest news , latest offer, etc

 

these boxes should only appear on main page ................not on anyother page..............

 

is this possible.......

Make your home page template index.php_0.html


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

How does this newer version of STS determine which template you use for index and product info pages?

Share this post


Link to post
Share on other sites
How does this newer version of STS determine which template you use for index and product info pages?

Hi Adam,

 

Inside the download there is a 'doc' folder. The documents inside this folder explain how the templates are chosen.


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
Make your home page template index.php_0.html

 

thanks for reply.......can u please tell me .....in which folder i will put index.php_0.html

 

 

 

does index.html and index.php_0.html...............will have same code ......except of that extra boxes.....?

 

please help....thanks

 

Vicky

Share this post


Link to post
Share on other sites

Hi,

 

now i am using index.php_0.html for main page...........using hardcode.

 

i added some boxes on top of page .........in lower content area

 

 

 

how can i add latest product box.......that display ......latest products...

 

 

is there any way to include that box ..........in my static page.

 

 

 

Vicky

Share this post


Link to post
Share on other sites

Hi,

 

I really really need some help with STS installed on my Oscommerce and SSL. NonSSL pages work fine, but I have just installed a SSL cert from GoDaddy. Somehow the base href is not changing in my login pages eventhough I have tried most of the tests on the forums and searching on google. The line:

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

is suppose to be right for me as Ive done a test with the following php code from one of the forum topics:

 echo 'HTTP HOST: ' . "$HTTP_HOST";
echo '<br>Server Port: ' . getenv('SERVER_PORT'); //-->displays 443
echo '<br>SSL Status: ' . getenv('HTTPS');//--displays 'on;
echo '<br>Fowarded Server: ' . getenv('HTTP_X_FORWARDED_SERVER');
echo '<br>Fowarded Host: ' . getenv('HTTP_X_FORWARDED_HOST');
echo '<br>Fowarded By: ' . getenv('HTTP_X_FORWARDED_BY');

 

With admin it is working fine, it directs straight to https. so I assume the config files are working correctly. But the catalog is not working. Ive followed this thread and used absolute/relative urls for everything. Ive even moved all my images to the sts_templates/images folder and tried with $templatedir infront of all the image links. But its still not working. I did a page source with where I place areas with templatedir it didnt state the url address except the path: /includes/sts_templates/full/images/

 

Heres the code in my general.php which is the default code from STS4.58

$sts->template['templatedir'] = substr(((($request_type == 'SSL') ? DIR_WS_HTTPS_CATALOG : DIR_WS_HTTP_CATALOG) . STS_TEMPLATE_DIR),0,-1);

 

I really really need some help as I am not sure if I am doing it correctly with the STS templates or is there another reason that might be causing the problem. I have a dedicated ip address and the SSL was installed on this host: www.d3bakery.com

 

Here are my config files

catalog/includes/configure.php

 

  define('HTTP_SERVER', 'http://www.d3bakery.com');
 define('HTTPS_SERVER', 'https://www.d3bakery.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'www.d3bakery.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.d3bakery.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');

 

 

 

catalog/admin/includes/configure.php

 

   define('HTTP_SERVER', 'https://www.d3bakery.com');
 define('HTTP_CATALOG_SERVER', 'https://www.d3bakery.com');
 define('HTTPS_CATALOG_SERVER', 'https://www.d3bakery.com');
 define('ENABLE_SSL_CATALOG', true);

 

 

 

If anyone could get back to me soon it would be much appreciated. I really need help to get this working and have been searching around for days for a solution. Please help.

 

Thanks alot

Share this post


Link to post
Share on other sites
thanks for reply.......can u please tell me .....in which folder i will put index.php_0.html

 

 

 

does index.html and index.php_0.html...............will have same code ......except of that extra boxes.....?

 

please help....thanks

 

Vicky

Vicky,

All of your templates should go into your template folder. Please refer to the 'doc' folder that came with the contribution as it spells out how STS decides which template to use for whatever osCommerce scirpt is being called.


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

 

Do you think you could help me please on my issue. No one in the support forums seems to be replying to any of my threads at all. The only thing I have found to work was to hardcode on every sts_template https:// but I understand that is not the correct way of doing things but I cant seem to find any solution. Somehow the base href keeps redirecting to http instead. Am I suppose to place links from my http:// index page to https://login page for this to work?

Share this post


Link to post
Share on other sites

I have a problem with buttons that act as a form input.

 

They all appear on screen as if they are actually part of a form, instead of simply being a button that has a form action attached to it.

 

Therefore if I have a button which is just a link, it appears fine on screen. If I have a button (such as the Add to Cart one on http://www.innometrix.net/store/product_info.php) then it has a border round it and is resized as if it were an actual input field.

 

This makes the button look terrible and I can't understand where the sotre is picking up the format from because if I turn STS off then the button returns to normal - yet the source code behind the button whether STS is on or off is absolutely identical!

 

Any help gratefully received. I have given up all hope, yet STS has got my site almost perfect in every other way :(

Share this post


Link to post
Share on other sites
Or anyone who could help that has got a dedicated ip with SSL and STS templates installed for the latest oscommerce?

All I can tell you is that STS will not cause any SSL issues with your shop. Of course, if you do not create your links correctly, then you could be causing some SSL issues within your templates. You mentioned that you checked all of your images to be sure the paths were relative, good. Also check for your stylesheet link.

 

Besides links, check with whomever you purchased the cert from to be sure that you have it configured correctly.

 

Here is a google search that may assist you in getting this worked out:

http://forums.oscommerce.com/lofiversion/i...hp?t183630.html


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 have a problem with buttons that act as a form input.

 

They all appear on screen as if they are actually part of a form, instead of simply being a button that has a form action attached to it.

 

Therefore if I have a button which is just a link, it appears fine on screen. If I have a button (such as the Add to Cart one on http://www.innometrix.net/store/product_info.php) then it has a border round it and is resized as if it were an actual input field.

 

This makes the button look terrible and I can't understand where the sotre is picking up the format from because if I turn STS off then the button returns to normal - yet the source code behind the button whether STS is on or off is absolutely identical!

 

Any help gratefully received. I have given up all hope, yet STS has got my site almost perfect in every other way :(

Just add a style to the button:

 

}
.buttonstyle {
border-style: solid;
border-width: 0;

And then apply the style to the button:

 

<img src="$templatedir/images/english/buttons/my_button.jpg" width="some_number" height="some_number" class="buttonstyle">


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
All I can tell you is that STS will not cause any SSL issues with your shop. Of course, if you do not create your links correctly, then you could be causing some SSL issues within your templates. You mentioned that you checked all of your images to be sure the paths were relative, good. Also check for your stylesheet link.

 

Besides links, check with whomever you purchased the cert from to be sure that you have it configured correctly.

 

Here is a google search that may assist you in getting this worked out:

http://forums.oscommerce.com/lofiversion/i...hp?t183630.html

 

Its all sorted now. Thanks alot.

Share this post


Link to post
Share on other sites
Hello,

 

I have recently installed this contribution. I have already improved my template but I have a probelm with the box "new product".

 

First of all, here is an image to illustrate it:

image3mz5.png

image3mz5.98b83c12c5.jpg

 

As you can see, the corners are too small so the box has some problems. On the right of this image, you can see one of my infobox and there is no problem on it. More over, on my basic design (teh one withtout sts), I don't have any problem with corners and I did not touch to those images.

 

 

Would you have any idea in order to help me?

 

Thank you!

 

Any idea for my problem? Without STS, no problem with boxes; with STS, I have this problem but I can't understand why. This is a very good contribution but I can't use it currently because of this stupid problem.

I hope that you will be able to help me.

 

Thx

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

×