Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

benjmnm>>Yes, the sad part is, I just did another fresh install of ms2.2

and this template script.

 

Again, I still get this damn error. What good is this if I can't even read the html page?

 

Tx for at least replying.

Link to comment
Share on other sites

I think I fixed it.

 

I had to hard code the template variable to include a full path

 

And I had to comment out that user code line, which gave the last of the errors I received.

 

Now, I can modify the html template and it shows with the catalog, error free

 

Thanks

 

I know this is a brilliant mod, but man was that a frustrating scenerio.

 

But that, like most things, was a server issue.

 

I look forward to using this amazing script.

Link to comment
Share on other sites

I am sorry if this has been asked allready, but I am setting up several sites for some clients all running osCommerce. I have been doing only minor layout modifications and changes to the CSS, and they have all been happy with those simple mods, but one site I am working on I developed a nice flash header for, and I would like to template the site to match.

 

So, to use this, all I would need to do is lay out the images and set everything up just as I would a regular html page, but I would href= all the images to the appropriate oscommerce functions?

 

Is that what this is supposed to do, or is it simply a way of changing the layout of the specific functions so that you dont have to edit the index, column header, and footer columns?

Link to comment
Share on other sites

Well, I just used it on the site I was refering to and it made the installation of the header a lot easier :D. It installed perfectly with no problems at all. I will post a link to the store once it gets nearer to completion. I still am not sure how I can use it with an actuall template though, like from template monster or something.

Link to comment
Share on other sites

Please help. As soon as I install STS i get the following error when I try and access the admin panel

 

Fatal error: Failed opening required 'includes/classes/navigation_history.php' (include_path='.:/usr/share/pear') in /var/www/html/nos/catalog/admin/includes/application_top.php on line 126

 

The catalog works fine.

 

TIA

 

BC

Link to comment
Share on other sites

First of all, thanks for the awesome contrib! I was getting ready to spend a long weekend trying to sort through the code to get it to work with my customized layout but came across your contribution and it's perfect!

 

My only question is -- What do I need to do to get my own php tags working? It's probably really elementary...but I'd appreciate any help...the only php tag I'm trying to use is the include. Basically, $content is perfect, except in the header, I have an image (a tab to be specific) that is defined by HEADING_TITLE that changes from the homepage (Welcome) to the categories (Products)... but now it won't work. I'm not a programmer at all, I just know enough to modify/break things...if you could help I'd appreciate it, like I said it's probably really elementary.

 

Thanks alot and I'll post the catalog once it's finished!

Link to comment
Share on other sites

Just to update what I last posted...I did figure out how to create my own $title and that worked, except when I go into a product's detail, it shows "HEADING_TITLE".

 

This is all I added to sts_display_output.php

 

$template['title'] = (HEADING_TITLE);

Link to comment
Share on other sites

First of all, thanks for the awesome contrib!  I was getting ready to spend a long weekend trying to sort through the code to get it to work with my customized layout but came across your contribution and it's perfect!

 

My only question is -- What do I need to do to get my own php tags working?  It's probably really elementary...but I'd appreciate any help...the only php tag I'm trying to use is the include.  Basically, $content is perfect, except in the header, I have an image (a tab to be specific) that is defined by HEADING_TITLE that changes from the homepage (Welcome) to the categories (Products)... but now it won't work.  I'm not a programmer at all, I just know enough to modify/break things...if you could help I'd appreciate it, like I said it's probably really elementary.

 

Thanks alot and I'll post the catalog once it's finished!

 

You can't put PHP code in the template file itself, but you can create a new template variable and assign it's value with PHP.

 

In sts_user_code.php you can put something like this:

 

$template['tabname'] = HEADING_TITLE;

 

Then you can use $tabname in your template file wherever you like.

 

This help?

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

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

Link to comment
Share on other sites

Hi

A couple of days ago I left a reference to a forum subject about STS not being compatable with the Worldpay payment system..... worldpay thread

 

I wonder, as anyone had any problems or can comment on this.... I like STS a lot ... but there is no point in having the greatest looking e/commerce site if customers cant purchase from it :D

 

Thanks Malc

Link to comment
Share on other sites

You can't put PHP code in the template file itself, but you can create a new template variable and assign it's value with PHP.

 

In sts_user_code.php you can put something like this:

 

$template['tabname'] = HEADING_TITLE;

 

Then you can use $tabname in your template file wherever you like.

 

This help?

Thanks that does help!

 

