Latest News: (loading..)
DiamondSea

[contribution] Simple Template System (sts)

5,822 posts in this topic

I am trying to make STS 4.4 and Header Tags Controller 2.6.2 to work with no luck.

 

I tried to follow the instructions in STS Power pack plus to see if that made a difference with no luck.

 

First error:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/clean_html_comments.php:11) in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/clean_html_comments.php on line 11

 

Then in includes/header_tags.php i changed the following as described in this forum thread:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Then I get this error:

 

Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/header_tags.php:7) in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/header_tags.php on line 7

 

What is the problem?

Check the following first to rule out any permission issues:

Remember, there are two files that you need to change the permissions to in order for Header Tags Controller to work properly:

 

• catalog/includes/header_tags.php (CHANGE PERMISSIONS OF THIS FILE TO 755 OR 777)

• catalog/includes/lanquages/english/header_tags.php (CHANGE PERMISSIONS OF THIS FILE TO 755 OR 777)

 

Use the 777 first, but if your host will not allow you to do that then use the 755 instead.

 

Some hosts use different settings still and Header Tags will flag an error in those cases. The best thing to do is to check the permissions on the images directory and set the ones on the Header Tags files to the same.

Share this post


Link to post
Share on other sites
I am trying to make STS 4.4 and Header Tags Controller 2.6.2 to work with no luck.

 

I tried to follow the instructions in STS Power pack plus to see if that made a difference with no luck.

 

First error:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/clean_html_comments.php:11) in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/clean_html_comments.php on line 11

 

Then in includes/header_tags.php i changed the following as described in this forum thread:

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

Then I get this error:

 

Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/header_tags.php:7) in /hsphere/local/home/xxxx/xxxxx.xxx/osc/includes/functions/header_tags.php on line 7

 

What is the problem?

Also: The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Solution: Remove the include of header_tags.php from each file in your store as it is NOT needed when using STS.

Share this post


Link to post
Share on other sites
Also: The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Solution: Remove the include of header_tags.php from each file in your store as it is NOT needed when using STS.

 

Damn your good :)

 

It worked. Great contribution, made my life soooo much more easy.

Share this post


Link to post
Share on other sites
Also: The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Solution: Remove the include of header_tags.php from each file in your store as it is NOT needed when using STS.

 

Damn your good :)

 

It worked. Great contribution, made my life soooo much more easy.

Share this post


Link to post
Share on other sites
Also: The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Solution: Remove the include of header_tags.php from each file in your store as it is NOT needed when using STS.

 

Damn your good :)

 

It worked. Great contribution, made my life soooo much more easy.

Share this post


Link to post
Share on other sites
Also: The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Solution: Remove the include of header_tags.php from each file in your store as it is NOT needed when using STS.

 

 

Damn your good :)

 

It worked. Great contribution, made my life soooo much more easy.

Share this post


Link to post
Share on other sites
Damn your good :)

 

It worked. Great contribution, made my life soooo much more easy.

Thank you times four. :-

Share this post


Link to post
Share on other sites

This message is in reference to rigadin2's STSv4.4. I was trying to to upgrade from 4.3.3 and when reading the upgrade instructions i noticed that not all the files were in the zip file from the contributions page. Has anyone here upgraded specifically from 4.3.3 to 4.4? I just upgraded to 4.3.3 to get the HTC and was than going to upgrade to bkellum's "Add New Pages Using STS" contribution located on this page and here but was told that I would need STS4.4

 

Can someone tell me where I can get the most up to date files for the STS system?

 

One more question:

 

How do I create a new infobox? I would like to make a box for testimonials and include pages in there such as 2005-testimonials.php, 2006-testimonials.php and so on. And would there be a way to add the testimonials to the page through the backend?

Share this post


Link to post
Share on other sites

I had one more question:

 

When I had first started using STS someone told me I needed to create a tpl file for every page. I thought that defeated the point of STS thinking I only needed 1 file for the entire site. I basically want all the pages to have the same exact layout, the only difference being the product pages, which i would like to keep the tell a friend feature on. do i need a tpl file for every page? can someone please explain this to me?

 

and does sts have a newsletter feature that can go in like the tell a friend feature?

Share this post


