Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Has anyone experienced problems with product images in different browsers?

I just realised that in my 'sts_product_info.php' the product image is not shown when using Explorer, but it does using other browsers...

:blink:

Any ideas? What should I do to make Explorer read the images?

Share this post


Link to post
Share on other sites

Is there a way to have different images used for both the infoboxes and the main catalog?

I use a dark background in the infoboxes and light background for the main catalog, for a higher contrast within the site. This means that if the same images are used for both infoboxes and the main catalog, I'll either have dark or light "jaggies", depending on the matte that I use for transparency. This is unappealing, and I would think the easiest solution would be to use two separate images.

Can it be something as simple as storing the infobox images in a separate directory, and then making the appropriate changes within the related files?

Share this post


Link to post
Share on other sites

I was able to do this by adding a column to the database table to hold the new image info and then changing the variable name for the main catalog image. Actually, I have a button for the category infobox, a title graphic for the head of each category page and then a separate image for the main catalog. If you are interested in this kind of change, let me know and I will look through my notes for the specifics.

 

Is there a way to have different images used for both the infoboxes and the main catalog?

I use a dark background in the infoboxes and light background for the main catalog, for a higher contrast within the site. This means that if the same images are used for both infoboxes and the main catalog, I'll either have dark or light "jaggies", depending on the matte that I use for transparency. This is unappealing, and I would think the easiest solution would be to use two separate images.

Can it be something as simple as storing the infobox images in a separate directory, and then making the appropriate changes within the related files?

Share this post


Link to post
Share on other sites

I would start by viewing the source code of your page when it shows the image and then when it doesn't show the image and compare the two to see if there is anything obvious in the output.

 

Has anyone experienced problems with product images in different browsers?

I just realised that in my 'sts_product_info.php' the product image is not shown when using Explorer, but it does using other browsers...

:blink: 

Any ideas? What should I do to make Explorer read the images?

Share this post


Link to post
Share on other sites

Sounds a bit tricky, but I'm more than willing to give it a go. Thanks charmdiva.

 

I was able to do this by adding a column to the database table to hold the new image info and then changing the variable name for the main catalog image. Actually, I have a button for the category infobox, a title graphic for the head of each category page and then a separate image for the main catalog. If you are interested in this kind of change, let me know and I will look through my notes for the specifics.

Share this post


Link to post
Share on other sites
I would start by viewing the source code of your page when it shows the image and then when it doesn't show the image and compare the two to see if there is anything obvious in the output.

 

Well there's nothing obvious at all. It's just weird because both source codes look exactly the same... I think it's just that this script bit won't properly function in Explorer nor Netscape but it does in Safari or Omniweb:

 

<script language="javascript"><!--

document.write('<img src="images/myimage.jpg" border="0" alt="Product 1" title=" Product 1 " width="-1" height="-1" hspace="5" vspace="5">');

//--></script>

 

Any ideas?

