Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I am moving a old Oscommerce setup to a new server.. It uses Oscom ver 2.2 ms 2 and STS-2_01

Everything works fine with the shop when I am testing, except that custom templates will not show up when I move around the catalog. If I try a "index?cPath=**" page that has a custom template attached to it...it will only use the default index.php_0.html and not the appropriate index.php_**.html template. BTW I can see the STS debug info (after changing $display_debugging_output in sts_display_output.php) and I am not getting any error messages from oscom.

 

I did have to add a .htaccess file in my catalog directory containing "php_flag register_globals on". I know I had to add it due to a PHP version change on the new server (from 4 to 5). Could the php version change be the problem? I would rather not downgrade to PHP version 4 or upgrade the sts/oscom code but any suggestions would be seriously appreciated :)

Did you enable the STS Index 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

Did you enable the STS Index Module?

 

 

I am not sure where to enable that. I do have $display_template_output = 1; set in sts_display_output.php. I don't remember there being any calls to sts in the admin section in this old version of sts but, it's been a few years since I messed with this setup.

Link to comment
Share on other sites

I am not sure where to enable that. I do have $display_template_output = 1; set in sts_display_output.php. I don't remember there being any calls to sts in the admin section in this old version of sts but, it's been a few years since I messed with this setup.
oops...my fault. I over-looked that you mentioned you were using the older 2.01 version. That version does not have the module configuration like version 4x.

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

oops...my fault. I over-looked that you mentioned you were using the older 2.01 version. That version does not have the module configuration like version 4x.

 

Not a problem! The code i am using is a bit ancient...perhaps I should look into upgrading the mod. From reading some of the docs it looks like I would have to un-install the old version to update it. My site has a ton of templates and box code for sts_user_code.php and it makes me nervous to have to mess around with it. I should also check to see if I missed a vital update for Oscom 2.2 ms2

Link to comment
Share on other sites

Not a problem! The code i am using is a bit ancient...perhaps I should look into upgrading the mod. From reading some of the docs it looks like I would have to un-install the old version to update it. My site has a ton of templates and box code for sts_user_code.php and it makes me nervous to have to mess around with it. I should also check to see if I missed a vital update for Oscom 2.2 ms2
Regarding updating, you would still be able to use your older templates and you still have the option of NOT using the infobox templates if you already have the boxes "hard coded" the way you like them. NOTE: Save your sts_user_code.php file so that you can "merge" in your custom tags and code.

 

A few tags have become obsolete but are detailed very well in the STS User Manual so this should not hurt you too much.

Yes, it is true that you would have to uninstall first and that is because the code has changed so much for the better (optimized) and configuration is done with modules now, just like the payment and shipping modules.

Here is a great tool to help get your osC shop up to date with all of the patches and fixes:

osC Update Contribution

 

Good luck,

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

Fatal error: Call to undefined function tep_get_products_head_title_tag() in /home/*****/public_html/shop/admin/categories.php on line 583

[displays under] Meta Tag Information, Product Title Tag:

Im getting the above when in admin and trying to add new products, also:

 

Fatal error: Call to undefined function tep_get_category_htc_title() in /home/*****/public_html/shop/admin/categories.php on line 1016

when editing catagory info.

 

using sts 4.5.2 & htc bundel.

 

home develop comp has the same setup but in add new products under admin, i dont have the normal buttons for update and cancel (same too on remote server). also, after Product Title Tag: is blank, nothing there??? I have included:Files for normal template

sts_user_code.php;headertags.php under sts module. any ideas please?

Link to comment
Share on other sites

I am doing a bit of research about osCommerce and I'm wondering if you can tell me if there are any known conflicts between the STS contribution and the Ultimate SEO contribution? I've searched the forums, but at 187 pages long, I didn't come up with anything. I've heard that any SEO contribution that alters a URL will conflict with the STS Template contribution. You seem to be the experts on the subject.

 

Thanks for your input.

Link to comment
Share on other sites

Hello All, and thanks for this great contribution!

 

I have STSv4.5.2 and HTCv2.6.3 Bundle installed and it's working great! I have also installed "Reviews on Product Info Page" and it works as long as I have STS turned off. I tried to find info in the forums but couldn't find the answer. How do I go about getting this to work in STS?

 

Thanks in advance for any help! James

Link to comment
Share on other sites

I am doing a bit of research about osCommerce and I'm wondering if you can tell me if there are any known conflicts between the STS contribution and the Ultimate SEO contribution? I've searched the forums, but at 187 pages long, I didn't come up with anything. I've heard that any SEO contribution that alters a URL will conflict with the STS Template contribution. You seem to be the experts on the subject.

 