Link to post
Share on other sites
This message is in reference to rigadin2's STSv4.4. I was trying to to upgrade from 4.3.3 and when reading the upgrade instructions i noticed that not all the files were in the zip file from the contributions page. Has anyone here upgraded specifically from 4.3.3 to 4.4? I just upgraded to 4.3.3 to get the HTC and was than going to upgrade to bkellum's "Add New Pages Using STS" contribution located on this page and here but was told that I would need STS4.4

 

Can someone tell me where I can get the most up to date files for the STS system?

The link that you provided will give you the most up to date version (minus the two bug fixes since page 76 in this forum).

The most recent release is v4.4.

My add new pages contribution in the STS4 Power Pack site will work for any STSv4.x (including v4.3.3).

Regarding your zip file. My suggestion would be to download it again. You may have experienced a bad download. All of the files are in there.

Share this post


Link to post
Share on other sites
I had one more question:

 

When I had first started using STS someone told me I needed to create a tpl file for every page. I thought that defeated the point of STS thinking I only needed 1 file for the entire site. I basically want all the pages to have the same exact layout, the only difference being the product pages, which i would like to keep the tell a friend feature on. do i need a tpl file for every page? can someone please explain this to me?

 

and does sts have a newsletter feature that can go in like the tell a friend feature?

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.

 

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

 

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.

Share this post


Link to post
Share on other sites

I have tried createing:

 

articles_info_44.php aswell as articles-a-44.php.html

but i am NOT able to get a working STS page for each Article created using latest Article Manager :'(

 

Is it not suppose to be as easy as making a STS template for each products!? :blink:

 

 

Just like using different STS templates for different , specific products

i wonder how i can use different templates for different Articles created using Article manager.

 

i have an sts template named articles_info.php.html and that seem to work fine BUT if i try creating

a sts templates for articles-a-44.php = articles_info.php_44.html etc but that does not work :blink:

...how shoudl i do!? Thanks !!

Share this post


Link to post
Share on other sites

thanks bkellum, i understand now.

 

I am am trying to make some links in the index English file. i am using

<a href="products_new.php">

but i realize that it doesnt hold the user SID so when they go to the link, they lose there cart. how can i fix this? i tried to use something like

<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '') . '">

, but it didnt work. any ideas?

Share this post


Link to post
Share on other sites

Also, I am recieving this extra coding at the top of my html before the real html starts:

<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<!-- footer_eof //-->
<br>
</body>
</html>

 

Any ideas where thats coming from and how to get rid of it?

Share this post


Link to post
Share on other sites
thanks bkellum, i understand now.

 

I am am trying to make some links in the index English file. i am using

<a href="products_new.php">

but i realize that it doesnt hold the user SID so when they go to the link, they lose there cart. how can i fix this? i tried to use something like

<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '') . '">

, but it didnt work. any ideas?

Making a simple text link that does not lose the session ID.

 

If you want to just make a regular text link, you would use the tep_href_link function like all of the other links on the page, and title it whatever you want... For example, using your products_new.php from above, you can do it in one of the following examples:

 

<a href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW); ?>">Click here to see our new products</a>

 

Orrrrr...

 

<a href="<?php echo tep_href_link('products_new.php'); ?>">Click here to see our new products</a>

Edited by bkellum

Share this post


Link to post
Share on other sites
I have tried createing:

 

articles_info_44.php aswell as articles-a-44.php.html

but i am NOT able to get a working STS page for each Article created using latest Article Manager :'(

 

Is it not suppose to be as easy as making a STS template for each products!? :blink:

Try asking this in the articles manager forum. I'm not familiar with this contribution. If it is creating a custom infobox that includes your links, then you will need to add this in your sts_user_code.php file to create a STS tag that you can use in your template. For ex: $articles

If this contribution creates new PHP pages, then you should be able to create templates for it just like any other PHP page in osCommerce. For ex: If the actual PHP page is articles_info.php, then the template would be articles_info.php.html and would be saved in your sts_templates/my_templates/ folder where "my_templates" is the same template folder that you have set in the STS Default module.

Share this post


Link to post
Share on other sites

Has anyone managed to get the Additional Images contrib working on a content page for sts4.4? It works fine for the regular product_info.php.html but I can seem to get it setup on a content page.

 

Cheers

Shane

Share this post


Link to post
Share on other sites
Making a simple text link that does not lose the session ID.

 

If you want to just make a regular text link, you would use the tep_href_link function like all of the other links on the page, and title it whatever you want... For example, using your products_new.php from above, you can do it in one of the following examples:

 

<a href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW); ?>">Click here to see our new products</a>

 

