Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hello, I just installed 2.2ms and the latest WebMakers Header Controller today.

Everything worked great. I ran it through the ringer before attempting to install another mod.

 

I wanted a little personal touch to the look of the site and STS seemed to be the mod to get. I followed the instructions VERY carefully, installed the mod, double checked everything, crossed my fingers, then arrrrg:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/public_html/store/includes/functions/clean_html_comments.php:13) in /home/public_html/store/includes/functions/clean_html_comments.php on line 13

 

What the heck did I do wrong. I usually have no probs troubleshooting these things on my own but I am stumped and stupified. I searched and searched the forum but, I am at a loss. I tried permission changes, re-checked the install and instructions but, I must be too close to see or just too tired.

 

Could you p-p-p-p-p-p-please help shed some light on my fried brain cells.

 

Thanks so much in advance...

If you added this to your application_top.php file when installing header tags try removing it. I believe that if you already have STS installed you should not add it.

 

// BOF: WebMakers.com Added: Header Tags Controller v1.0

require(DIR_WS_FUNCTIONS . 'header_tags.php');

// Clean out HTML comments from ALT tags etc.

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE

// EOF: WebMakers.com Added: Header Tags Controller v1.0

 

 

You might want to read through the headertags support thread if that does not work as I did have a couple of problems getting them to play nice together and that is where I found the answers.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Thank you Richard. I will check that out. I am sure I read the code atw before altering but, wouldn't be the first time I made a mistake that's for sure!

 

I will let you know what I discover.

 

Thanks again...

A programmer can rem his mistakes, but an architect must plant vines.

The only normal people are those you don't know too well.

My wife and I were happy for 30 years, then we met.

The future isn't what it used to be.

If it isn't broken, don't fix it...

Link to comment
Share on other sites

Yes, removing the:

 

// BOF: WebMakers.com Added: Header Tags Controller v1.0

require(DIR_WS_FUNCTIONS . 'header_tags.php');

// Clean out HTML comments from ALT tags etc.

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE

// EOF: WebMakers.com Added: Header Tags Controller v1.0

 

from the application_top.php fixed it. Header addon still works as well.

Time to go play with my now functional, handy dandy sts addon... (After another B/U)

 

Thanks again!

A programmer can rem his mistakes, but an architect must plant vines.

The only normal people are those you don't know too well.

My wife and I were happy for 30 years, then we met.

The future isn't what it used to be.

If it isn't broken, don't fix it...

Link to comment
Share on other sites

this line is generated on the 1st line in the header tag..

 

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

 

how can i remove it?

Link to comment
Share on other sites

Walkities,

 

I would go through the installation again and make sure you modified the following seven files according to the instructions

 

application_top.php

header.php

column_left.php

column_right.php

footer.php

application_bottom.php

AND

configure.php

What has to be modified? I went the easy installation way and just added what was needed after the configure.php script.

Link to comment
Share on other sites

ok... I did the whole installation again and get the same problem: when I click the send to a friend icon, it takes me to shopping_cart.php. What can I do ?

 

 

Another thing: How do I remove the "new products" box from the page, without removing the $content variable ?

 

 

Thank you,

Shutiri.

Link to comment
Share on other sites

Hi.

 

I have another question:

 

I installed oscommerce as my index page. I used the index.php.html, the product_info.html, the index.php_0.html and the sts_template.html.

 

My index page uses index.php_0, the categories use index.php, the products use product_info and ALL THE OTHER PAGES use sts_template.

 

How do I create some general content pages ? I mean pages which would have just text, pictures and some links... I have 4 possible (included) pages: Shipping & Returns, Privacy Notice, Conditions of Use and Contact Us. But I would like to create an "About us" page, a "Photos" page, a "News" page and so... I would need these pages to keep the STS_template look, but removing (and changing) the content of the main page and the title on the top (top >> catalog >> xxxxxx)

 

Thank you.

Shutiri.

Link to comment
Share on other sites

Hi all,

 

Here is a unique problem that I don't think has been addressed yet.

 

Basically I have added the contribution called "Must agree to terms" which displays an error box if the user doesn't select that they have agreed to the terms. It doesn't work with STS and I have included the $headcontent variable in the template. I don't think that any of these error type messages will show up.

 

Anyone have a fix for that? I'm looking into it and I will post if I find the answer, but for now I can't find a way to make it work.

 

When I view the source of a page with STS installed and not installed, I noticed that the line <!-- header //--> never shows up in the source and this is just below the headererror code that I need to work. I'm not sure why it isn't being included.

 

 

Shagy

Link to comment
Share on other sites

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/mystic/public_html/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mystic/public_html/includes/application_top.php on line 511

 

I messed something up obviously... Can someone tell me what I did wrong please?

 