Thanks for your input.

 

If you have not found anything in the 187 pages, it means that nobody has problem with these 2 contributions working together. STS is not touching any URL, so it can't conflict with contributions altering URL. I'm using both contributions without trouble.

 

- Chris

Link to comment
Share on other sites

Hey,

 

(Sorry for my worse English)

 

At first this is a great Template System and it was , until now, very easy to use.

 

Now i have a problem. I configured my Template, but when the login form is used the default Template is shown again. I don't know how to correct this.

 

The Main Page

 

The Login

 

It would be very nice if anyone could help me.

 

Greetings, Cygn

 

Anyone here who is ready to solve this problem for a little bit money? i cannot fix this myself and my time is running out.

Link to comment
Share on other sites

I'm sorry to add another post, but the search system here sucks so much I'm not able to retrive an answer.

 

My STS Template doesn't get the OSC's Tittle tag! I don't have installed HTC. I insert in both index.php.html and sts_template.php.html both the "$htmlparams" and "$headcontent" tags, without the title tag inserted. Instead of getting my store's name I just get "osCommerce" what's wrong!?!

Link to comment
Share on other sites

I'm sorry to add another post, but the search system here sucks so much I'm not able to retrive an answer.

 

My STS Template doesn't get the OSC's Tittle tag! I don't have installed HTC. I insert in both index.php.html and sts_template.php.html both the "$htmlparams" and "$headcontent" tags, without the title tag inserted. Instead of getting my store's name I just get "osCommerce" what's wrong!?!

Are you sure that you have everything in the Admin defined regarding your store name?

 

Regarding Meta Tags: OsCommerce does not have this ability "built in" so you have to add one of the meta tag contributions such as HTC to get this feature. You could also add the title tag to the template itself but that would not be the dynamic way of doing it.

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

Anyone here who is ready to solve this problem for a little bit money? i cannot fix this myself and my time is running out.

 

Have you done what I had suggested in your prior posting such as compare your osC files with a stock osC to make sure you were not missing code? Also, did you compare your STS files on your server with the files that came with the STS contribution to make sure you were not missing anything?

 

This is either from a bad STS installation or some bad code on your end that you may have added/removed from a previous edit and/or contribution installation.

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

quick noob question

 

 

with the STS u still have to modify a few php files right?

 

which are the main php files that will need to be used ?

 

thanks

KC, don't take this the wrong way but have you read the STS User Manual? The text answers a lot of your previous posts. Also, you should familiarize yourself with the osCommerce flow before diving in too deep with STS. You should have a good understanding of what pages do what within the shop so you know which pages to create a custom template for as well as understand what the STS varibles (tags) actually represent. :thumbsup:

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

Hello All, and thanks for this great contribution!

 

I have STSv4.5.2 and HTCv2.6.3 Bundle installed and it's working great! I have also installed "Reviews on Product Info Page" and it works as long as I have STS turned off. I tried to find info in the forums but couldn't find the answer. How do I go about getting this to work in STS?

 

Thanks in advance for any help! James

 

 

James,

I do not use that contribution but a general rule applys to any contribution that requires a change to be made in the product_info.php file.

 

