Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment
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?

Link to comment
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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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 !!

Link to comment
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?

Link to comment
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?

Link to comment
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

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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

Link to comment
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:

Link to comment
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

Link to comment
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

Link to comment
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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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
Link to comment
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.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
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!

Link to comment
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

Link to comment
Share on other sites

STS version 4.4/OSC version 2.2

 

Still struggling to get everything working......

 

Problem: background doesn't show in STS Status: Solved

Problem: "Template file does not exist" when I enable STS. Status: Solved

Problem: "Warning: move_uploaded_file(): open_basedir restriction in effect" when I upload pictures. Status: Solved

Problem: pictures of products look squashed Status: Solved

 

Now I have to take the next hurdle...

When I click on a product in the shop, I see the "Click to Enlarge" link.

Before I click, I see no errors in IE6.

Then I click, I see the error sign and nothing happens. Error msg: object is expected.

Then I copy the link and trim off the javascript stuff, paste it back into the address bar in IE6, then everything works fine.

I have no popup blockers or anything

 

Firefox tells me "popupWindow is not defined"

 

I have searched the forum and somebody suggested that I put <!--$headcontent--> in the header in the page, but it was already there, in all the pages

 

Does anyone have suggestions for me?

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