Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hi,

I'm using STS and I have a question regarding fonts.

I'm a coding newbie and this has me a little confused.

 

I want to change the fonts used in the infobox headers and the main text. Do the "viewers" of my site need to have those fonts installed fo them to work properly? I'm assuming I make these changes in stylesheet.css?

 

I also don't really understand the current font code, why are there 3 fonts listed?

 

Any help would be much appreciated as this is one of the last cosmetic changes I need to make :)

 

Thanks

Link to comment
Share on other sites

There is a contribution that allows you to use images as box headers, it's called box header controller or something. Sounds like it will help you out.

 

You are right about people without the font your using not being able to see it, but this can be over come by just using an image as the header :)

Link to comment
Share on other sites

There is a contribution that allows you to use images as box headers, it's called box header controller or something. Sounds like it will help you out.

 

You are right about people without the font your using not being able to see it, but this can be over come by just using an image as the header :)

 

 

I spotted that just now, I'll try it when I get home later. Maybe also make the images clickable.

 

So the 3 fonts listed in the standard code, is it try courier then if no courier try ariel type deal? If thats the case presumably I could change the order as I much prefer ariel over courier.

 

Thanks :)

Link to comment
Share on other sites

Hello,

 

This contrib seems to be very good, however...

 

I install it seemingly fine (after installing osCommerce successfully) and when i view the sample html page it just shows all $categorybox, $manufacturerbox, etc but not the actualy content.

 

What's going on? I cannot find a resolution in the readme or anywhere else thus far.

 

 

Thank you.

Link to comment
Share on other sites

I've got STS working with worldpay, I think the way i had to do it was make the return page to fall out of the template. How i did this i can't remember but will have a look when i get home form work and let you know..

 

Cheers

 

Tim

Edited by TimD
Link to comment
Share on other sites

Apologies if this has been asked before. I did a search and found nothing relevant and, to be honest, I can't be bothered to read through 90 pages of posts just in case.

 

I have got the option to display page parse time switched on. It displays OK but comes AFTER the </html> tag in my sts_template.html file, which causes my page to fail validation :( .

 

Has anyone any idea why this is so?

 

Thanks.

There are 10 types of people in the world. Those who understand binary and those who do not.

 

To understand Recursion, first one must understand Recursion.

Link to comment
Share on other sites

I understand that I can edit the sts_template file to have it look like the current design of my website. Do all of the table datas that are on that page need to remain how they are? Can I simply take the page I have created and rename it sts_template.html and it will work? How do the capture files work? Once my page is created is there something I need to do for the system to make my page work with osCommerce?

 

Thank you!

Link to comment
Share on other sites

Hi

 

You cannot use the template you have in its vanilla state, you would need to edit this template/page to use the tags sts supports.

 

You could slice the template you have up into tables and match the existing sts_ template.html file, then install the required sts tags to call data into the template you have just made.

 

So simple ut, no you cannot use the template you have in its current state, but it can be modified to fit your needs.

 

Hope this helps. :thumbsup:

Link to comment
Share on other sites

You need to insert the STS variables where you want certain OSC features to be displayed in your template. They are listed in the ReadMe file. For example, I believe you insert $categories where you want the categories to display. There are several others.

Link to comment
Share on other sites

Hi there,

 

I'm new to OSCommerce customization, and have recently installed OSCommerce on my site. I found OScommerce STS to be really exciting and useful, but would like to ask if installing it requires overwriting any of my current OSCommerce files?

 

I have added stuff to the original OSCommerce code such as LiveHelp script, etc.

 

Would appreciate your response on this question, thanks!

 

Regards,

Felix

Link to comment
Share on other sites

Hi there,

 

I'm new to OSCommerce customization, and have recently installed OSCommerce on my site. I found OScommerce STS to be really exciting and useful, but would like to ask if installing it requires overwriting any of my current OSCommerce files?

 

I have added stuff to the original OSCommerce code such as LiveHelp script, etc.

 

Would appreciate your response on this question, thanks!

 

Regards,

Felix

 

There are two sets of files in used during the install. New files and changed files. Now it is easier to do the install on a fresh copy of osC but if you have already made changes to your store you can still install STS it just takes longer. In the readme you will see what files will need to be changed, you will just have to make the changes manually instead of overwriting the complete files.

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

Link to comment
Share on other sites

There are two sets of files in used during the install. New files and changed files. Now it is easier to do the install on a fresh copy of osC but if you have already made changes to your store you can still install STS it just takes longer. In the readme you will see what files will need to be changed, you will just have to make the changes manually instead of overwriting the complete files.

 

Thanks Richard. :D

Link to comment
Share on other sites

HI,

 

I'm trying to integrate the Header tags contribution into my STS site and the install for Header Tags says to put the following code into header.php but STS doesn't read header.php does it?

 

<table width="100%" cellspacing="0" cellpadding="0" border="0"); > 
<tr> 
<td align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td colspan="2" align="center" valign="bottom" nowrap>
<?php include(DIR_WS_INCLUDES . 'categories_tab.php'); ?>
</td>
</tr>
</table>
</td>
</tr>
</table>

 

Is there a way that I can use this with STS?

 

Thanks

 

Peter

Link to comment
Share on other sites

HI,

 

I'm trying to integrate the Header tags contribution into my STS site and the install for Header Tags says to put the following code into header.php but STS doesn't read header.php does it?

 

