Jump to content
Latest News: (loading..)
rigadin2

[Contribution] STS v4

Recommended Posts

Hi Bill,

 

I had some problem with a css menu a little while back and managed to solve it. It came down to the doctype, needed to be xhtml.

 

After changing the doctype to xhtml and then further editing the template, I've noticed that the STS css menu doesn't work in IE now.

 

Any ideas into solving the problem?

 

The site can be seen here: http://www.jbphotos.com.au/new/catalog/

 

Thanks,

Jeremy

 

Jeremy, the doctype is an important piece of the puzzle, that if incorrect, it could cause unpredictable results. The sample templates that come with the contribution use a doctype that should work most of the time but depending upon the language and region of your store, you may need to customize it. Each browser is different in rendering code and looks to the doctype for instructions, some more fogiving than others.

 

Look at the following for more info on doctypes:

http://www.alistapart.com/stories/doctype/


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 just installed the STS 4.4 or 4.5 version and am getting the "Fatal error: Cannot redeclare class sts_default..."

 

I tried renaming the sts_default.php to *.old, but then I received a similar error as above except "...sts_index...".

 

I assume the issue isn't with either file, but either the admin box or something.

 

I'm working offline with this package.

 

Thanks

Tim, I forgot to mention that your issue may be related to a misconfigured STS module in the admin. Change everything back to the default settings and then go from there.

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 originally posted this in the other STS thread but as I'm using version 4.58 *or whatever its called* so I thought this thread was more appropriate)

 

Hi, I am just getting my site sorted. http://design.mmmboptastic.com using STS. I have it using the 'test' template instead of the 'full' one as I don't understand the 'full' one enough.

 

At the bottom I want to have my links (about, faq, links, contact etc) but I don't want to use the 'information' box (I found it impossible to add pages with that function!). Is there a way of doing this? So if someone clicks on 'About' it opens store.com/about.html (or .php) which is a page that has the 'about' information where $content usually is and then the other bits like 'account' etc where theyusually are.

 

I uploaded about.php to the root http://design.mmmboptastic.com/about.php but as you can see it doesn't work how I want it to.

 

Hope you understand what I'm trying to explain.

 

Thanks

Jo

Share this post


