Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Can someone help me please? I have tried three times to install Article Manager v1.2, and I keep getting the same error message when I open osc admin. I have ocs 2.2, with sts 1.9, header tag controler, and basic_design_pack1mk3. I happen to be starting a new site with a fresh install of OSC, so I install Article manger on it to see if I was misinturpting the directions, but that install works fine.

 

Here is a screen shot of the error message and the code on the line it ref to. Can you tell what it is looking for? Maybe I can fix it.

 

I have posted this problem on the Article_manager support thread, but I don't seem to be getting any response. So I am hopeing to get a better response here. If Youre not able to help maybe you can point me in the right direction.

 

Thanks,

 

David

 

This is: admin/includes/boxes/articles.php starting at line 64

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_ARTICLES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$topics_string = '';

$tree = array();

 

oscscreenshot.jpg

Link to comment
Share on other sites

I just put STS 3.0 and am getting:

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

Quick fix?

 

You need put the following line at the bottom of .htaccess file located in your catalog dir.

 

php_value register_globals 1

Link to comment
Share on other sites

Hi, i have got some problem with installing STS v3.0, i have done all the changes in the files in my shop and uploaded it together with the template files but i got this error:

Template file doesn't exist: []Can't open Template file: []

Warning: fread(): supplied argument is not a valid stream resource in /home/billings/public_html/webshop/includes/sts_display_output.php on line 163

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/billings/public_html/webshop/includes/sts_display_output.php on line 164

 

Fatal error: main(): Failed opening required '' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/php/Smarty') in /home/billings/public_html/webshop/includes/sts_display_output.php on line 183

 

What should i do to resolve the problem?

Link to comment
Share on other sites

How do you switch from html template layout to default osCommerce layout ?

 

The STS contribution says that:

 

In the /catalog/includes/application_bottom.php file you can see the

following settings (near the top of the file):

 

$display_template_output = 1;

$display_normal_output = 0;

$display_debugging_output = 0;

 

Display_Template_Output (the default setting) will cause it to display the

template versions of the pages.

 

Display_Normal_Output will cause it to display the non-template version of

the pages.

 

Display_Debugging_Output will cause it to display debugging information

showing all of the blocks of data that it is using and how it translates

them into template variables.

 

 

However /catalog/includes/application_bottom.php does not have these lines, I found these lines in /catalog/includes/sts_display_output.php

 

 

$display_template_output = 0;

$display_normal_output = 1;

$display_debugging_output = 0;

$display_version_output = 0;

 

 

When I modify it as above, I still do not get the default osCommerce layout , what else do I need to do?

Link to comment
Share on other sites

How do you switch from html template layout to default osCommerce layout ?

 

The STS contribution says that:

 

In the /catalog/includes/application_bottom.php file you can see the

following settings (near the top of the file):

 

$display_template_output = 1;

$display_normal_output = 0;

$display_debugging_output = 0;

 

Display_Template_Output (the default setting) will cause it to display the

template versions of the pages.

 

Display_Normal_Output will cause it to display the non-template version of

the pages.

 

Display_Debugging_Output will cause it to display debugging information

showing all of the blocks of data that it is using and how it translates

them into template variables.

However /catalog/includes/application_bottom.php does not have these lines, I found these lines in /catalog/includes/sts_display_output.php

$display_template_output = 0;

$display_normal_output = 1;

$display_debugging_output = 0;

$display_version_output = 0;

When I modify it as above, I still do not get the default osCommerce layout , what else do I need to do?

 

You have to modify the /catalog/includes/sts_display_output.php

 

to look like:

$display_template_output = 0;

$display_normal_output = 1;

$display_debugging_output = 0;

$display_version_output = 0;

 

Don't forget to save.

I open two browzers, one for my file manager and one for my store. Make the change and refreash the screen on your store. You should see the the change.

 

David

Link to comment
Share on other sites

In sts_user_code.php at the top you will see;

  // $sts_block_name = 'newthingbox';
 // require(STS_START_CAPTURE);
 // require(DIR_WS_BOXES . 'new_thing_box.php');
 // require(STS_STOP_CAPTURE);
 // $template['newthingbox'] = strip_unwanted_tags($sts_block['newthingbox'], 'newthingbox');

 

