Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hi all,

 

I allready converted a lot from the old table structure to a new div / css layout.

I get struck when changing the "$headertext".

 

In the source still contains the following code:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td width="100%" class="infoBoxHeading">Fabrikanten</td>
 </tr>
</table>

 

So the code above is replaced when placing "$headertext" in a template. How can i get rid of the tables?

 

 

Thanks in advance,

 

Hadion

Link to comment
Share on other sites

I decided to start over with STS and HTC Bundle. I just did a clean install, no other contribs. Front end works but I can't get the admin to come up. I get a 404 page not found error, even though all the files are there.
How did you do the install? Did you manually make the modifications or did you just copy the files over? If you just copied the files over, then you are going to have issues on the admin side since RC1 is quite different on the admin side compared to the 060817 version of osC.

 

:thumbsup: My advice would be to use the latest STS & HTC bundle but instead of just copying the files over, use a file comparison tool to merge the changes instead. Otherwise, you could just follow my step by step installation tutorial to install HTC on top of an existing STS installation (link in my signature below).

 

Eventually, I will upload a STS & HTC bundle that is compatible with RC1 to allow a simple file copy type of installation.

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

Hi all,

 

I allready converted a lot from the old table structure to a new div / css layout.

I get struck when changing the "$headertext".

 

In the source still contains the following code:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" class="infoBoxHeading">Fabrikanten</td>
</tr>
</table>

 

So the code above is replaced when placing "$headertext" in a template. How can i get rid of the tables?

 

 

Thanks in advance,

 

Hadion

Hadion,

 

Take a look at the following thread (unfortunately posted outside of the STS thread) regarding your interest above:

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

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

How did you do the install? Did you manually make the modifications or did you just copy the files over? If you just copied the files over, then you are going to have issues on the admin side since RC1 is quite different on the admin side compared to the 060817 version of osC.

 

:thumbsup: My advice would be to use the latest STS & HTC bundle but instead of just copying the files over, use a file comparison tool to merge the changes instead. Otherwise, you could just follow my step by step installation tutorial to install HTC on top of an existing STS installation (link in my signature below).

 

Eventually, I will upload a STS & HTC bundle that is compatible with RC1 to allow a simple file copy type of installation.

 

Just to check, the latest sts & htc bundle is "STSv4.5.2 and HTCv2.6.3 Bundle"? Will the stsv4.5.2 work with the RC1 release? I ask because of "STS v4.5.3 for osC Online Merchant RC1".

Link to comment
Share on other sites

Just to check, the latest sts & htc bundle is "STSv4.5.2 and HTCv2.6.3 Bundle"? Will the stsv4.5.2 work with the RC1 release? I ask because of "STS v4.5.3 for osC Online Merchant RC1".

Yes, STSv4.5.2 will work with osC Online Merchant RC1 if the code is intalled manually. If you try to copy the files from the contribution over the existing RC1 files, you will wreck your shop. Note: There are some sts tags that point to older osC files (060817 version) in the sample templates that could cause some issues.

 

STSv4.5.3 contribution files have been updated to reflect the RC1 changes in the existing osCommerce files. It is safe to simply copy the files over your existing RC1 files without making any manual edits. All sample templates and sts tags have been updated to reflect RC1.

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

 

i installed the sts on the site but it gives this error

 

 

 

 

Template file doesn't exist: [DIR_WS_TEMPLATE]

Warning: fopen() [function.fopen]: Unable to access DIR_WS_TEMPLATE in /storage/mijndomein/users/029743/public/sites/www.paintballparadise.nl/clone/includes/application_bottom.php on line 75

 

Warning: fopen(DIR_WS_TEMPLATE) [function.fopen]: failed to open stream: No such file or directory in /storage/mijndomein/users/029743/public/sites/www.paintballparadise.nl/clone/includes/application_bottom.php on line 75

Can't open Template file: [DIR_WS_TEMPLATE]

