Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

I'm brand new to OSC, STS and coding in general so please excuse my general ignorance. A friend of mine designed a web template for an old site I was working on and I want to use it for my store. I was hoping I could simply upload the HTML and CSS files, add in the STS codes for OSC content and make any further adjustments as needed. But that doesn't work.

 

What can I do to keep the styling of my old site in OSC?

Hello Gabriel. Yes, you can do what you are wanting to do with your site template...this is what STS is all about.

 

First, take a look at the blank sts template that is provided in the contribution located in the sts templates folder. This page displays the code that is required in your existing template to make it work with osC and STS. Add this code to your existing template and then insert each osC variable that you desire to be in your store. For example: If you want to have the osc search box in your template, then just add the $searchbox placeholder where you want it to appear and that is all there is to it. :thumbsup:

 

Have fun,

 

Bill Kellum


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
Thank you, this was just what I was looking for as well!
Rebecca, keep in mind that the script portion that you quoted in your post has been modified in the STS4.4 release. I just wanted to mention this in case any 4.4 users out there noticed that the "popup" portion is different than what they have and not to be confused by it. ;)

 

Glad it worked for you.


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
Hello Gabriel. Yes, you can do what you are wanting to do with your site template...this is what STS is all about.

 

First, take a look at the blank sts template that is provided in the contribution located in the sts templates folder. This page displays the code that is required in your existing template to make it work with osC and STS. Add this code to your existing template and then insert each osC variable that you desire to be in your store. For example: If you want to have the osc search box in your template, then just add the $searchbox placeholder where you want it to appear and that is all there is to it. :thumbsup:

 

Have fun,

 

Bill Kellum

 

Aha! So there's extra code I need in my HTML template. Now what about my CSS file? The HTML template works, but it's a mess. The CSS file isn't working.

Share this post


Link to post
Share on other sites
Aha! So there's extra code I need in my HTML template. Now what about my CSS file? The HTML template works, but it's a mess. The CSS file isn't working.
Gabriel, not to sound like a jerk but this information is included in the provided User Manual. :thumbsup:

 

Regarding the CSS...If your template is a CSS template and does not use tables, you may need to install the "tableless CSS" contribution to modifiy osCommerce as such. Then you will be able to use STS for complete CSS layout.

 

If your problem is just that your template is using a custom stylesheet, you just need to point to that css file. This is also mentioned in the User Manual.


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
Gabriel, not to sound like a jerk but this information is included in the provided User Manual. :thumbsup:

 

Regarding the CSS...If your template is a CSS template and does not use tables, you may need to install the "tableless CSS" contribution to modifiy osCommerce as such. Then you will be able to use STS for complete CSS layout.

 

If your problem is just that your template is using a custom stylesheet, you just need to point to that css file. This is also mentioned in the User Manual.

 

Sorry. man. I did go through the Manuel but didn't see anything that seemed to address my problem - again because of my general ignorance. I wouldn't know what to look for. But thanks for your help!

Share this post


Link to post
Share on other sites
Sorry. man. I did go through the Manuel but didn't see anything that seemed to address my problem - again because of my general ignorance. I wouldn't know what to look for. But thanks for your help!
Hey Gabriel...I'm glad you looked in the User Manual first. I just assumed from your question that you had not. :- Try out what I mentioned in the above post and then post a follow up. Good luck!

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 installed the STS v4.4 and wanted to use BDP as well. I noticed that they both have their own boxes.php under the same folder catalog/includes/classes.

 

Shall I merge th contents on these 2 boxes.php? There are quite a lot of changes. I can't seem to find a compare and merge program for linux.

 

Thanks. :o

Share this post


Link to post
Share on other sites
Sorry for my ignorance, but what is BDP?

I am sorry too. I did'nt express myself well. It is the Basic Design Pack.

 

Do I need this catalog/includes/boxes.php file if I will use the infoBox templates?

 

Thanks. :rolleyes:

Share this post


Link to post
Share on other sites
Hey Gabriel...I'm glad you looked in the User Manual first. I just assumed from your question that you had not. :- Try out what I mentioned in the above post and then post a follow up. Good luck!

 

Still not working. I'm feeling very lost.

 

I've followed all the directions but I'm not clear on some things:

