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

[Contribution] STS v4

Recommended Posts

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

Dirk,

You need to add these new pages into the HTC admin section to let HTC know that they exist. Use the Page Control option in HTC and manually add in the page names such as about_us.php and so on.


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

You need to add these new pages into the HTC admin section to let HTC know that they exist. Use the Page Control option in HTC and manually add in the page names such as about_us.php and so on.

 

But in the HTC admin I can see the new pages! there in the list. But I can't modify the tags?

see screenshot:

HTC1.jpg

HTC2.jpg

Share this post


Link to post
Share on other sites

Hi

 

I originally posted this in the Header Tags SEO forum (http://forums.oscommerce.com/index.php?s=&showtopic=298099&view=findpost&p=1326022), but Jack suggested I post it here instead (slightly edited so that it makes sense in this forum!):

 

I installed the HT SEO as per the instructions and with STS turned off (and with the header code added to the pages) it works fine.

 

Once I turn on STS and remove the header code (the if statement around the title tag) then all I get is the default store name. I have added the STS only file and the headertags.php filename to the "files for normal template" in sts admin.

 

It seems to me (although I can't get my head around the order things are done in STS) that the capture code in the headertags.php file is not being run, or that the "headertags" output is being overwritten before it is inserted into the "headcontent" output.

 

Any ideas?

 

Another thing is that when you click the "view results" in the page control admin with STS off it shows the correct title/keywords/desc (all in yellow), but once it is on all you get is the default store name (in yellow) and blank keywords/description (in red).

 

I have OSC 2.2rc1, STS v4.5.5 and HT SEO v3.0.8.

 

Many thanks,

Chaman

Share this post


Link to post
Share on other sites
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. :-

 

 

Thank you. That helps a ton. The flash menu is created in a separate program which allows you to link each button, but when I entered in that code, it still wouldn't work, so I just played with it and got it to work by doing this:

 

<?php echo '<p><a href="' . tep_href_link( '/index.php?cPath=24', 'cPath=1&products_id=1') . '"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

width="160" height="40">

<param name="movie" value="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">'>http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">

<param name="menu" value="false">

<param name="quality" value="high">

<param name="wmode" value="opaque">

<param name="scale" value="noscale">

<embed src="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf" menu="false" quality="high" wmode="opaque"

scale="noscale" width=160 height=40 type="application/x-shockwave-flash"

pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

</object>

</a></p>'; ?>

 

...basically just by wrapping the flash button with the php tags, or by putting these </a></p>'; ?> end tags at the end of the object and not before it. Doing it this way, I'll have to do each button one by one which is no problem it if works. I don't even remember how or where I got this code...can you tell me what 'cPath=1&products_id=1' means? Should that be in there?

 

I am doing all of this in the index.php.html page which your saying doesn't apply the changes to all pages of the site, which is what I'm shooting for. I do want the flash menu to be on all pages, however when I add this code to the sts_template.html page, nothing happens. I double-checked in my admin panel, and I do have my 'Default Template File' set to sts_template.html. So, do you know why my changes aren't showing when I make changes to that sts_template.html file? Am I missing something?

Share this post


Link to post
Share on other sites
Hi

 

I originally posted this in the Header Tags SEO forum (http://forums.oscommerce.com/index.php?s=&showtopic=298099&view=findpost&p=1326022), but Jack suggested I post it here instead (slightly edited so that it makes sense in this forum!):

 

I installed the HT SEO as per the instructions and with STS turned off (and with the header code added to the pages) it works fine.

 

Once I turn on STS and remove the header code (the if statement around the title tag) then all I get is the default store name. I have added the STS only file and the headertags.php filename to the "files for normal template" in sts admin.

 

It seems to me (although I can't get my head around the order things are done in STS) that the capture code in the headertags.php file is not being run, or that the "headertags" output is being overwritten before it is inserted into the "headcontent" output.

 

Any ideas?

 

Another thing is that when you click the "view results" in the page control admin with STS off it shows the correct title/keywords/desc (all in yellow), but once it is on all you get is the default store name (in yellow) and blank keywords/description (in red).

 

I have OSC 2.2rc1, STS v4.5.5 and HT SEO v3.0.8.

 

Have sorted this out now.... I should have replaced <title><?php echo TITLE; ?></title> with <title><?php echo $headcontent; ?></title> in the souce code as well as using in the sts_template.html file....

Share this post


Link to post
Share on other sites
Have sorted this out now.... I should have replaced <title><?php echo TITLE; ?></title> with <title><?php echo $headcontent; ?></title> in the souce code as well as using in the sts_template.html file....

 

You should not have changed the source code with the headertags code (since STS does this with the $headcontent tag) and you should have added the $headcontent to each of your templates without the php echo statement.

 

See my HTC step by step (link in my signature below).

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

Share this post


Link to post
Share on other sites
Hi

 

I originally posted this in the Header Tags SEO forum (http://forums.oscommerce.com/index.php?s=&showtopic=298099&view=findpost&p=1326022), but Jack suggested I post it here instead (slightly edited so that it makes sense in this forum!):

 

I installed the HT SEO as per the instructions and with STS turned off (and with the header code added to the pages) it works fine.

You should not add the header code to the pages as STS does this automatically with the $headcontent tag in each of your templates.

 

I have added the STS only file and the headertags.php filename to the "files for normal template" in sts admin.

I'm assuming you mean sts_user_code.php;headertags.php.

 

It seems to me (although I can't get my head around the order things are done in STS) that the capture code in the headertags.php file is not being run, or that the "headertags" output is being overwritten before it is inserted into the "headcontent" output.

 

Any ideas?

Did you insert the $headcontent tag into each of your template pages as described in my HTC step by step (see link in my signature below)?

 

Another thing is that when you click the "view results" in the page control admin with STS off it shows the correct title/keywords/desc (all in yellow), but once it is on all you get is the default store name (in yellow) and blank keywords/description (in red).

Again, this would make sense if you did not include the $headcontent tag in your template and you added the HTC code into the PHP pages (don't add the code as it will cause a redeclare PHP error)

 

I have OSC 2.2rc1, STS v4.5.5 and HT SEO v3.0.8.

 

Many thanks,

Chaman

I strongly recommend you upgrade to STSv4.5.8 as it has all of the bug fixes up to date.


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. That helps a ton. The flash menu is created in a separate program which allows you to link each button, but when I entered in that code, it still wouldn't work, so I just played with it and got it to work by doing this:

 

<?php echo '<p><a href="' . tep_href_link( '/index.php?cPath=24', 'cPath=1&products_id=1') . '"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

width="160" height="40">

<param name="movie" value="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">'>http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">

<param name="menu" value="false">

<param name="quality" value="high">

<param name="wmode" value="opaque">

<param name="scale" value="noscale">

<embed src="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf" menu="false" quality="high" wmode="opaque"

scale="noscale" width=160 height=40 type="application/x-shockwave-flash"

pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

</object>

</a></p>'; ?>

 

...basically just by wrapping the flash button with the php tags, or by putting these </a></p>'; ?> end tags at the end of the object and not before it. Doing it this way, I'll have to do each button one by one which is no problem it if works. I don't even remember how or where I got this code...can you tell me what 'cPath=1&products_id=1' means? Should that be in there?

 

I am doing all of this in the index.php.html page which your saying doesn't apply the changes to all pages of the site, which is what I'm shooting for. I do want the flash menu to be on all pages, however when I add this code to the sts_template.html page, nothing happens. I double-checked in my admin panel, and I do have my 'Default Template File' set to sts_template.html. So, do you know why my changes aren't showing when I make changes to that sts_template.html file? Am I missing something?

 

I don't agree with your Flash methods but with that aside, you should link as so:

<a href="' . tep_href_link('product_info.php', 'products_id=1&', 'NONSSL') . '">

instead of

<a href="' . tep_href_link( '/index.php?cPath=24', 'cPath=1&products_id=1') . '">

 

Take a look at the following tip on how to integrate Flash using SWFObject (Post#4735):

http://forums.oscommerce.com/index.php?sho...p;#entry1298555

 

An easy alternative:

 

Another method to create a product ID link is to simply create a new STS tag for it and then use the tag as the link. This method keeps the session ID as well and is very straight forward:

 

Add the following new tag code to your includes/modules/sts/sts_inc/sts_user_code.php file:

$sts->template['urlproductid1'] = tep_href_link('product_info.php', 'products_id=1&', 'NONSSL');

Now, use $urlproductid1 as the link behind your button.


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
You should not add the header code to the pages as STS does this automatically with the $headcontent tag in each of your templates.

The reason I added $headcontent to the index.php page was because it was already in my sts_template.html and this not outputting anything other than the default store title.... then I noticed this:

 

$headcontent: Put this string in your <head> section so that it can insert

the dynamic head content and javascript on pages that require it. This will

probably require putting the $headcontent in the <head> section in the source

code. It's a pain to do it this way, but it was the only way I could get it

working. Sorry!

on the intro here http://www.oscommerce.com/community/contributions,1524 and thought that was what I should have done......

I only did this to the index.php page and that actually made it work!!

 

I'm assuming you mean sts_user_code.php;headertags.php.

Yes thats right, sorry should have been more accurate...

 

Did you insert the $headcontent tag into each of your template pages as described in my HTC step by step (see link in my signature below)?

 

Again, this would make sense if you did not include the $headcontent tag in your template and you added the HTC code into the PHP pages (don't add the code as it will cause a redeclare PHP error)

Is the "HTC step by step" guide valid for Header Tags SEO v3.0.8 or the older Header Tags Controller contrib?

 

I strongly recommend you upgrade to STSv4.5.8 as it has all of the bug fixes up to date.

Erm, I think it might be... searching the code gives me 4.5.5 as the highest version, but have the downloaded files for later fixes and probably applied them (I had installed the sts bit about 12months ago so can't quite remember...)

Share this post


Link to post
Share on other sites
The reason I added $headcontent to the index.php page was because it was already in my sts_template.html and this not outputting anything other than the default store title.... then I noticed this:

 

 

on the intro here http://www.oscommerce.com/community/contributions,1524 and thought that was what I should have done......

I only did this to the index.php page and that actually made it work!!

The text on the intro was meant for STSv2 which does not apply to STSv4.x.

Version 4 was a complete rewrite of the STS code which allowed for faster output, more control over the templates, infobox templates, templates for every category, product, etc. as well as use "modules" to configure STS in the admin verses making changes to your configure.php files (a ton of bug fixes and features were added with version 4 making it almost an entirely different program). It remained named STS since the data flow remained the same - using variables to bring in osC functions into a HTML template.

 

 

Is the "HTC step by step" guide valid for Header Tags SEO v3.0.8 or the older Header Tags Controller contrib?
The guide is for the older Header Tags Controller but STS interacts with HTC SEO in the same manner. By following my step by step, it will help you understand what should be left out of the HTC SEO installation in order for it to work properly with 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

Just to add that the $headcontent was already in the template because it is a slightly modified version of the "full" demo template set that comes with STS - shall I post it?

Share this post


Link to post
Share on other sites
Just to add that the $headcontent was already in the template because it is a slightly modified version of the "full" demo template set that comes with STS - shall I post it?

No, that's a good thing though. At least now we know it does not have anything to do with the $headcontent tag.

 

Now, take a look at my HTC guide to see if there was anything that you left out/added to the installation of HTC SEO that does not match the instructions in my guide.

 

I think this will give us the best option as to finding out what the cause of your issue is.


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 don't agree with your Flash methods but with that aside, you should link as so:

<a href="' . tep_href_link('product_info.php', 'products_id=1&', 'NONSSL') . '">

instead of

<a href="' . tep_href_link( '/index.php?cPath=24', 'cPath=1&products_id=1') . '">

 

Take a look at the following tip on how to integrate Flash using SWFObject (Post#4735):

http://forums.oscommerce.com/index.php?sho...p;#entry1298555

 

An easy alternative:

 

Another method to create a product ID link is to simply create a new STS tag for it and then use the tag as the link. This method keeps the session ID as well and is very straight forward:

 

Add the following new tag code to your includes/modules/sts/sts_inc/sts_user_code.php file:

$sts->template['urlproductid1'] = tep_href_link('product_info.php', 'products_id=1&', 'NONSSL');

Now, use $urlproductid1 as the link behind your button.

 

 

ok...sorry if my questions are really stupid here...I'm just trying to get this right...so, I can add this to the includes/modules/sts/sts_inc/sts_user_code.php file:

 

$sts->template['urlproductid1'] = tep_href_link('product_info.php', 'products_id=1&', 'NONSSL');

 

and then place the button on the index.php.html page like so:

 

<a href="urlproductid1">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

width="160" height="40">

<param name="movie" value="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">'>http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">

<param name="menu" value="false">

<param name="quality" value="high">

<param name="wmode" value="opaque">

<param name="scale" value="noscale">

<embed src="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf" menu="false" quality="high" wmode="opaque"

scale="noscale" width=160 height=40 type="application/x-shockwave-flash"

pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

</object>

 

Is that what your saying?

 

But, don't I need to put the 'cPath=24' somewhere in there since I thought that that was the thing that references it to the particular category (Mini Skirt Sets) I'm trying to link to?

 

 

It'll be the day when I get this!! Sometimes I'm a slow learner...sorry.

Share this post


Link to post
Share on other sites
ok...sorry if my questions are really stupid here...I'm just trying to get this right...so, I can add this to the includes/modules/sts/sts_inc/sts_user_code.php file:

 

$sts->template['urlproductid1'] = tep_href_link('product_info.php', 'products_id=1&', 'NONSSL');

 

and then place the button on the index.php.html page like so:

 

<a href="urlproductid1">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

width="160" height="40">

<param name="movie" value="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">'>http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf">

<param name="menu" value="false">

<param name="quality" value="high">

<param name="wmode" value="opaque">

<param name="scale" value="noscale">

<embed src="http://www.nomoreuglyjars.com/catalog/images/skirtsetsbutton.swf" menu="false" quality="high" wmode="opaque"

scale="noscale" width=160 height=40 type="application/x-shockwave-flash"

pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed>

</object>

 

Is that what your saying?

 

But, don't I need to put the 'cPath=24' somewhere in there since I thought that that was the thing that references it to the particular category (Mini Skirt Sets) I'm trying to link to?

 

 

It'll be the day when I get this!! Sometimes I'm a slow learner...sorry.

 

 

oh, shoot...I meant:

 

<a href="$urlproductid1">

Share this post


Link to post
Share on other sites
Now, take a look at my HTC guide to see if there was anything that you left out/added to the installation of HTC SEO that does not match the instructions in my guide.

 

I think this will give us the best option as to finding out what the cause of your issue is.

I have used the stc_inc/headertags.php file from the powerpack, only difference being the inclusion of the clean_html_comments.php page and the use of "include_once"instead of just "include".

 

HT SEO comes with a Install_Catalog.txt file which I had implemented, do I need to undo all of those changes as your instructions say "For the catalog side, do NOT follow the HTC instructions"??

Share this post


Link to post
Share on other sites

I upload the new sts_inc/headertags.php file and replaced those naughty <title><?php echo $headcontent; ?></title> with <title><?php echo TITLE; ?></title> again and hey - good news the site works....

 

However, rolling back the changes doesn't break the site as I expected.....maybe I shouldn't complain, but I would have liked to know why it wasn't working!!

Share this post


Link to post
Share on other sites
I have used the stc_inc/headertags.php file from the powerpack, only difference being the inclusion of the clean_html_comments.php page and the use of "include_once"instead of just "include".

 

HT SEO comes with a Install_Catalog.txt file which I had implemented, do I need to undo all of those changes as your instructions say "For the catalog side, do NOT follow the HTC instructions"??

I helped Jack with the new HTC SEO Install_Catalog.txt file in order to make it work with STS. You can follow the instructions in this file as long as you skip step 1 as mentioned in the file:

 

1) ******** NOTE: STS USERS ONLY - Skip to step 1A. *********

 

******** NOTE: BTS USERS ONLY - Skip to step 1B. *********

 

 

 

For Header Tags to work on a page of your site, that page must have the code

 

change mentioned below installed. At a minimum, the following files should be

 

changed:

 

index.php

 

product_info.php

 

Any other file in the root directory (the same location where your index.php

 

file is located) that you want Header Tags to work with should also be changed.

 

For example, if you want your privacy page to have its own title and meta tags,

 

then you should make this change to the privacy.php file. Only files that

 

contain <title><?php echo TITLE; ?></title> can be altered. Since the <TITLE>

 

tag is different in popup_image.php and is not handled by Header Tags SEO,

 

there is no need to modify that file.

 

In each file you want to edit, make the following modification:

 

FIND:

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

 

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

 

REPLACE with the following then continue with Step 2:

 

<?php

 

/*** Begin Header Tags SEO ***/

 

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

 

require(DIR_WS_INCLUDES . 'header_tags.php');

 

} else {

 

?>

 

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

 

<?php

 

}

 

/*** End Header Tags SEO ***/

 

?>

 

So instead of doing the above, you would move onto step 1a.


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 upload the new sts_inc/headertags.php file and replaced those naughty <title><?php echo $headcontent; ?></title> with <title><?php echo TITLE; ?></title> again and hey - good news the site works....

 

However, rolling back the changes doesn't break the site as I expected.....maybe I shouldn't complain, but I would have liked to know why it wasn't working!!

 

Good deal. I'm glad you got it working.


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

Another question, now - advice on which method would be best:

 

I have created a info box which extracts and lists "categories" and "pages" from a WordPress database. These link to two new pages called blog.php and page.php respectively.

 

Using HT SEO I can create a general title and meta data for those two pages in the admin, but additionally I would like to get the blog title, say, into the meta tilte and some of the post into the meta description. (I guess this is a bit like the product_info page as the content is dynamic )

 

So the question is do you think I can just create a content template (as in 3.11 in STS User Manual) for this or would it be better to create another module (as in 5.4 in STS User Manual).

 

Thanks,

Chaman

Share this post


Link to post
Share on other sites
Simple one I hope. Can someone tell me the name I need to give the template file to skin the actual product list, and the shopping cart lists.

 

Like on this page where it's still using the light background with the blue header, and in the same place on the shopping cart:

 

The homepage and the category/product list both use the index.php.html template. I don't think you can easily have a content template for the category lists, so your best bet is to look at changing the colours in the css file, or at worst in the index.php file itself.

 

If anyone else knows better, please let us know. As far as I can see to create a content template for those lists would require reproducing most of the index.php file in the sts_incs folder and using it to create an array of product/cat info and then have a loop in the new content template in order to display all of them...

 

Chaman

Share this post


Link to post
Share on other sites

Actually, if I just change those two colours to the same are the background pane for that area it will resolve the problem for my at least.

 

If there is a better way then let me know, but for now, thanks!

 

Nick

Share this post


Link to post
Share on other sites

Yup, replaced the light blue in two places and the light grey in two places also in the stylesheet. I've already got the dark box with the rounded corners as a border so just made the actual lists background and header the same dark grey colour. This has worked for the product list and also the shopping cart lists. Result!

 

Gone from:

 

lists.jpg

 

to:

 

lists2.jpg

 

I'm beginning to get there with the templates now :D

 

Nick

Share this post


Link to post
Share on other sites
Hi.

 

Simple one I hope. Can someone tell me the name I need to give the template file to skin the actual product list, and the shopping cart lists.

 

Like on this page where it's still using the light background with the blue header, and in the same place on the shopping cart:

 

http://www.ttoc.co.uk/website/catalog/index.php?cPath=21

 

Thanks!

 

Nick

The STS User Manual mentions what to do in this instance. Here is an overview of the entire infobox template process:

 

STS Infobox Templates:

 

Infobox templates should be located in your template folder (for example: Look in the sample "full" folder: catalog/includes/sts_templates/full/boxes).

 

In order to use infobox templates, you need to have at least one template called infobox.php.html, it's the default template that will be used for all other boxes that don't have a specific template.

 

Besides the default infobox template, you can create templates for specific boxes. Look in catalog/includes/boxes/ for the script filename of the box you want to create a template for.

 

For example: To create a template for information.php, you would create an infobox template and save it in catalog/includes/sts_templates/*your template folder*/boxes/infobox_information.php.html. This template would include both the header and the content of the information box.

 

Boxes that appear in the content part of the store, such as "also purchased" or "New for products for..." can also have their own template. Look at their filename in catalog/includes/modules to get the correct naming of the box. For example, the file catalog/includes/modules/product_listing.php would have an infobox template named catalog/includes/sts_templates/*your template folder*/boxes/infobox_product_listing.php.html.

 

Now, the boxes class is used in other places in the store and may cause a problem by using the default infobox template in places where it should not.

 

For example, view the shopping cart when there is no product listed. There is a box there, but it is not an infobox, the box is created directly from the catalog file catalog/shopping_cart.php . You can create a template for this box too.

These templates need a special naming structure since they are integrated into the catalog script pages. For these infoboxes such shopping_cart.php, you would call them catalog/includes/sts_templates/*your template folder*/boxes/catalog_shopping_cart.php.html .

 

Same problem if you go to product_info.php for an unexisting product, a box is displayed with some text inside. Make an infobox catalog/includes/sts_templates/*your template folder*/boxes/catalog_product_info.php.html.

The above in blue describes what to do with those boxes and how to name the template.

 

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

And now, for other users who need some more insight to infobox templates:

 

When using Infobox Templates in STS, check the following:

  1. Turn the infobox template system "on" in the STS Default Module
     
    Use template for infoboxes
    true
  2. Try out the sample infobox templates first. In the STS Default Module, set the Default Template folder to "full"
     
    Template folder
    full
     
    I suggest this since the sample template folder "full" has the correct folder structure in place. You should take note that this template folder has two subfolders: content & boxes. The "boxes" folder is where you store each of your infobox templates. If you do not have a "boxes" subfolder in your custom template folder, simply add this subfolder and upload your infobox templates into it.
  3. You need to have at least one (1) infobox template to act as the default template when no other specific infobox template is available. This default infobox template should be named "infobox.php.html". Here is an example of this template:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
    <td class="infoBoxHeading" width="99%">$headertext</td>
    <td class="infoBoxHeading" width="1%">$right_arrow</td>
     </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxBorder">
     <tr>
    <td class="boxText">$content</td>
     </tr>
    </table>

    You should take note of the following tags:


    1. $headertext
      This tag simply brings the title of the box.
    2. $right_arrow
      This tag is the link to the boxes page such as the Reviews or Specials page.
    3. $content
      This is the main content of the infobox. You need this tag even if you do not use any of the other tags above.

    [*]TIP: You can separate the main content of the infobox from the title by simply creating two templates as so (using the information.php infobox as an example):

    1. infobox_information.php.html
      This will be used for the main content of the box. Here is a simple example:
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#00FF00" style="border-collapse: collapse" bordercolor="#111111">
       <tr>
      <td> </td>
      <td bgcolor="#DBF1FF">$content</td>
      <td> </td>
       </tr>
       <tr>
      <td width="30"> </td>
      <td width="100%"> </td>
      <td width="31"> </td>
       </tr>
      </table>


    2. infobox_information_header.php.html
      This will be used for the header of the infobox template:
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#00FF00">
       <tr>
      <td width="11">
      *</td>
      <td background="images/infobox_03.gif" class="infoBoxHeading" width="1428">
      $headertext</td>
      <td width="103" style="background-repeat: norepeat">
      *</td>
       </tr>
      </table>


    3. Take note on how you can easily change the style of the box by stipulating the CSS class to be used. The sky is the limit here. Be creative and try out new things. If you have a backup, then just do it and see if it works. If you break everything, then just restore your backup template.

    [*]The samples above use Tables and cells but you can easily use divs and complete CSS to style your infoboxes.

    [*]Here is some more tips:

    1. Use your stylesheet to set the background to transparent to better match your customized template page

    2. Look for the following code in your stylesheet.css file:

    /*This is the INFOBOX Background Style, one shade darker than the Infobox Header color*/ 
    .infoBox { 
    background: #0000FF; 
    } 
    /*This is the INFOBOX Contents Style, one shade lighter than the Infobox Header color*/ 
    .infoBoxContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Notice Style, a pale salmon color*/ 
    .infoBoxNotice { 
    background: #FF8E90; 
    }
    
    /*This is the INFOBOX Notice Contents Style, a very pale salmon color*/ 
    .infoBoxNoticeContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Heading Style, SAME AS HEADER AND FOOTER GRAY BARS*/ 
    TD.infoBoxHeading { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    font-weight: bold; 
    background: #FFFFFF; 
    color: #ABDA4E; 
    } 
    TD.infoBox, SPAN.infoBox { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }

    3. Just by changing the above, you can make the borders, backgrounds and more completely dependent upon your design. In other words, it is now a lot easier to integrate STS into a store bought HTML template. You can also take advantage of newer CSS dynamic boxes. Have fun, be creative.

    4. The default tables show a gray background around each infobox. This can easily be removed by editing the table and cell within the infobox template. You may want to replace the corner images with transparent gifs. These images are located in catalog/images/infobox/.

    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

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

×