Warning: filesize() [function.filesize]: Stat failed for DIR_WS_TEMPLATE (errno=2 - No such file or directory) in /storage/mijndomein/users/029743/public/sites/www.paintballparadise.nl/clone/includes/application_bottom.php on line 79

 

Warning: fread(): supplied argument is not a valid stream resource in /storage/mijndomein/users/029743/public/sites/www.paintballparadise.nl/clone/includes/application_bottom.php on line 79

 

Warning: fclose(): supplied argument is not a valid stream resource in /storage/mijndomein/users/029743/public/sites/www.paintballparadise.nl/clone/includes/application_bottom.php on line 80

 

thnx for the help

Sabrina,

Re-check your installation and be sure you followed each step. Also, be sure to configure the STS modules according to the installation instructions.

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, STSv4.5.2 will work with osC Online Merchant RC1 if the code is intalled manually. If you try to copy the files from the contribution over the existing RC1 files, you will wreck your shop.

 

STSv4.5.3 contribution files have been updated to reflect the RC1 changes in the existing osCommerce files. It is safe to simply copy the files over your existing RC1 files without making any manual edits.

 

OK, thanks. I'll work with the bundle and see how it goes.

Link to comment
Share on other sites

Yes, STSv4.5.2 will work with osC Online Merchant RC1 if the code is intalled manually. If you try to copy the files from the contribution over the existing RC1 files, you will wreck your shop. Note: There are some sts tags that point to older osC files (060817 version) in the sample templates that could cause some issues.

 

STSv4.5.3 contribution files have been updated to reflect the RC1 changes in the existing osCommerce files. It is safe to simply copy the files over your existing RC1 files without making any manual edits. All sample templates and sts tags have been updated to reflect RC1.

 

Well, it took me a while, but it's done and working. Thanks. B)

Link to comment
Share on other sites

  • 3 weeks later...

How to add new boxes ??? I tried the method in OSCommerce documentation but it does not work properly. I think it is due to STS ... So i checked STS user manual ..and i found this:

 

3.2.1 Add new variables in sts_user_code.php

If you want to add any new boxes or template variables, add them in the

includes/modules/sts_inc/sts_user_code.php file. An example of syntax is provided.

See chapter 5.7 for another way to create new variables.

 

... However, there is NO 5.7 chapter ! So i need to know how can i add a box in my index page !

 

thanks a lot ..

Link to comment
Share on other sites

Hi all, this contribute is fantastic, but i do not understand how to change the box layout.

Can anyone help me, tnx all

 

Hi, to change the boxes layout like for example, the categories box, you have to create a boxes folder on your template folder, (which is already created on the full template on the original sts zip file) and modify the infobox.php.html, you also have to make the proper changes on css

 

Hope this helps,

 

Regards,

 

Gustojeda

Link to comment
Share on other sites

Dear All,

 

I am new to osCommerce and STS. I have installed the latest osCommerce 2.2RC1 and STS4.5.5 sucessfully to my limited knowledge. My real problem is that the documentation on the STS doesn't mean a lot to me! It says that STS uses placeholders and variables that make laying out a template easy as they are simply replaced. Where do you edit what is behind the placeholders - am I being dense?

 

My site is www.art-e-bits.co.uk/catalog/ - is this what it should look like, installing what I have ?

 

Any help would be extremely helpful.

 

regards

Rob

Link to comment
Share on other sites

  • 2 weeks later...

hiya everyone :) i was wondering if someone could tell me if it was possible to use ONLY the info box template from the sts system. The rest of the site template is in place by using the header and footer.

However, i need to get rounded boxes for my info boxes, so both the top and bottom corners are rounded :)

Link to comment
Share on other sites

hi guys..

i had htc working perfectly with sts . i was using htc2.6.3 and sts 2.5.2 bundle.i updated sts to 4.5.5.following the upgrade mention in sts contrib. Sts still works fine. but header tags are no longer working.

 

i checked the databse and if i select fill and clear the tables are being wriiten accordingly.

 

Then i used beyound compare and the orignal htc and sts bundle. and undid all the changes. but i cant seem to get the header tags to show up. i also keep getting this mess