But with HEADING_TITLE, under product_info.php the template just says "HEADING_TITLE" in the spot where that tag is. It works fine everywhere else (shipping.php, checkout related pages) except on this one. Any ideas?

Link to comment
Share on other sites

I have a quick question. If I wanted to install new infoboxes on my site that uses the STS system, Do I still need to add the infoboxes to the Column_left or Column_right php files, or do I just make a referance to them in the STS html file?

Link to comment
Share on other sites

Hi veetkam

Thanks for your reply... it was this link I was refuring to... http://www.oscommerce.com/forums/index.php?sho...ic=55504&st=50..

 

But its seems you may have some of the answers

 

In all .php who are to display without STS - somwhere in the beginning of the codepart

 

Can you tell me which .php pages I need to add the following code...

// ****** flag to prevent STS template-system 
$notemplate = "YES";
// ****** end

 

 

And which Worldpay Module are you using :D

 

Thanks Malc

 

 

 

 

 

 

In all .php who are to display without STS - somwhere in the beginning of the codepart

Link to comment
Share on other sites

And which Worldpay Module are you using 

 

I'm using the latest version of this contribution:

 

http://www.oscommerce.com/community/contributions,882

 

I have set the "$notemplate - Flag" in wpcallback.php and in checkout_process.php .

 

(I have also added some changes described in the forum-thread to this contribution - but I think thats beside the discussion of using STS/Worldpay).

 

If the Module runs on your installation without using STS - then it will also run if you set the "$notemplate - flags" (and - of course - the small addition in the sts_display_output.php)

 

Greetings - veetkam

Link to comment
Share on other sites

I have a quick question. If I wanted to install new infoboxes on my site that uses the STS system, Do I still need to add the infoboxes to the Column_left or Column_right php files, or do I just make a referance to them in the STS html file?

Update on this. I tried to install the Banner in a Box contrib just as I did on my site that does not run STS, following the exact instruction provided in the contrib.

 

That did nothing. Then I added $box-ad to the STSTemplate.html file and it did make the banner box show up, but it also messed up the location of the other banners. I put it on the left hand side of the template and it made half of my infoboxes that are supposed to be on the right hand side appear on the left underneath the banner box.

 

Has anyone successfully used both of these contributions? If so, what do you have to do differently from the normall instructions?

Link to comment
Share on other sites

I've done the easy install and get the following error. Any ideas?

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /var/www/html/ShopOnline/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/ShopOnline/includes/application_top.php on line 511

Link to comment
Share on other sites

I did the advanced install and followed it to a T! and I get

Fatal error: Call to a member function on a non-object in /home/daniella/public_html/os/includes/sts_display_output.php on line 189??

 

any ideas? should it be displaying the default template on index.php

Link to comment
Share on other sites

I had version 1.3 working perfectly, but that was done weeks ago, when I temporarily stopped working on the cart. Today when I went back to it, I decided to install v 1.8 -- to be at the latest version.

 

I used beyond compare to update all of the sts files which had changed. I uploaded the changed files -- when I ran the catalog, I got the following message:

 

Template file doesn't exist: [includes/sts_template.html]

Warning: fopen(STS_DEFAULT_TEMPLATE): failed to open stream: No such file or directory in /www1/guatemalafairtrade.com/html/catalog/includes/sts_display_output.php on line 82

Can't open Template file: [sTS_DEFAULT_TEMPLATE]

Warning: filesize(): Stat failed for STS_DEFAULT_TEMPLATE (errno=2 - No such file or directory) in /www1/guatemalafairtrade.com/html/catalog/includes/sts_display_output.php on line 86

 

Warning: fread(): supplied argument is not a valid stream resource in /www1/guatemalafairtrade.com/html/catalog/includes/sts_display_output.php on line 86

 

Warning: fclose(): supplied argument is not a valid stream resource in /www1/guatemalafairtrade.com/html/catalog/includes/sts_display_output.php on line 87

 

Anyone have an idea what I have done wrong?

thanks,

Murray

Link to comment
Share on other sites

Sorry,I posted too soon. I found the problem which was I didn't change the lines in /catalog/includes/configure.php script, from the old v1.3 to the current lines. Works okay now --

Link to comment
Share on other sites

I'm now running into the same problem for Purchase Without Account (PWA). When I turn on $display_normal_output for debugging the Order_Info.php page displays below the sts_template.html. So I guess what's happening is STS doesn't know how to recognize Order_Info.php.

 

Like I've said before, I'm not a programmer.. so for those of you that are, maybe you could help me about how to make STS recognize this file? Maybe something needs to be added to the sts_user_code.php?

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