Whatever changes are made in product_info.php you will need to duplicate in /includes/sts_product_info.php and assign the HTML generated by the code to a template variable (such as $template['moreimages'] or $template['image2'] or however you choose to implement it.

 

Then just use the variables you created ($moreimages, $image2, etc) in your template where you want it to appear. :thumbsup:

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

in relation to: MEGA STS POWER PACK BUNDEL

 

registerglobals

sts4.5.2

htc2.6.3

dynamenu

 

Fatal error: Call to undefined function tep_get_products_head_title_tag() in /home/*****/public_html/shop/admin/categories.php on line 583

[displays under] Meta Tag Information, Product Title Tag:

Im getting the above when in admin and trying to add new products, also:

 

Fatal error: Call to undefined function tep_get_category_htc_title() in /home/*****/public_html/shop/admin/categories.php on line 1016

when editing catagory info.

 

using sts 4.5.2 & htc bundel.

 

home develop comp has the same setup but in add new products under admin, i dont have the normal buttons for update and cancel (same too on remote server). also, after Product Title Tag: is blank, nothing there??? I have included:Files for normal template

sts_user_code.php;headertags.php under sts module. any ideas please?

 

megapwrpac_fixMatthewRitchie13 Jun 2007After much head scratching a fault has been found and here is the fix.

 

problem: i over wrote a file somehow so this is the replacement with the missing code put back where it should be.

 

this file goes / replaces file in:

catalog/admin/includes/functions/general.php

 

one file only; please write down the path or keep this page open for reference - no text.txt help instructions.

 

sorry folks, mjr.

 

please see http://www.oscommerce.com/community/contributions,4456 for fix file.

Edited by MatthewRitchie
Link to comment
Share on other sites

KC, don't take this the wrong way but have you read the STS User Manual? The text answers a lot of your previous posts. Also, you should familiarize yourself with the osCommerce flow before diving in too deep with STS. You should have a good understanding of what pages do what within the shop so you know which pages to create a custom template for as well as understand what the STS varibles (tags) actually represent. :thumbsup:

 

 

bkellum ... yea i read the sts user manual, it answers them to an extent, could you tell me for the STS can you customize everything if your using the test temp..

 

for instance.. the left column, can i set a bg for it w/o affecting the main content?

 

are the benefits of the full temp ... so you can set temps to change out content.. ex. "infoboxes"?

Link to comment
Share on other sites

James,

I do not use that contribution but a general rule applys to any contribution that requires a change to be made in the product_info.php file.

 

Whatever changes are made in product_info.php you will need to duplicate in /includes/sts_product_info.php and assign the HTML generated by the code to a template variable (such as $template['moreimages'] or $template['image2'] or however you choose to implement it.

 

Then just use the variables you created ($moreimages, $image2, etc) in your template where you want it to appear. :thumbsup:

 

Bill,

I must confess that when it comes to installing contributions or following instructions I'm fairly proficient, but when it comes to creating or writing code I'm like a fish out of water... flopping around and gasping!

 

The only changes that are made in product_info.php by this contribution is one line of code

include(DIR_WS_MODULES . 'product_reviews_info.php');

and there is only one new file in includes/modules/product_reviews_info.php to contend with.

 

So here goes my flopping and gasping.

 

1. I created a Placeholder of $reviewinfo and added it in my includes/sts_templates/test/content/product_info.php_28.html where I wanted it to show.

 

then

 

2. I added this line

$template['reviewinfo'] = include(DIR_WS_MODULES . 'product_reviews_info.php');

into my includes/modules/sts/sts_product_info.php and it shows on the top of my page (although it's not showing the one review it should be showing).

 

So since that didn't work!

 

3. I added the same line of code to includes/modules/sts_inc/product_info.php and it shows up with the correct info but it shows at the very top of the page.

 

Something tells me I dunno how to create a template variable :huh: James

Link to comment
Share on other sites

bkellum ... yea i read the sts user manual, it answers them to an extent, could you tell me for the STS can you customize everything if your using the test temp..

 

for instance.. the left column, can i set a bg for it w/o affecting the main content?

 

are the benefits of the full temp ... so you can set temps to change out content.. ex. "infoboxes"?

 

KC

 

With STS you can add backgrounds anywhere you want them and do anything you normally do with HTML, as far as infoboxes you can create a different background for each category sub-category and for every product if you wanted too!

 

Basically the only difference for the Full and Test is you have to select which folder you want to use via admin so if you wanted too you could redesign your site and switch folders (full to test) to view your new design without loosing your old design.

 

Or

 

If you wanted too... you could even create new folders in the sts_templates folder and add a set of templates for each holiday (x-mas, easter, 4th of july, Halloween etc) and switch them on or off via admin!

 

Hope this helps! James (now if I can learn how to create placeholders..I'd be a expert) :P

Link to comment
Share on other sites

Are you sure that you have everything in the Admin defined regarding your store name?

 

Regarding Meta Tags: OsCommerce does not have this ability "built in" so you have to add one of the meta tag contributions such as HTC to get this feature. You could also add the title tag to the template itself but that would not be the dynamic way of doing it.

Thanks for the answer first of all!

 

Yeah everything in the admin is set correctly. All the titles have been set.

 

As for the "fixed" title tag in the template file, you're right I could have done this and actually i did! thing is that I'd like it to be dynamic. but clearing the title tag makes the "osCommerce" title to appear, and not the correct set in the admin panel.

 

Any Ideas?

Thanks!

Link to comment
Share on other sites

Hi,

 

I just installed STS, but when I go to the Admin>Module>STS and I want to set the Default Template: Use Templates? to true, nothing happens.

It justs stays on false?? How can I fix this?

 

Thanks!

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