dont know what i have done to upset it..when i upgraded sts i simply changed the core sts files. never touched htc..

 

n sts my setting are

 

Files for normal template

sts_user_code.php;headertags.php

 

any clue any one..

Link to comment
Share on other sites

hi,

when i install STS i got this error :

Fatal error: Cannot redeclare sts_strip_unwanted_tags() (previously declared in c:\wshop\catalog\includes\functions\sts.php:19) in c:\wshop\catalog\includes\functions\sts.php on line 19

 

can someone help me ;)

Link to comment
Share on other sites

You are calling 2 times the files c:\wshop\catalog\includes\functions\sts.php, itself called from c:\wshop\catalog\includes\classes\sts.php, so it means you are calling twice c:\wshop\catalog\includes\classes\sts.php, check your catalog/includes/application_top.php

 

- Chris

Link to comment
Share on other sites

hi guys..

i had htc working perfectly with sts . i was using htc2.6.3 and sts 2.5.2 bundle.i updated sts to 4.5.5.following the upgrade mention in sts contrib. Sts still works fine. but header tags are no longer working.

 

i checked the databse and if i select fill and clear the tables are being wriiten accordingly.

 

Then i used beyound compare and the orignal htc and sts bundle. and undid all the changes. but i cant seem to get the header tags to show up. i also keep getting this mess

dont know what i have done to upset it..when i upgraded sts i simply changed the core sts files. never touched htc..

 

n sts my setting are

 

Files for normal template

sts_user_code.php;headertags.php

 

any clue any one..

Naf, I responded to your post over in the HTC thread. I know Jack sent you over here but this is not really a STS or HTC problem but rather more of an error on how you implemented the installation of the STS upgrade.

 

You should have made all of the STSv4.5.5 upgrade code changes manually verses just copying the files over your existing store. When you copied the files over, you erased all of the prior HTC code that was in your old files.

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

hiya everyone :) i was wondering if someone could tell me if it was possible to use ONLY the info box template from the sts system. The rest of the site template is in place by using the header and footer.

However, i need to get rounded boxes for my info boxes, so both the top and bottom corners are rounded :)

Are you currently using STS? If not, there are easier ways to just get rounded corners. Have you tried using images? If you are using STS, then it is as simple as creating the infobox template the way you want it with the round corners.

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 there :)

I currently am not using the sts system on this particular cart, i was just hoping for a quick way to get rounded corners on both top and bottom of the info boxes, i did however come up with a solution, had to hard code every info box mind you, but it worked :)

 

Are you currently using STS? If not, there are easier ways to just get rounded corners. Have you tried using images? If you are using STS, then it is as simple as creating the infobox template the way you want it with the round corners.
Link to comment
Share on other sites

Hi! What is the easiest way to use different images, tables and code depending on the language? Is it finally possible to use language specific templates using STS? I couldn't find any info obout that in the latest releases manual.

 

I know about the old imagname$langid.gif way but not I need to use not only images but also code and tables depending on language.

 

Would the easiest way be to place that code in the language files and call for it using for example "echo MY_CODE"?

Link to comment
Share on other sites

This subject has been asked several times and I've given directions, but nobody came back to say is it working or not. The point is that you can put php code within your template, so your template can just contains the language detection, and then include the language specific template. Templates are called from within the sts class, so you have to use "global $languages_id;" or something like this to get access to the language.

 

- Chris

Link to comment
Share on other sites

This subject has been asked several times and I've given directions, but nobody came back to say is it working or not. The point is that you can put php code within your template, so your template can just contains the language detection, and then include the language specific template. Templates are called from within the sts class, so you have to use "global $languages_id;" or something like this to get access to the language.

 

- Chris

 

Hi Chris!

 

Thanks. Do you mean if statements within the templates, like if language_id=4, show the following..

or do you mean completely different templates depending on chosen language?

 

The last one would be optimal but anything will do. If possible, please give me an example. I did not understand the "global $language_id" you were referring to. I searched for "languages_id" within this thread but didn't find what I'm looking for.

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