a. what code needs to remain in the HTML and CSS files

b. what other files must be modified (if any)

c. what are the settings I should have for the STS modules

Edited by otherworld

Share this post


Link to post
Share on other sites

rigadin,

Thanks for the contribution, However I just did a reinstall of oscommerce and did a clean install of sts and when I click edit for the default sts and try to change the "use templates?" and change my template and hit save it does not save. It just defaults back to the unchanged properties. Any ideas on why. I have no other contributions installed and it is a clean install of oscommerce.

Share this post


Link to post
Share on other sites

Hi all,

 

1 quick question please :)

 

Objective: I want one template for main page www.domain.co.uk which will have some adverts on/product advertising etc, I then want just one other template for every other page of the site.

At the moment I am achieving this by having index.php.html and a index.php, index.php_mfr.php and a separate index.php_1.php /2/3/4 etc for the categories. Is there just one template I can do to take care of all the categories like the mfr one.

 

 

Is there a better way of doing it?! As is at the moment if I have 20 categorys i'll end up with 20 of the same template to stop it reverting back to index.php.html.

 

Thank you

 

Becki

Share this post


Link to post
Share on other sites
Still not working. I'm feeling very lost.

 

I've followed all the directions but I'm not clear on some things:

a. what code needs to remain in the HTML and CSS files

b. what other files must be modified (if any)

c. what are the settings I should have for the STS modules

 

 

Nevermind.....got the answer from a previous post. Thanks.

Share this post


Link to post
Share on other sites
Hi all,

 

1 quick question please :)

 

Objective: I want one template for main page www.domain.co.uk which will have some adverts on/product advertising etc, I then want just one other template for every other page of the site.

At the moment I am achieving this by having index.php.html and a index.php, index.php_mfr.php and a separate index.php_1.php /2/3/4 etc for the categories. Is there just one template I can do to take care of all the categories like the mfr one.

 

 

Is there a better way of doing it?! As is at the moment if I have 20 categorys i'll end up with 20 of the same template to stop it reverting back to index.php.html.

 

Thank you

 

Becki

Hello Becki,

 

You should use index.php_0.html for your home page and then index.php.html would be used for all others. Of course you will have to enable the index module in the admin 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

Hi All,

 

I'm running into a small problem I'm trying to suss whether it's my issue or an STS issue so I'd be interested to know if anyone else is experiencing this.

 

Basically on a fresh osC install and STS 4.4 added by overwrite with no other contributions once I've created a customer when I come back and hit the password forgotten link on login.php I get

 

Fatal error: Call to a member function image() on a non-object in /osc/catalog/includes/functions/html_output.php on line 78

 

Line 78 is smack in the middle of:

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

 

I get these results on my local dev box using PHP 5.2.0 and on my production box using PHP 5.2.1. Haven't had a chance to test PHP 4.4.4 yet.

 

I don't get these results with STS 4.3.3 though.

 

Anyone else seeing this in STS 4.4?

 

Thanks,

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites

Hrrm,

 

Just removing the whole block fixes it with no discernable problems

 

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

 

This is for the mulitple language images?

 

Iggy


Everything's funny but nothing's a joke...

Share this post


Link to post
Share on other sites
Hi All,

 

I'm running into a small problem I'm trying to suss whether it's my issue or an STS issue so I'd be interested to know if anyone else is experiencing this.

 

Basically on a fresh osC install and STS 4.4 added by overwrite with no other contributions once I've created a customer when I come back and hit the password forgotten link on login.php I get

 

Fatal error: Call to a member function image() on a non-object in /osc/catalog/includes/functions/html_output.php on line 78

 

Line 78 is smack in the middle of:

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

 

I get these results on my local dev box using PHP 5.2.0 and on my production box using PHP 5.2.1. Haven't had a chance to test PHP 4.4.4 yet.

 

I don't get these results with STS 4.3.3 though.

 

Anyone else seeing this in STS 4.4?

 

Thanks,

Iggy

Hey Iggy, I can confirm this bug using a stock osc 060817 with STS v4.4. This does not happen with STS v4.3.3 and looking at line 78 above makes me thinik this has to do with the latest feature added for custom images per template folder. I'm going to dig into this further. Hopefully Chris has noticed this too.

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