<table width="100%" cellspacing="0" cellpadding="0" border="0"); > 
<tr> 
<td align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td colspan="2" align="center" valign="bottom" nowrap>
<?php include(DIR_WS_INCLUDES . 'categories_tab.php'); ?>
</td>
</tr>
</table>
</td>
</tr>
</table>

 

Is there a way that I can use this with STS?

 

Thanks

 

Peter

 

Where in the readme does it say to add that code to your header.php file? Are you sure you are reading the correct instructions? The header tag code looks like

 

<?php

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// Replaced by header_tags.php

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

require(DIR_WS_INCLUDES . 'header_tags.php');

} else {

?>

<title><?php echo TITLE ?></title>

<?php

}

// EOF: WebMakers.com Changed: Header Tag Controller v1.0

?>

 

The code should already be added to your sts_display_output.php file

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

Link to comment
Share on other sites

Sorry, I made a error when typing this, I shoud have said CATEGORY TABS not header TAGS! (stupid me). I don't know where that came from.

 

The Category Tags contrib I'm trying to put in is found here: http://www.oscommerce.com/community/contributions,1023

 

 

 

HI,

 

I'm trying to integrate the Header tags contribution into my STS site and the install for Header Tags says to put the following code into header.php but STS doesn't read header.php does it?

 

<table width="100%" cellspacing="0" cellpadding="0" border="0"); > 
<tr> 
<td align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td colspan="2" align="center" valign="bottom" nowrap>
<?php include(DIR_WS_INCLUDES . 'categories_tab.php'); ?>
</td>
</tr>
</table>
</td>
</tr>
</table>

 

Is there a way that I can use this with STS?

 

Thanks

 

Peter

Link to comment
Share on other sites

I haven't taken the time to look through all of the other posts, so if you've already covered this, I'm sorry...

 

I'm new to OS Commerce and STS. I've installed everything, but when I go to my online catalog (http://www.hooksandeyes.com/shop), nothing shows up.

 

If anyone knows what's wrong, please let me know what the problem is.

 

Thanks,

Kristina

Link to comment
Share on other sites

Are you sure you spelled the STS variables correctly when you entered them into your template? I've made the mistake of putting the dollar sign after the variable name instead of before it...or is it the other way around?

 

I haven't done anything to it, I've just installed it and it hasn't worked at all. I've done everything correctly, I think, but it's just blank.

Link to comment
Share on other sites

Sorry if this has been covered already, but using STS, how do I change the number of products listed per row? Currently, I have 3 per row and would like it to display only 2.

 

Thanks!

Link to comment
Share on other sites

Hi,

 

I got my site installed with STS template and tried to install the automatic thumbnail contrib. My catalog page went blank. Anyone got this or another thumbnail contrib to work with STS and care to explain it to me.

 

Cheers

 

Giovanna

Link to comment
Share on other sites

Hi,

 

I got my site installed with STS template and tried to install the automatic thumbnail contrib. My catalog page went blank. Anyone got this or another thumbnail contrib to work with STS and care to explain it to me.

 

Cheers

 

Giovanna

 

I've got the same problem, would be great if someone has an answer for this one.

Link to comment
Share on other sites

HOW TO CREATE PRODUCT-SPECIFIC TEMPLATES IN STS:

STS is awesome, but currently you can only create one generic template for all the products.  The code below will allow you to create templates for every single product in your store.  This will allow you to put extra pics on a particular product page, put additional info about a product, and even do cross-selling and upselling.  The possibilities are endless!

 

This code was contributed by Chris Langtiw (screen name: Jaxx), and I take no credit.

 

If you are using STS 2.01, look in sts_display_output.php around line 116 for this code:

 

// Look for category-specific template file like "index.php_1_17.html"
 $sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";

 if (file_exists($sts_check_file)) {
   // Use it
   $sts_template_file = $sts_check_file;
 } 

}

Right below this code (stated above), put this code:

 

///////Product-specific templates (contributed by Chris L.)
// Are we in the product_info.php script?
if ($scriptbasename == "product_info.php") {
// Look to see whether the product id was sent, otherwise don't bother
if (isset($HTTP_GET_VARS['products_id'])) {
  $sts_productid = $HTTP_GET_VARS['products_id'];

  // Look for product-specific template file like "product_info.php_17.html"
  $sts_check_file = STS_TEMPLATE_DIR . "product_info.php_$sts_productid.html";

  if (file_exists($sts_check_file)) {
    // Use it
    $sts_template_file = $sts_check_file;
  } 
}
}
///////

So for example, a template for product with ID=17 would look like: "product_info.php_17.html".

 

*IDEA: Also if you have lots of products, and you want 1 template for say all your computer-related products which have ID's 1-20, you could change the code above a little and add an IF statement to check a range of ID's and then call a specific template for all those products.  I haven't done this myself and so I can't help you out on it, but it seems like it would be easy to do.

 

Anyway, this code works for me.  Hopefully it will work for you guys too!

 

-Philip

 

For some reason, my custom template for product_info.php is not being used. I had followed the guidelines in the STS readme file: "USING PRODUCT_INFO CONTENT TEMPLATES:

-----------------------------------------------------------------------------

Starting with version 2.00 you can now use PRODUCT_INFO TEMPLATES to customize

the $CONTENT section of your product information pages by creating:

 

/catalog/includes/sts_templates/product_info.php.html "

 

but my template was not being referenced. Only changes that I make to product_info.php directly work. Same thing for index.php.html. None of the templates are being used. This is extremely frustrating. Thanks for the help! (Sorry for the brief explanation but I'm in a hurry to head off some where)....

 

Scott

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