Link to post
Share on other sites
(I originally posted this in the other STS thread but as I'm using version 4.58 *or whatever its called* so I thought this thread was more appropriate)

 

Hi, I am just getting my site sorted. http://design.mmmboptastic.com using STS. I have it using the 'test' template instead of the 'full' one as I don't understand the 'full' one enough.

 

At the bottom I want to have my links (about, faq, links, contact etc) but I don't want to use the 'information' box (I found it impossible to add pages with that function!). Is there a way of doing this? So if someone clicks on 'About' it opens store.com/about.html (or .php) which is a page that has the 'about' information where $content usually is and then the other bits like 'account' etc where theyusually are.

 

I uploaded about.php to the root http://design.mmmboptastic.com/about.php but as you can see it doesn't work how I want it to.

 

Hope you understand what I'm trying to explain.

 

Thanks

Jo

Yes, this is the correct forum but I just responded to your other post.


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

 

I can't really go into detail on how to use Beyond Compare as that is "beyond" the scope of this forum but I can offer a link that does:

http://cropwiki.irri.org/everest/index.php...ository_compare

 

Basically, I suggest downloading your entire store to your PC and make a copy for safe keeping as well. Use BeYond Compare to do a file comparison of the downloaded store files and that of the contribution. BeYond Compare will show you the folders and files that are different. You then could merge in the changes to your downloaded store files. Once finished, you would upload the modified store files to your server to over-wright your current files. *Beyond Compare makes a backup copy of any files that you modifiy by placing a .bak extension to the end of the original file but it is still best to keep an entire backup of your store on your PC for safe keeping "just in case".

 

Regarding the STS User Manual, you will need Microsoft Word. I do have the manual in a PDF format if you need it (just let me know).

 

Hope this helped,

 

 

Thank you bill...could you send me the pdf? I tried to convert the word doc topdf myself but that is when it wants to convert to flash paper...thought it was my computer, but it's doing the same thing on my mother's computer. Could you email it to me? My email is leahmerrill <at> hotmail.com.

 

thanks.

 

leah

Share this post


Link to post
Share on other sites

Hey again Bill...sorry to throw all these 'replies' at you, but the major hump I'm trying to get over is just the basic installation of the STS.

 

This is where I'm at in the installation process:

 

"After installation, STS is disabled. You can enable STS as well as optional features from the admin side, like you do with payment or shipping modules."

 

 

...After I log into my admin and when I click on 'modules'...'STS'...all that is there is a string just showing me where my sts file is:

 

Module Directory: /home2/shessofo/public_html/nomoreuglyjars/catalog/includes/modules/sts/

 

but in the installation instructions it's showing that it should have 4 modules for 'default', 'index', 'product', and 'popup images'....

Might you know what I've done wrong now?

 

Leah

Share this post


Link to post
Share on other sites
Hey again Bill...sorry to throw all these 'replies' at you, but the major hump I'm trying to get over is just the basic installation of the STS.

 

This is where I'm at in the installation process:

 

"After installation, STS is disabled. You can enable STS as well as optional features from the admin side, like you do with payment or shipping modules."

 

 

...After I log into my admin and when I click on 'modules'...'STS'...all that is there is a string just showing me where my sts file is:

 

Module Directory: /home2/shessofo/public_html/nomoreuglyjars/catalog/includes/modules/sts/

 

but in the installation instructions it's showing that it should have 4 modules for 'default', 'index', 'product', and 'popup images'....

Might you know what I've done wrong now?

 

Leah

Yes, you are missing some of the files from the installation, specifically on the admin side. If you are sure that you uploaded all of the necessary files and made the necessary modifications to the existing files, you may have a bad FTP software that is not uploading correctly (it's been known to happen).


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! or anyone who can help me, I'm officially desperate.

 

I'm new to OSC and STS and had my new store up and running great with just some design tweaks left I wanted, i.e. installed the products listing to columns and adding a buy-now button option. Both add-ons worked great when adding into my code.

 

However, somewhere along the way since adding those add-ons, it appears my home page is not working and I need to have the site finished for my customer this week. Panic mode here. It seems to be a problem in the templates for the home page. My home page is only showing a white page with the "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?"

 

Here's my site link www.abbyrosejewelry.com/index.php

 

The rest of the site is fine, for example

 

www.abbyrosejewelry.com/index.php?cPath=21

 

If I click back to the home page while on any other page that is working fine, then I get just a white page that says "categories" and shows the an image and the 4 main categories links of my store.

 

www.abbyrosejewelry.com/index.php?cPath=0

 

I cannot figure out what has happened on my home page since all other pages in the site are fine. I've been backtracking and cannot seem to find what I've messed up. Any ideas what I've done? Help, I'm desperate.


Newbie to OSCommerce, but catching on quickly! I follow directions well. :) SMILE -- It only makes people wonder what you're up too!

Share this post


Link to post
Share on other sites
Yes, you are missing some of the files from the installation, specifically on the admin side. If you are sure that you uploaded all of the necessary files and made the necessary modifications to the existing files, you may have a bad FTP software that is not uploading correctly (it's been known to happen).

 

I don't know...I'm pretty frustrated...I have re-uploaded and re-edited the files specified in the instruction manual, but still can't see anything. The files seem to match perfectly so I know that the ftp is working correctly. It sais that the module directory is here:

 

Module Directory: /home2/shessofo/public_html/nomoreuglyjars/catalog/includes/modules/sts/

 

and I noticed that in that .../modules directory, there is only a folder named 'sts_inc', but not 'sts'...not sure if that's significant or not.

 

Usually when I have issues like this, it's something really stupid like syntax errors...can you tell me if when I edited the code, if perhaps I made some kind of error?

 

If I send you my login info, could maybe you take a quick look for me?

 

leah

Share this post


Link to post
Share on other sites

Hello

One simple question if anyone can help ...

in STS template I have variables like that:

 

$regularprice$ or $specialprice$

 

how can i access them from the template, in order to use them ?

 

i tried <? echo $regularprice; ?> but id doesn't work...

 

in the sts template of product_info.php.html i have other php code that really work (echo, product images etc....)

but i don;t know how to access the STS variable s from php///

 

Anyone can help ?

 

Thanks a lot.

Share this post


Link to post
Share on other sites
and I noticed that in that .../modules directory, there is only a folder named 'sts_inc', but not 'sts'...not sure if that's significant or not.

 

leah

There you go...as I said in the previous post, you are missing files from the contribution. You need to upload ALL of the files/folders from the "STS" folder as well as merge in the differences from the files/folders in the "Files for RC2" folder (or whichever version of osCommerce that you have).

 

Take your time and be sure that you have all of the STS files uploaded first. Then, either merge in the differences from the "Files for RC2" folder or upload all of these files to replace your existing ones. NOTE: If you choose the "replace" method, you will lose any modifications that you previously made to these files.


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! or anyone who can help me, I'm officially desperate.

 

I'm new to OSC and STS and had my new store up and running great with just some design tweaks left I wanted, i.e. installed the products listing to columns and adding a buy-now button option. Both add-ons worked great when adding into my code.

 

However, somewhere along the way since adding those add-ons, it appears my home page is not working and I need to have the site finished for my customer this week. Panic mode here. It seems to be a problem in the templates for the home page. My home page is only showing a white page with the "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?"

 

Here's my site link www.abbyrosejewelry.com/index.php

 

The rest of the site is fine, for example

 

www.abbyrosejewelry.com/index.php?cPath=21

 

If I click back to the home page while on any other page that is working fine, then I get just a white page that says "categories" and shows the an image and the 4 main categories links of my store.

 

www.abbyrosejewelry.com/index.php?cPath=0

 

I cannot figure out what has happened on my home page since all other pages in the site are fine. I've been backtracking and cannot seem to find what I've messed up. Any ideas what I've done? Help, I'm desperate.

Dianna, I went to your site and it looks like you got it working as the home page was pulling in the data.


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

One simple question if anyone can help ...

in STS template I have variables like that:

 

$regularprice$ or $specialprice$

 

how can i access them from the template, in order to use them ?

 

i tried <? echo $regularprice; ?> but id doesn't work...

 

in the sts template of product_info.php.html i have other php code that really work (echo, product images etc....)

but i don;t know how to access the STS variable s from php///

 

Anyone can help ?

 

Thanks a lot.

I don't really understand what you are wanting to do here. The $regularprice$ tag is written to only function in the product_info templates. If you are wanting to use them in the other template pages such as your default template (sts_template.html) or any of your category pages (index.php.html), you would have to define them in your sts_user_code.php file.

 

If you add them to your sts_user_code.php file, it will look like this (you will notice that I added the code just before the last closing PHP statement ?>):

 

Open the your store catalog folder/includes/modules/sts_inc/sts_user_code.php file and add the following just before the last ?>

 

// Add the hidden form variable for the Product_ID
$sts->template['startform'] .= tep_draw_hidden_field('products_id', $products_id);
$sts->template['endform'] = "</form>";
$sts->template['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
// Get product information from products_id parameter
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);

$sts->template['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $sts->template['regularpricestrike'] = "<s>" . $template_pinfo['regularprice'] . "</s>";
  $sts->template['specialprice'] = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
  $sts->template['specialprice'] = '';
  $sts->template['regularpricestrike'] = $template_pinfo['regularprice'];
}

$sts->template['productname'] = $product_info['products_name'];
$sts->template['productmodel'] =  $product_info['products_model'];

$sts->template['productquantity'] = $product_info['products_quantity'];

 

Now add the $startform $regularprice $endform (all three, in that order) anywhere in your template how ever many times that you need the regular price for each product.

 

Basically, I took the variable define from the includes/modules/sts_inc/product_info.php file and defined them to be used for any of the templates, not just the product_info content template.

 

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
There you go...as I said in the previous post, you are missing files from the contribution. You need to upload ALL of the files/folders from the "STS" folder as well as merge in the differences from the files/folders in the "Files for RC2" folder (or whichever version of osCommerce that you have).

 

Take your time and be sure that you have all of the STS files uploaded first. Then, either merge in the differences from the "Files for RC2" folder or upload all of these files to replace your existing ones. NOTE: If you choose the "replace" method, you will lose any modifications that you previously made to these files.

 

Yeah...got it!!!..I wasn't kidding when I said I am computer-stupid!!! Now, I've just got to read on to see where I go from here. It's not that big of a deal, but if you get a chance, it'd be great to be able to print out the manual. Since I stare at a screen most the day, I take any opportunity to read anywhere other than a computer screen if you know what I mean. Could mabe you email it to me at leahmerrill@hotmail.com in the pdf format?

 

thanx a million!

 

Leah

Share this post


Link to post
Share on other sites
Yeah...got it!!!..I wasn't kidding when I said I am computer-stupid!!! Now, I've just got to read on to see where I go from here. It's not that big of a deal, but if you get a chance, it'd be great to be able to print out the manual. Since I stare at a screen most the day, I take any opportunity to read anywhere other than a computer screen if you know what I mean. Could mabe you email it to me at leahmerrill@hotmail.com in the pdf format?

 

thanx a million!

 

Leah

Yes, I will email it to you tonight. Sorry...I forgot that you had asked for it in PDF.


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

 

great contribution... and great thread support...

 

 

But now i having dificult to put a Add to Cart button on my index page. I know that isnt have a placeholder for a buy now on index templates, but someone knows any tip to sugest me that possibilite put a button buy now or add to cart on my index page?

 

I tried this: <a href=http://www.factoryretails.com/index.php?action=buy_now&products_id=39><img src="images/add_cart.gif" alt="Add To Cart" border="0"></a><br><br>

 

but without success... because doesnt add nothing on my cart...

 

Rafael


OScommerce Rocks!

Share this post


Link to post
Share on other sites
Hi Fellows...

 

great contribution... and great thread support...

 

 

But now i having dificult to put a Add to Cart button on my index page. I know that isnt have a placeholder for a buy now on index templates, but someone knows any tip to sugest me that possibilite put a button buy now or add to cart on my index page?

 

I tried this: <a href=http://www.factoryretails.com/index.php?action=buy_now&products_id=39><img src="images/add_cart.gif" alt="Add To Cart" border="0"></a><br><br>

 

but without success... because doesnt add nothing on my cart...

 

Rafael

 

STS already has a built in $addtocartbutton but is only available in the product_info template. The following will modify this tag so that it can be used in any template that you desire:

 

 

Open the your store catalog folder/includes/modules/sts_inc/sts_user_code.php file and add the following just before the last ?>

$products_id=intval($_GET['products_id']);
// Create variables for product ID, added in v4.0.6 
//$template_pinfo['productid'] = $products_id; // Deprecated in STS4.3SP1
$sts->template['productsid'] = $products_id; // Just for consistende with osC names

// Start the "Add to Cart" form
$sts->template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$sts->template['startform'] .= tep_draw_hidden_field('products_id', $products_id);
$sts->template['endform'] = "</form>";
$sts->template['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

Now add the $startform $addtocartbutton $endform (all three, in that order) anywhere in your table how ever many times that you need the Add To Cart Button for each product.

 

Basically, I took the variable define from the includes/modules/sts_inc/product_info.php file and defined them to be used for any of the templates, not just the product_info content template.

 

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
STS already has a built in $addtocartbutton but is only available in the product_info template. The following will modify this tag so that it can be used in any template that you desire:

 

 

Open the your store catalog folder/includes/modules/sts_inc/sts_user_code.php file and add the following just before the last ?>

$products_id=intval($_GET['products_id']);
// Create variables for product ID, added in v4.0.6 
//$template_pinfo['productid'] = $products_id; // Deprecated in STS4.3SP1
$sts->template['productsid'] = $products_id; // Just for consistende with osC names

// Start the "Add to Cart" form
$sts->template['startform'] = tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
// Add the hidden form variable for the Product_ID
$sts->template['startform'] .= tep_draw_hidden_field('products_id', $products_id);
$sts->template['endform'] = "</form>";
$sts->template['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

Now add the $startform $addtocartbutton $endform (all three, in that order) anywhere in your table how ever many times that you need the Add To Cart Button for each product.

 

Basically, I took the variable define from the includes/modules/sts_inc/product_info.php file and defined them to be used for any of the templates, not just the product_info content template.

 

Hope this helped,

 

 

great kellum.. fast reply

 

The button appeared on index page... nice...

 

but im still dont know how i link this specific add to cart button with a specific product, like e.g.: id's.. 39, 38, 37...

 

i used this: <a href=http://www.factoryretails.com/touch-diamond-phone-90018001900-free-unlo-p-39.html>$addtocartbutton</a><br><br>

 

but the button only bring to page...

 

i used this too: <a href=http://www.factoryretails.com/index.php?action=buy_now&products_id=39>$addtocartbutton</a><br><br>

 

but this doesnt add the product to cart. :( :( :(


OScommerce Rocks!

Share this post


Link to post
Share on other sites

Thanks bill

What i am trying to do is to check if the price has one value :-&

For example if the value of $regularprice$ is 40 i will render a green button etc....

I need to extract the value in php... and i need it in template.. i feel is faster...

So what do you think i should do ?

 

STS is a very nice tool indeed, keep the good work.

Share this post


Link to post
Share on other sites

:huh: if I put like that in sts_user_code:

 

$sts->template['specialprice'] = "<div style=\"float:left;z-index:100;margin-left:0px;margin-top:-80px;position:relative;font-size:20px;font-weight:bold;font-family:Georgia;color:#fff;width:150;height:74px;padding-top:30px;padding-left:25px;text-align:justify;background:url(/img/pret.png) no-repeat;\">" . $sts->template['specialprice'] . "</div>";

 

it still shows me with no <div> ... only the price ....

what i am doing wrong ? :unsure:

 

Thanks.

Share this post


Link to post
Share on other sites
Yes, I will email it to you tonight. Sorry...I forgot that you had asked for it in PDF.

 

Thank you for sending me that. I was able to print it off with no problem.

 

I love this STS thing!!!

 

If you look on my tester site, www.nomoreuglyjars.com, you can see that I was able to get my leftnav flash menu bar up. I hope I did it right...I just made sure to set (in my admin) 'Use Template for Infoboxes' to 'True' and then in the ...full/index.php.html file, I replaced the $categorybox with the code. I was told that you can link each button without disturbing the php by this:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

 

But I'm still not able to link the buttons. But I'm not even sure where to get the actual "Category Name"? For example, for the Mini Skirt Sets, I used:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Mini Skirt Sets</a>

 

Is that correct, or might the category name be a numerical instead?

Share this post


Link to post
Share on other sites
Thank you for sending me that. I was able to print it off with no problem.

 

I love this STS thing!!!

 

If you look on my tester site, www.nomoreuglyjars.com, you can see that I was able to get my leftnav flash menu bar up. I hope I did it right...I just made sure to set (in my admin) 'Use Template for Infoboxes' to 'True' and then in the ...full/index.php.html file, I replaced the $categorybox with the code. I was told that you can link each button without disturbing the php by this:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

 

But I'm still not able to link the buttons. But I'm not even sure where to get the actual "Category Name"? For example, for the Mini Skirt Sets, I used:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Mini Skirt Sets</a>

 

Is that correct, or might the category name be a numerical instead?

 

Leah,

 

Take a look at what the code is saying (or doing for that matter).

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

This code snippit is linking to category ID 21 which is named "Category Name Here". The bold red items should be modified to ID of the category that you are linking to and the name can be whatever you want to name that particular category.

 

Regarding how to find the category ID numbers is very simple. View your store in your browser and either place your curser over a category or click on it. If you click on it you will see something like this in the address bar:

http://soundsgoodpro.com/eshop/index.php?cPath=26

The cPath=26 is the category ID.

The product ID is the same way. If you click on a product in that category you will see something like this in the address bar:

http://soundsgoodpro.com/eshop/product_inf...;products_id=58

The products id=58 is the Product ID.

 

Now, you will use that information to create your templates.

STS can use one template for every page in your shop or you can create a template specific to individual pages in your shop. Its up to you.

If you only want one template, you would set it as the default template and it will be used for every page that does not have a custom template.

 

STS template structure:

It is best to save your default template file as sts_template.html. Then, you would stipulate this in the STS “Default” module in the admin panel. The “sts_template.html” file would be used for all pages in your shop that you have not created a custom template for.

Now, regarding custom templates for specific pages: First you need to understand how STS “searches” to see if a custom template is available. There is a flow chart in the STS docs folder to show how this works. As an overview of the process, it works like this:

 

• If you wanted to create a template for Category 3, which is the “out of the box” osCommerce “Hardware” category, you would create a template and save it as “index.php_3.html”.

• Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above):

Create a template and save it as “index.php_3_9.html” to be used as a template for the “out of the box” category “Hardware” and sub-category “Mice”. Now this template will be used each time a visitor opens up the “mice” sub-category (sub-category 9) in your store. Keep in mind that the template for Category “Hardware” (Category 1) is totally independent of the template you just created for sub-category 9 "Mice".

 

When creating templates for specific osCommerce pages such as specials.php, login.php, reviews.php, etc., then the format you would use is simply: scriptname.php.html. So the template for specials.php would be specials.php.html and this would be added to your sts_templates/*your_template_folder*/.

 

When it comes to your product pages:

 

Create One Template for All Products within a Specific Category:

 

You can have a template for all of your products inside a specific category by adding the category ID to the template name. For example:

 

Let say you have a category 22 inside category 11, and want all products in category 22 to use the same content template. You have to create a template and name it “product_info.php_c11_22.html” and place it inside the “content” folder (like catalog/includes/sts_templates/full/content/).

 

Create a Content Template to be used for All Products:

 

As in the example above, you can create a content template named “product_info.php_c11.html” that would be used for all products inside category 11 INCLUDING sub-categories (unless subcategories have their own template).

 

Now, as you probably already know, content templates are only for the center of the page. If you want to have a different header/columns/footer for products in a category 22, you have to create a template named “product_info.php_c11_22.html” and place it your template folder (not in the content folder), for example: catalog/includes/sts_templates/*your template folder*/.

 

For more detailed information, see chapter 3, sections 6-10 of the STS documentation.

 

So, as the manual mentions, STS is quite versatile allowing you to keep it "simple" or very complex.

 

OK. Sorry for such a long post but I 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

Hi,

 

I have installed STS + HTC succesfully and I have added newpages to my shop.

The problem is; For all pages the HTC works fine, except for the added new pages.

When I fill the title and description in de HTC admin, it doesn't work. When I push the preview button, all the bars are red.

When I look at the source, it's like any other page, but not filled.

Does anybody know whats going on?

You can find my site at www.donzendekbed.com (on the dark blue bar there are my new added pages)

 

Tanx

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

×