Thanks

Link to comment
Share on other sites

Walkities,

 

I would go through the installation again and make sure you modified the following seven files according to the instructions

 

application_top.php

header.php

column_left.php

column_right.php

footer.php

application_bottom.php

AND

configure.php

What has to be modified? I went the easy installation way and just added what was needed after the configure.php script.

Someone has to have an answer to me?

Link to comment
Share on other sites

I just installed the STS, and love it! Very cool! But I have one annoying problem. On the Products page, I see the Notifications box in the right hand column. It does not appear on the Home page or any of the category pages, only on all of the product pages.

 

I looked in the product_info.php.html file, and can see no reference to the Notifications box, but alas, there it is on all of the product pages. How do I get rid of the Notifications box within STS?

Link to comment
Share on other sites

this line is generated on the 1st line in the header tag..

 

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

 

how can i remove it?

 

guys! got any ideas where i can erase the code that genarates these?

Edited by technoboy
Link to comment
Share on other sites

I have to Thank the STS team for developing this contribution it's really Awesome.

B)

I have few questions that I need anwser:

 

1. I installed SM, MD, LG images contribution which is located here: http://www.oscommerce.com/community/contributions,695

 

I couldn't make it to work with STS contribution, what do I have to edit to make it show Medium and/or Large image on the Product_info.php page.

 

 

 

Thanks for your hard work and awesome contribution:

PLEASE HELP me on this matter :unsure:

Link to comment
Share on other sites

Can anyone tell me how I can CENTER the $catmenu?

 

Here is the default code in sts_user:

    $sts_block_name = 'catmenu';
   require(STS_START_CAPTURE);
   echo "\n<!-- Start Category Menu -->\n";
   echo tep_draw_form('goto', FILENAME_DEFAULT, 'get', '');
   echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
   echo "</form>\n";
   echo "<!-- End Category Menu -->\n";
   require(STS_STOP_CAPTURE);
   $template['catmenu'] = $sts_block['catmenu'];

Link to comment
Share on other sites

Hi guys!

 

I have a problem - and it maybe discussed already - but the boards search engine sux and i dont want to go through the last 106 pages so:

 

I'm using a template which is using relative urls - it links relative to the stylesheet and in the stylesheet the graphics are linked (relatively)

 

 

The template itself looks great - but as soon as i choose it and open my catalog/index.php - the template shows up, but without any pictures... :blink:

 

 

Shouldn't be a big problem I think - but till now I couldn't figure out where or what it is..

 

...any ideas?

 

 

 

//by the way - the sts is great!

Link to comment
Share on other sites

Can anyone tell me how I can CENTER the $catmenu?

 

Here is the default code in sts_user:

    $sts_block_name = 'catmenu';
   require(STS_START_CAPTURE);
   echo "\n<!-- Start Category Menu -->\n";
   echo tep_draw_form('goto', FILENAME_DEFAULT, 'get', '');
   echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
   echo "</form>\n";
   echo "<!-- End Category Menu -->\n";
   require(STS_STOP_CAPTURE);
   $template['catmenu'] = $sts_block['catmenu'];

i think you can't do it from sts - you have to do it from osc-code where it comes from

Link to comment
Share on other sites

I recommend using absolute URL's (starting with just a slash or http://) for your stylesheet and image links.  This will make it easier to debug your output, because you will be able to simply point your browser to http://yourdomain.com/catalog/includes/sts_template.html and see what it will look like, showing the $variables in their places.

 

It will work with relative links, but you won't be able to preview your page the same way.

The only thing I found about my problem is this...

 

...and it says that relative urls will work...

 

but they don't seem to do so - as I mentioned 2 posts above...

 

:unsure:

Link to comment
Share on other sites

i think you can't do it from sts - you have to do it from osc-code where it comes from

The catmenu is made in the sts_user_code.php

 

I have many images in my template and I link them with relative links like this:

 

<img src="/catalog/images/logo.gif">

 

You do have all the images uploaded right?

Link to comment
Share on other sites

yes - that should be fine - have my images in includes/template_pix/... and linked like this:

 

<img src="template_pix/3_13.jpg" width="36" height="18" alt="">

 

 

i dont know what is wrong ... :rolleyes:

 

 

//EDIT

 

The images work when i open the Template.html - but they dont work when i open the shops index.php

Edited by iveo
Link to comment
Share on other sites

I tried many things now - found some posts on page 98 and afterwards - but all of them didn't help me...

 

...I'm using apache locally... - the index.php calls the template.html but the pictures that are linked in the template.html apper as broken images when opening index.php

 

when opening template.html - everything looks fine...

 

the images work neither with relative urls nor with absolute urls...

 

 

...please help?! :blink:

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