You have to copy and paste the code right below it, uncomment it and then change the 'newthingbox' and new_thing_box.php' to suite your needs for the login box. You can then type $loginbox (or what ever you called it) into your template and it will show up.

 

Code should look something like this;

	$sts_block_name = 'loginbox';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'loginbox.php');
require(STS_STOP_CAPTURE);
$template['loginbox'] = strip_unwanted_tags($sts_block['loginbox'], 'loginbox');

 

HTH

Peter

 

 

Hi,

I've been trying to add more boxes to my site using your advice but with no luck?

Link to comment
Share on other sites

At the moment I am in a kind of rush to get this site live and so I'm not playing around with STS too much, I'm just using the template under the osc folder.

 

I am however, after reliable methods for the following:

 

1. adding boxes.

2. centering the shop (not sure what the correct term is, i mean 'squishing it' together)

3. Getting rid of the 'oscommerce' page titles.

4. Creating seperate banner codes for rotating/refreshing column banners.

Link to comment
Share on other sites

Thanks David for replying but as I indicated in my post, I have already modified the lines in

 

/catalog/includes/sts_display_output.php

 

$display_template_output = 0;

$display_normal_output = 1;

$display_debugging_output = 0;

$display_version_output = 0;

 

I still do not get the default osCommerce layout, you know the one you get when you first install osCommerce. I may need to overwrite some existing base files like

 

stylesheet.css

maybe some of the .php files as well

Link to comment
Share on other sites

Hi, i have got some problem with installing STS v3.0, i have done all the changes in the files in my shop and uploaded it together with the template files but i got this error:

What should i do to resolve the problem?

 

 

nordstar8 & ferretboy,

 

I experienced the same problem when I deleted sts_template.html from my /includes folder. This problem went away when I added sts_template.html back under /includes folder

 

Let me know if it works for you

Link to comment
Share on other sites

About adding a login box: if $loginbox does not work, try to create a $login_box. I've read somewhere that $loginbox was not working, but I don't remember why.

 

- Rigadin

Edited by 241
Link to comment
Share on other sites

Hi all

 

I am SO close to finishing my site however...

 

Everything looks great on my local test machine but when I uploaded to the server it's acting like my product_info.php.html isn't there. The rest of the template works though, at least sts_template.html does, but I don't use a category page so I don't know if anything from the sts_template folder is working. Anyone have any ideas?

 

Thanks so much and please take a look at my site which I hope to launch soon:

 

http://www.thislittlecookie.com/catalog

 

-Tomoko

Link to comment
Share on other sites

Hi all

 

I am SO close to finishing my site however...

 

Everything looks great on my local test machine but when I uploaded to the server it's acting like my product_info.php.html isn't there. The rest of the template works though, at least sts_template.html does, but I don't use a category page so I don't know if anything from the sts_template folder is working. Anyone have any ideas?

 

Thanks so much and please take a look at my site which I hope to launch soon:

 

http://www.thislittlecookie.com/catalog

 

-Tomoko

 

Your site is always using the default template includes/sts_template.html, quite strange if on your local machine it takes the product_info.php.html. Have you done the update from Christophe B. on 25 aug 2004?

Link to comment
Share on other sites

Hi all

 

I am SO close to finishing my site however...

 

Everything looks great on my local test machine but when I uploaded to the server it's acting like my product_info.php.html isn't there. The rest of the template works though, at least sts_template.html does, but I don't use a category page so I don't know if anything from the sts_template folder is working. Anyone have any ideas?

 

Thanks so much and please take a look at my site which I hope to launch soon:

 

http://www.thislittlecookie.com/catalog

 

-Tomoko

 

Check in configure.php where is defined the STS_TEMPLATE_DIR constant. Your product_info template is in folder includes/sts_templates/ and probably STS_TEMPLATE_DIR is not set to this folder.

Link to comment
Share on other sites

Hey everyone, great contribution.

 

Im having a slight problem, everything else works lovely

 

Im having a problem with adding products to the cart

this problem still persists even if your logged in an account or not.

 

 

Add to cart >> Your cart is empty!

 

 

Does anyone know? please we are to go live very soon!!

 

 