It seems that we call the tep_image function from somewhere where $sts is not known, so the "global $sts" trick inside the function does nothing.

 

One quick workaround is to add a if is_object($sts) before calling the $sts method. It will remove the php error but then the feature won't work like expected and the catalog/image will be taken, even if same image exists in template folder.

 

I got this error once during development, tried the is_object, and finally removed it and no error. Weird.

 

Please place this instruction in tep_image, before STS code:

var_dump(debug_backtrace());

 

It'll tell from where the function is called and help debugging.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

HI!

I am using the latest sts4.4 and the Header tags controller v.2.6 with the sts4.3.2 package. I am having permission problems with the HTC . I tried both the 755 and the 777 permissions but no luck. I have added som functions as stated for the oscommerce 060817 users. Still I got these messages:

 

At the HTC page control:

/catalog/includes/header_tags.php file appear to be incorrect.

/catalog/includes/languages/english/header_tags.php file appear to be incorrect.

 

At the HTC text control:

/catalog/includes/languages/english/header_tags.php file appear to be incorrect.

 

At the HTC Fill tags:

no permission warnings.

 

Note : I did'nt have these problems,when I used the STSv4.3.2_HTCv2.6_1 . I had some other issues *product names not showing up", which I couldn't resolve that's why I re-installed the whole osc with Basic Design Package and STS4.4 and ACA contributions. HTC installation is taken from the STSv4.3.2_HTCv2.6_1 package. I was told to do this from the HTC support contribution.

 

Any suggestions of resolving this problem?

 

Thanks. :blush:

Share this post


Link to post
Share on other sites

I'm also having problems with the error being returned from line 78 of html_output.php. It occurred just after i added a review of a product. Will removing this code have a significant effect on the site? Many thanks

Share this post


Link to post
Share on other sites
Hey Iggy, I can confirm this bug using a stock osc 060817 with STS v4.4. This does not happen with STS v4.3.3 and looking at line 78 above makes me thinik this has to do with the latest feature added for custom images per template folder. I'm going to dig into this further. Hopefully Chris has noticed this too.
This was also a problem way back on STS version 1.8 and then disappeared after version 2. Hmm...

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 am using the latest sts4.4 and the Header tags controller v.2.6 with the sts4.3.2 package. I am having permission problems with the HTC . I tried both the 755 and the 777 permissions but no luck. I have added som functions as stated for the oscommerce 060817 users. Still I got these messages:

 

At the HTC page control:

/catalog/includes/header_tags.php file appear to be incorrect.

/catalog/includes/languages/english/header_tags.php file appear to be incorrect.

 

At the HTC text control:

/catalog/includes/languages/english/header_tags.php file appear to be incorrect.

 

At the HTC Fill tags:

no permission warnings.

 

Note : I did'nt have these problems,when I used the STSv4.3.2_HTCv2.6_1 . I had some other issues *product names not showing up", which I couldn't resolve that's why I re-installed the whole osc with Basic Design Package and STS4.4 and ACA contributions. HTC installation is taken from the STSv4.3.2_HTCv2.6_1 package. I was told to do this from the HTC support contribution.

 

Any suggestions of resolving this problem?

 

Thanks. :blush:

Hello, I have combined STS 4.4 with HTC 2.6.0 but have not uploaded it as a contribution yet because I have not had time to update the documents. I can give you the files only if that will help you out. Just send me an email. I plan to upload to osC STS4 Power Pack contribution site as soon as I update the documentation. You could use these files to compare with what you have to help you find your errors.

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

Also, you mentioned that you have ACA installed. Did you be sure not to use the categories.php file from the HTC contribution but use the HTC files for ACA instead? There should be four files needed from the ACA contribution for the languages and modules category and product folders. I didn't mention this before since you had said that you were already on the HTC forum and they sent you over here so I figured this was already discussed. :-


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

It seems that the custom images feature added in v4.4 is sometimes buggy, so modifications in html_output.php should not be done unless you want to make some debug.

 

If somebody with the image bug could place this code at the beginning of tep_image function, instead of the original STS code, and post the result here, it would help us a lot:

 

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

 

Thanks,

Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

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

×