Orrrrr...

 

<a href="<?php echo tep_href_link('products_new.php'); ?>">Click here to see our new products</a>

Thanks bkellum, I'll try that tonight. :rolleyes:

Share this post


Link to post
Share on other sites
I have tried createing:

 

articles_info_44.php aswell as articles-a-44.php.html

but i am NOT able to get a working STS page for each Article created using latest Article Manager :'(

 

Is it not suppose to be as easy as making a STS template for each products!? :blink:

 

As you probably know, you have to enable the product info module in admin in order to get the product info templates to work. It means that a module is needed as soon as you want some "extra" features to detect what template to use.

 

The default module can handle templates according to script name, like articles_info.php.html, but has no clue about the article ID, category ID, product ID, whatever ID. It's just impossible to know all possible things.

 

So, if you want something special for articles_info.php, you need a module named includes/modules/sts/sts_articles_info.php that will detect what is the article ID to be displayed, and choose the right template for it. The best way is to start from sts_product_info.php, but forget (for now) the detection of a content template. That would be the next step.

 

- Rigadin2

Share this post


Link to post
Share on other sites

Hi everyone,

 

Another n00b around, I have a problem (duh). I have installed a fresh copy of the latest oscommerce, then I installed STS (all working), then I activated it from the admin menu.

 

Now comes the problem, when I'm adding different tags to a new template, I only get text (ex: $date).

 

Can you please tell me what I'm missing?

 

 

Thank you,

-Adrian

Share this post


Link to post
Share on other sites
Hi everyone,

 

Another n00b around, I have a problem (duh). I have installed a fresh copy of the latest oscommerce, then I installed STS (all working), then I activated it from the admin menu.

 

Now comes the problem, when I'm adding different tags to a new template, I only get text (ex: $date).

 

Can you please tell me what I'm missing?

 

 

Thank you,

-Adrian

Make sure your new template has the required code in order to make the tags work. You can find an example of this in the test/blank_sts_template.html file provided with the contribution.

Also: If you are using end characters, you will have to add those to your tags. For ex: $date will be $date# or whatever you used as your end character.

Share this post


Link to post
Share on other sites

I know that STS dose not control the way boxes look how ever i need a hand pointing me in the right direction please.... I want to change the display of the boxes seems theres a empty table above the content in each box and it makes for a large gap in my design... if you want to see what i mean check out the site..

 

www.lendonline.net I would like to kill the gaps in there.. its pretty apparent on the left hand menu... i have not been using OSC for more than a week or two and this is my first php script i have been working with so bare with me please. lol :-"

Edited by sacaccess

Share this post


Link to post
Share on other sites
I know that STS dose not control the way boxes look how ever i need a hand pointing me in the right direction please.... I want to change the display of the boxes seems theres a empty table above the content in each box and it makes for a large gap in my design... if you want to see what i mean check out the site..

 

www.lendonline.net I would like to kill the gaps in there.. its pretty apparent on the left hand menu... i have not been using OSC for more than a week or two and this is my first php script i have been working with so bare with me please. lol whistling.gif

Demetre, Actually, STSv4.4 does control the way boxes look if you enable the "Use Infobox Templates" in the STS Default Module.

Share this post


Link to post
Share on other sites

Hi there, I was looking at the file (product_info.php_26.html) and wondering how this is going to work if I want to use a module for extra images, because I want to have a minimum 4 images per product.

 

 

 

Many thanks!

Share this post


Link to post
Share on other sites

Bill, this is a GREAT contrib. If you have a link for a donation (via PayPal), please do send it over to me.

 

I have a few questions - I spent some time searching the forums, but had trouble finding what I am looking for.

 

I have a couple of questions:

 

#1 - Checkout Pages

Is there a list of "tokens" for use with Checkout Pages? From what I'm reading, in order to change the look/feel/display of the checkout pages, I need to make individual pages in STS for each corresponding checkout page.

 

If that assumption is correct - then are there any placeholders already set up for the checkout pages?

 

#2 - Category Listings

What I'd like to do, on my homepage, is to have my categories show up as category image, with name below it - in a 3-column layout. I'd like for this to be dynamic, as there will be categories added and removed.

 

Can you give any direction on how this would be done? I already have the index.html.php page - I'm just missing how to set up the layout of the category list (no subcategories) with image and text link (below image) in columns.

Any assistance or direction you could give would be great.

 

Thanks

Jane

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