Thank you so much!!

Link to comment
Share on other sites

Hi everyone

 

Got a weird issue i cant pinpoint the cause of...

 

I have header tags installed on a store with STS 3 and it all works great except the categories title isnt being displayed in the Title, only the default title is displayed despite having HTTA and HTCA active for the index.php page

 

anyone got any ideas whay this would be occuring?

Link to comment
Share on other sites

:'( I hop somebody can help me.

 

I have installed STS Plus (4) and I want to change the $content output.

If i look in the HTML file, I only see the $content variable, and i can't see where STS does output it.

 

Does someone know how to change the $content content?

 

Plz help

 

ViPeRIII

Link to comment
Share on other sites

:'( I hop somebody can help me.

 

I have installed STS Plus (4) and I want to change the $content output.

If i look in the HTML file, I only see the $content variable, and i can't see where STS does output it.

 

Does someone know how to change the $content content?

 

Plz help

 

ViPeRIII

 

Hi,

 

The forum support for STS PLUS is here:

http://www.oscommerce.com/forums/index.php?showtopic=187122

 

Anyway, both STS and STS PLUS works same:

The $content is the result of the php code of your script, like for a shop without STS. If you want to change how the content looks like, you have to modify the php code, for example index.php.

 

For product_info.php, you can create templates where you can place each element where you want (image, price, description, ...).

 

With STS PLUS, you can code modules that will handle the content of each page in the same way as product_info.php, but first you should be little bit familiar with the system.

Link to comment
Share on other sites

Ah,

 

Thx for the support!

I see now that that has nothing to do with STS (sorry for posting in the wrong section).

 

But to go deeper in it...

STS does seem to pick up the $content tag.

Can you please discribe how or where STS does see this variable, and echo's the content?

 

 

That would help me a lot!

Link to comment
Share on other sites

Ah,

 

Thx for the support!

I see now that that has nothing to do with STS (sorry for posting in the wrong section).

 

But to go deeper in it...

STS does seem to pick up the $content tag.

Can you please discribe how or where STS does see this variable, and echo's the content?

That would help me a lot!

 

In both STS and STS PLUS, the idea is to send the html code to a buffer instead of to the browser. This buffer is an array which many elements, each representing a part of the page. At the end, a piece of code replace the placeholders of your template by the corresponding element of the buffer.

 

The $content is the piece of html generated between the end of column_left.php and the beginning of column.right. Look at these 2 files to get the idea. In STS, the output you see in your browser is generated by a file named sts_display_output, much of the magic things happened here.

Link to comment
Share on other sites

Check in configure.php where is defined the STS_TEMPLATE_DIR constant. Your product_info template is in folder includes/sts_templates/ and probably STS_TEMPLATE_DIR is not set to this folder.

 

Thanks, but I checked the configure.php and installed the patch but that's not it (helped with the popups though!). I realized I really need the product_info.php.html to work since it has an include that keeps the session id through the catalog.

 

Should I reinstall or try to modify product_info.php directly?

 

-Tomoko

Link to comment
Share on other sites

Google-Translate:

 

Hello,

needs assistance with STS version 2.01 the installation perfectly functioned. do not get now with the categories the error that the side is present. Question also in the German forum under posed:

 

http://forums.oscommerce.de/index.php?showtopic=38092

 

if I categories puts on, also appears these and with clicks comes the following The requested URL/again/test which emergency found on this servers. The category is not called test and it finds these. How Mach I that it finds you?? Thanks for the assistance my English is not so good.

 

--------German-----------

 

Hallo,

 

ben?tige hilfe bei STS version 2.01

Der einbau hat perfekt funktioniert.

bekomme nun bei den Kategorien den Fehler das die seite nicht vorhanden ist.

Frage wurde auch im deutschen Forum gestellt unter:

http://forums.oscommerce.de/index.php?showtopic=38092

 

Wenn ich Kategorien Anlege, erscheinen diese auch. und bei klicken kommt folgendes

 

The requested URL /neu/Test was not found on this server.

 

Die Kategorie hei?t Test und er findet diese nicht.

 

Wie mach ich das dass er Sie findet??

 

Danke f?r die Hilfe. mein Englisch ist nicht so gut.

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