:(

Share this post


Link to post
Share on other sites

I don't think I was clear enough with charmdiva, either that or she's already bailed out for the holidays and is taking a media fast. Charmdiva, I'd love it if you were to share your notes and specifics on the changes you've made.

 

That being said, I keep coming back and posting questions that I know have easy answers. It makes me feel like a fool, but I haven't done any coding or web design in a few years. So I'm more than a bit rusty. What I would like to do is have the "New products for *" be only two columns wide, and sit against the right side of the content area. I'd also like to place the text and price to the right of the product images, and have a simple sentence or two along with it. And then also sit off the bottom of the content area. Kind of frame this box on three sides with some white space, instead of just going edge to edge to edge. It makes the design look a little cramped, so I'm wanting to open it up a little more. Only thing is, I can't figure out how to make the changes. I'm pretty sure that the infobox is being made by catalog/includes/modules/new_products.php

 

To see where I'm at and what I've done goto http://www.outerworldadult.com/catalog I still haven't put in the store content yet, so it's just osC default content, and things are more than a little rough. Also if there are any really glaring issues, please let me know.

Share this post


Link to post
Share on other sites

Hi,

 

If you have STS installed the lay out of the site (size of boxes and where they are) are done in the sts_template.html. The best thing i can say is to open up the template in DW or Frontpage and there you will see how the boxes are setup with all the different sections. To make changes i would say find a good html tutorial site. I did and it helped me understand the coding of the columns and rows. You have to see it as a big table in word and you need to change the width and lenght of some columsn and rows.

 

HTH

 

Giovanna

Share this post


Link to post
Share on other sites

Good advice except that what I want to change happens within $content and is not controlled by the STS template.

 

Hi,

 

If you have STS installed the lay out of the site (size of boxes and where they are) are done in the sts_template.html. The best thing i can say is to open up the template in DW or Frontpage and there you will see how the boxes are setup with all the different sections. To make changes i would say find a good html tutorial site. I did and it helped me understand the coding of the columns and rows. You have to see it as a big table in word and you need to change the width and lenght of some columsn and rows.

 

HTH

 

Giovanna

Share this post


Link to post
Share on other sites

http://www.whatsursign.com/catalog/ looks fine to me.

 

Peter

 

Could someone please check out this link and tell me what's up with sts? I can't figure out why the $tags don't do anything.

 

http://www.whatsursign.com/catalog/include...s_template.html

 

I'm not very good at PHP or HTML for that matter. I'm trying to get a catalog going for novelty signs that my wife and I make.

Share this post


Link to post
Share on other sites

I think what ppollock is trying say deserves a little more explanation. The /catalog/includes/sts_template.html controls what is shown at http://www.whatsursign.com/catalog/index.php Your visitors actually never see the sts_template.html.

 

That being said, you can use the sts_template.html and /catalog/index.php together to see what the sts_template.html does control. Use two web browsers, or have two tabs open in one browser. Point one browser/tab to http://www.whatsursign.com/catalog/ and the other browser/tab to http://www.whatsursign.com/catalog/include...s_template.html now when you switch between the two, you can see $cataloglogo shows up as your catalog logo and $categorybox shows up as your categories infobox.

It might be easier to think of sts_template.html as a map that you can change to direct how you want your catalog to look. So when you edit and alter sts_template.html review your work at http://www.whatsursign.com/catalog/index.php And as always, be sure to make backups before you change or alter anything.

 

Com'on back with any more questions, and have fun.

 

Could someone please check out this link and tell me what's up with sts? I can't figure out why the $tags don't do anything.

 

http://www.whatsursign.com/catalog/include...s_template.html

 

I'm not very good at PHP or HTML for that matter. I'm trying to get a catalog going for novelty signs that my wife and I make.

Share this post


Link to post
Share on other sites

I had installed oscommerce with the register_globals off contribution but now I just installed the simple template system and it gives me the following error:

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

I was wondering if anybody could help me get the simple template system to work with register globals off, or if anybody could supply me with an alternitive that would work just the same...

Thank You.

Share this post


Link to post
Share on other sites

I learned that when STS is installed, the stylesheet is pointless as STS doesn't call any fonts, etc from the stylesheet. Now, my question is how do I edit the fonts with STS. I can't simple put a font tag over the breadcrumb (example) and it chages the font because when the function is called, it separates itself with tables, and thus the font tag is useless outside a (table) tag. If anyone can help me, I'll give you a dollar. :)

Share this post


Link to post
Share on other sites

STS will call the stylesheet, you need to use the full link url

i.e. <link rel="stylesheet" type="text/css" href="http://www.**YOUR-SITE-URL**.com/catalog/stylesheet.css">

 

I did have to do some messing around in the stylesheet.css to make it work, and make sure to add the class= to the relevant html (it sure was an embarassing day when I forgot to do that). The font tags just don't cut it, so forget about them. Keep working with it, and you can make it work. If you keep having issues, post back with your site url and ?ber specific details.

 

I learned that when STS is installed, the stylesheet is pointless as STS doesn't call any fonts, etc from the stylesheet.  Now, my question is how do I edit the fonts with STS.  I can't simple put a font tag over the breadcrumb (example) and it chages the font because when the function is called, it separates itself with tables, and thus the font tag is useless outside a (table) tag.  If anyone can help me, I'll give you a dollar. :)

Share this post


Link to post
Share on other sites
STS will call the stylesheet, you need to use the full link url

i.e. <link rel="stylesheet" type="text/css" href="http://www.**YOUR-SITE-URL**.com/catalog/stylesheet.css">

 

I did have to do some messing around in the stylesheet.css to make it work, and make sure to add the class= to the relevant html (it sure was an embarassing day when I forgot to do that). The font tags just don't cut it, so forget about them. Keep working with it, and you can make it work. If you keep having issues, post back with your site url and ?ber specific details.

 

You should not need to do anything special for the sts template to call the stylesheet. I have used it on quite a few sites without any problems. The issue is not that the stylesheet is not being called but that there are font tags in the sts_template.html file and they are overriding the stylesheet. Remove the tags and you can make all the normal changes from the stylesheet just like a default install of osC.

 

For example this is how the sts template looks after you install it.

 

<tr class="headerNavigation">

<td><font size="1" face="Arial, Helvetica, sans-serif">$breadcrumbs</font></td>

<td><div align="right"><font size="1" face="Arial, Helvetica, sans-serif">$myaccountlogoff

| $cartcontents | $checkout</font></div></td>

</tr>

 

If you want to use the stylesheet just remove the font tags so it looks like

 

<tr class="headerNavigation">

<td>$breadcrumbs</td>

<td><div align="right">$myaccountlogoff

| $cartcontents | $checkout</div></td>

</tr>

 

Now you can control your breadcrumb fonts using the style sheet. The best thing to do is remove all the font tags from the sts_template.html file and then you can make your changes normally in the stylesheet.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

Hello People,

 

I was wondering if this is possible to do with STS. I know that when a template is created, the language of the default page will stay with the template. But how about you want to switch the language to lets say spanish. How can we change the words on the template to match that language. Can Someone elaborate on that? Is this possible?

Share this post


Link to post
Share on other sites

Sorry I didn't reply sooner. My online business really went well for the Christmas shopping season and we've been packing up and shipping boxes like crazy for the past two weeks or so. I need to dig out my notes to refresh my memory on how I did this but basically I added a new table column to hold the name of the second image and then made a change in the code to call the correct image. Unless this is something you need done immediately, give me until Monday (after the holiday) to get it to you? Merry Christmas to all of those who celebrate!

 

I don't think I was clear enough with charmdiva, either that or she's already bailed out for the holidays and is taking a media fast. Charmdiva, I'd love it if you were to share your notes and specifics on the changes you've made.

 

That being said, I keep coming back and posting questions that I know have easy answers. It makes me feel like a fool, but I haven't done any coding or web design in a few years. So I'm more than a bit rusty. What I would like to do is have the "New products for *" be only two columns wide, and sit against the right side of the content area. I'd also like to place the text and price to the right of the product images, and have a simple sentence or two along with it. And then also sit off the bottom of the content area. Kind of frame this box on three sides with some white space, instead of just going edge to edge to edge. It makes the design look a little cramped, so I'm wanting to open it up a little more. Only thing is, I can't figure out how to make the changes. I'm pretty sure that the infobox is being made by catalog/includes/modules/new_products.php

 

To see where I'm at and what I've done goto http://www.outerworldadult.com/catalog I still haven't put in the store content yet, so it's just osC default content, and things are more than a little rough. Also if there are any really glaring issues, please let me know.

Share this post


Link to post
Share on other sites

I really appreciate the help. I modified the sts_template.html page and it did make the correct changes on the catalog/index.php page.

 

I was wondering about changing other pages. Is there a way to use STS on my product pages or does it only work for the main index.php page? I was also wondering if there is a way to change the image size for my products?

 

I think what ppollock is trying say deserves a little more explanation. The /catalog/includes/sts_template.html controls what is shown at http://www.whatsursign.com/catalog/index.php Your visitors actually never see the sts_template.html.

 

That being said, you can use the sts_template.html and /catalog/index.php together to see what the sts_template.html does control. Use two web browsers, or have two tabs open in one browser. Point one browser/tab to http://www.whatsursign.com/catalog/ and the other browser/tab to http://www.whatsursign.com/catalog/include...s_template.html now when you switch between the two, you can see $cataloglogo shows up as your catalog logo and $categorybox shows up as your categories infobox.

It might be easier to think of sts_template.html as a map that you can change to direct how you want your catalog to look. So when you edit and alter sts_template.html review your work at http://www.whatsursign.com/catalog/index.php And as always, be sure to make backups before you change or alter anything.

 

Com'on back with any more questions, and have fun.

Share this post


Link to post
Share on other sites

I've got a brick & mortar store, so I fully understand about being busy this time of year. If you'd rather wait until after the first of the year, I can wait. I know that we'll still be extremely busy until about the 10th of January, plus there are other things I can be doing with the site. Thanks for keeping me updated, and have a Merry Christmas yourself.

 

Sorry I didn't reply sooner. My online business really went well for the Christmas shopping season and we've been packing up and shipping boxes like crazy for the past two weeks or so. I need to dig out my notes to refresh my memory on how I did this but basically I added a new table column to hold the name of the second image and then made a change in the code to call the correct image. Unless this is something you need done immediately, give me until Monday (after the holiday) to get it to you? Merry Christmas to all of those who celebrate!

Share this post


Link to post
Share on other sites
Hello People,

 

I was wondering if this is possible to do with STS.  I know that when a template is created, the language of the default page will stay with the template.  But how about you want to switch the language to lets say spanish.  How can we change the words on the template to match that language.  Can Someone elaborate on that?  Is this possible?

 

Any text that you add directly to the template will not change. Any content that uses your $tags should change just like it would without using sts. The best thing to do if you are using more than one language is to not add text or content directly to the template but via the osC files and the $tags.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

You can use multiple template files begining with STS v1.8 read through your README.txt file, and the instructions are under "using multiple template files". If you need more help, come on back and ask again.

As far as image sizes go, you can change the image sizes in your admin directory ( http://www.YOURSITEURL.com/catalog/admin/ ) under configuration> images.

 

I really appreciate the help. I modified the sts_template.html page and it did make the correct changes on the catalog/index.php page.

 

I was wondering about changing other pages. Is there a way to use STS on my product pages or does it only work for the main index.php page? I was also wondering if there is a way to change the image size for my products?

Share this post


Link to post
Share on other sites

STS DOES NOT SEEM TO WORK WITH SUB-CATEGORY PAGES!

 

I cannot get STS to work with subcategory template pages. You can jump between the main categories just fine without any problems. However, if you try and jump to a subcategory page, the page will display fine but all the links on the page will be messed up, and from then on the whole site will be messed up because you will be following bad hyperlinks. STS seems to have a problem with subcategories because of the double # system: http://www.mysite.com/index.php/cPath/XX_XX.

 

Has anyone else experienced this problem??? Try it for yourself and see! Any ideas for fixing this?

Share this post


Link to post
Share on other sites

Can someone kind enff to put your link here and see how is the image look like after installation this contribution.

 

Tks

Share this post


Link to post
Share on other sites
STS DOES NOT SEEM TO WORK WITH SUB-CATEGORY PAGES!

 

I cannot get STS to work with subcategory template pages. You can jump between the main categories just fine without any problems. However, if you try and jump to a subcategory page, the page will display fine but all the links on the page will be messed up, and from then on the whole site will be messed up because you will be following bad hyperlinks. STS seems to have a problem with subcategories because of the double # system: http://www.mysite.com/index.php/cPath/XX_XX.

 

Has anyone else experienced this problem??? Try it for yourself and see! Any ideas for fixing this?

 

Ok, I tried this out again and here is the problem. If I use the links in the category box to jump to a subcategory page, than everything works fine. However, if I have a link on the subcategory page like "$urlcat_25" then that link will not work. STS doesn't read the link/output it correctly and it messes up. Try it on your own site! This is a bug in STS!!

 

Any know a way to fix this? Diamond Sea?

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

×