Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi,

 

I just installed STS v4.2 and I am getting this error message at the very bottom of every page:

 

Fatal error: Cannot redeclare tep_get_category_tree() (previously declared in /home/fruittra/public_html/includes/modules/sts_inc/sts_user_code.php:33) in /home/fruittra/public_html/includes/modules/sts_inc/sts_user_code.php on line 33

 

:(

 

can anyone help me?

 

Thanks,

 

Grant

Your sts_user_code.php file is called twice. Check in the admin, STS module, default, that the parameter "Files for normal template" contains only once "sts_user_code.php".

 

The file sts_display_output.php should be called only from sts_footer.php (at the end of the file). Check that you have nothing related to STS in the application_bottom.php file.

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 just managed to fix this. I just had to delete Notifications from the template and that got rid of one of them. Thanks anyways.

 

Joe

Joe, the user manual explains how some of the variables will call up the same "infobox" is certain situations. This is what was happening in your case.

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

This should work without any other implementation by you. Did you check to be sure you did not set an expiration date on your product with the special price in the admin?

 

Hi, the date is either blank or set to 31 dec 2009

 

I see the prices correctly in the specials' box (original price and the new one) and in the category list of products but if I open the product's page I only get the original one (with the standard style and not with the barred one).

 

Any suggestion? Do I have to put a placeholder in the product page to show the new price? if so, which one?

And why doesn't the old price show up as barred?

Link to comment
Share on other sites

OK, Now I realy need help here guys.

 

I have installed STS 4.2 (the one without HTC).

 

Now, When I turen on STS 4.2 in my Admin panel I end up with a blank page. If I turn STS off in admin The page displays correctly.

 

When I look at the code in IE I can see the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

 

If I look in my template file I have NOT included a <!DOCTYPE> so I don't know where this come from...

 

The funny thing is that if I run the W3c validator on my index.php with STS turned on in admin it validates it.

(the code that doesn't show up in IE that is).

 

Does anyone have any Id?a on this? Is there some problem with STS 4.2 since it workes if I turn it off?

 

Thanks!

 

Fredrik

Link to comment
Share on other sites

OK, Now I realy need help here guys.

 

I have installed STS 4.2 (the one without HTC).

 

Now, When I turen on STS 4.2 in my Admin panel I end up with a blank page and when I look at the source code in IE I can see the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

 

If I turn STS off in admin The page displays correctly.

 

The strange thing is that if I run W3c validator on my index.php with STS turned on in admin it validates the hwole page (including the code that doesn't show up in IE, that is).

 

Does anyone have any Id?a on this? Is there some problem with STS 4.2 since it workes if I turn it off?

 

Thanks!

Fredrik

Edited by fredriksk
Link to comment
Share on other sites

OK, Now I realy need help here guys.

 

I have installed STS 4.2 (the one without HTC).

 

Now, When I turen on STS 4.2 in my Admin panel I end up with a blank page and when I look at the source code in IE I can see the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

 

If I turn STS off in admin The page displays correctly.

 

The strange thing is that if I run W3c validator on my index.php with STS turned on in admin it validates the hwole page (including the code that doesn't show up in IE, that is).

 

Does anyone have any Id?a on this? Is there some problem with STS 4.2 since it workes if I turn it off?

 

Thanks!

Fredrik

Check your GZip compression setting in your admin. Either set it to False or lower the setting.

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 have a tiny problem here ;

i've installed STS 4.2 , it was first contribution for my shop so i did a clean install

i didn't get any errors etc. it went all good, my page's default language is Turkish so i had to modify language files as told in upgrade text.

 

Now , im still not getting any errors but i cant show any templates too. I've tried diffrent templates , sts's default template , i've checked paths once again , checked install/readme texts , manuals ..

 

i know it sounds kinda weird but who knows :)

 

 

Thanks in advance for any help.

 

Can

Link to comment
Share on other sites

WOW! It worked when I turned it off.

 

Why does this problem arise when I use Gzip compression?

 

Wont my site be slower now when I turn Gzip off?

You can still use Gzip, just lower the setting to something that works such as 4 or 5.

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 have a tiny problem here ;

i've installed STS 4.2 , it was first contribution for my shop so i did a clean install

i didn't get any errors etc. it went all good, my page's default language is Turkish so i had to modify language files as told in upgrade text.

 

Now , im still not getting any errors but i cant show any templates too. I've tried diffrent templates , sts's default template , i've checked paths once again , checked install/readme texts , manuals ..

 

i know it sounds kinda weird but who knows :)

 

 

Thanks in advance for any help.

 

Can

Did you enable the STS modules in the admin? For the most basic use of STS, using only one template page for all of your pages in your shop, you will need to at least enable the STS Default Module (set it to TRUE).

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 modules in the admin? For the most basic use of STS, using only one template page for all of your pages in your shop, you will need to at least enable the STS Default Module (set it to TRUE).

 

Thanks Bill , but im totally sure that i did.

i may be missing something but its not in install doc.

 

 

Can

Link to comment
Share on other sites

one or more files might be corrupted, but i've uploaded the shop and tst contrib a several times. the status window in Flashfxp didn't show any errors. next to that, i contacted the sysadmin for a errorlog, and nothing unusual was in it. in my opinion i don't think i've uploaded the contrib in the wrong folder. i just overwrote the catalog folder with the contribs catalog folder.

 

is it possible that a certain php module isn't loaded on the server's side, because everything works fine locally.

 

ciao, pavlovski

 

hi!

 

after a small research i found the reason for this problem wich makes it impossible to activate sts.

magic_quotes_gpc should be switched on in the php core. or, when possible, the .htaccess file can be modified instead. just add this line at the end of the file: php_flag magic_quotes_gpc on

 

tada!

Link to comment
Share on other sites

Hi,

 

Please excuse my newness here - just trying out osc and getting use to it. OK. I have installed STS 4.2 and I can see it is working. I have now developed a template with Photoshop with mouseover layers. I have attached links to these mouseovers/images.

 

The problem I am having is with the links I have created. If I use any of the links I have created then I seem to lose my login. These links are directed towards account.php , shopping_cart.php and contact_us.php.

 

If I use the existing links that are supplied with the example STS template it all works fine (of course).

 

Can anyone tell me what I have done wrong. Do I need to put some php script in the href instead of a straight link to account.php?? Is the java script that is automatically generated by photoshop/imageready causing the problems???

 

BTW - I like STS - just wish I could understand it all blush.gif

 

Laurie

Link to comment
Share on other sites

Your sts_user_code.php file is called twice. Check in the admin, STS module, default, that the parameter "Files for normal template" contains only once "sts_user_code.php".

 

The file sts_display_output.php should be called only from sts_footer.php (at the end of the file). Check that you have nothing related to STS in the application_bottom.php file.

 

 

Thanks for that Bill, I took out some STS lines I had in application_bottom.php and it stopped the error.

 

Grant

Edited by Grant7
Link to comment
Share on other sites

I've been using osCommerce and STS for years on our site. And it's worked GREAT! We were using an ancient version of both STS and oscommerce, I think STS v2. All I remember is having to hand edit what seemed like hundreds of php files when I installed it.

 

Well, our web host started becoming flakey (the site was hosted on his home machine). So we decided to move to a real host.

 

Anyway, now I'm trying to install STSv4.2. I have oscommerce-2.2ms2-060817 installed and working fine. The STS is the one without HTC. It's a completely clean install. I followed the directions and copied clean_osc/catalog/* into catalog/.

 

The modules show up fine in the admin panel and I can install the default module. But I can't set "Use templates" to true no matter what I do. Either with the default stuff from test or with my modified template. It just will not work. This is VERY frusterating.

 

I think it may be failing in includes/modules/sts/sts_default.php at:

function find_template (){

// Return an html file to use as template

// Check if there is a template for this script

$check_file = STS_TEMPLATE_DIR . basename ($_SERVER['PHP_SELF']) . ".html";

if (file_exists($check_file)) return $check_file;

 

// No template for this script, returns the default template

return STS_DEFAULT_TEMPLATE;

} // End function

 

But I can only assume that since there are no error messages - nothing happens. It just stays set to 'false'.

 

Can anyone suggest a ?sts_debug= line that might help diagnose the problem? Could it be a file permissions problem? I didn't notice any place where STS modifies a file (configuration.php, etc) but maybe I missed something.

 

I noticed several people with the similar problem in this thread but they were either trying to install earlier version of STS or had other conflicting modules installed. This is a fresh install.

 

Please help. I'm at my rope's end!

Link to comment
Share on other sites

So since STS was working in debug mode at:

/catalog/index.php?sts_debug=debug

 

I tried logging into MySQL and turning STS on manually like so:

mysql> select * from configuration where configuration_title='Use Templates?';
+------------------+---------------------+---------------------------+---------------------+--------------------------------------------+------------------------+------------+---------------+---------------------+--------------+-----------------------------------------------+
| configuration_id | configuration_title | configuration_key		 | configuration_value | configuration_description				  | configuration_group_id | sort_order | last_modified | date_added		  | use_function | set_function								  |
+------------------+---------------------+---------------------------+---------------------+--------------------------------------------+------------------------+------------+---------------+---------------------+--------------+-----------------------------------------------+
|			  161 | Use Templates?	  | MODULE_STS_DEFAULT_STATUS | false			| Do you want to use Simple Template System? |					  6 |		  1 | NULL		  | 2006-09-18 10:11:43 | NULL		 | tep_cfg_select_option(array('true', 'false'), |
+------------------+---------------------+---------------------------+---------------------+--------------------------------------------+------------------------+------------+---------------+---------------------+--------------+-----------------------------------------------+
1 row in set (0.01 sec)

mysql> update configuration set configuration_value='true' where configuration_id=161;
Query OK, 1 row affected (0.00 sec)

 

And now it works. But oddly enough it takes about 2 seconds for a page to display. The debug info looks fine, it's all really odd. Anyone have any ideas?

Link to comment
Share on other sites

I have a fully moded store front with a boat load of customizations and contributions. I installed the STS4 but when I enable it, I get the following error message in the browser.

 

STS4 was designed to work with OSC version [osCommerce 2.2-MS2]. This is

version [osCommerce 2.2-MS2-CVS].

 

How can I upgrade my Oscommerce to the correct version and keep my mods installed and enable STS4? Do I need to start from scratch and just copy my data over?

 

Any help would be appreciated.

 

Thanks. blush.gif

Link to comment
Share on other sites

Hi everybody,

 

Version 4 is a major release of the excellent STS contribution that you can find here: http://www.oscommerce.com/community/contributions,1524,

 

I started a new thread to not mix with STS v2/v3 questions and because the v2/v3 thread has reached 147 pages! If you have problem with STS v2 or v3, please look here: http://www.oscommerce.com/forums/index.php?sho...541&st=2920

The main advantages of this release are:

 

- Less code and several improvements, so should be faster..

- All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes.

- Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules).

- Write own module for checkout, create account or else: easy to share like payment modules.

- Switch STS on/off from admin. When off, you will see your store like it was before STS installation.

- Debug mode still available from URL, but with a code defined by admin => works like a password.

- If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors.

- Ready for product page caching. Not implemented yet, but doors are open.

- Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template).

- Installation is still very easy, modifications only at beginning and end of some files.

- Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template.

- All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications.

- Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean.

- Possibility to write php script in the templates, like in STS v3.

- Compatible with templates made for STS v2 or v3

- Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7, only few small modifications).

STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution.

Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS.

 

Changelog from STS PLUS v4.0.7:

 

- UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store.

- DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php

- UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here.

- UPDATED examples in sts_user_code.php.

- UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead.

- UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates.

- UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column.

You can also have a look at the STS PLUS thread here: http://www.oscommerce.com/forums/index.php?showtopic=187122, as many problems you will face have been discussed there.

 

- Rigadin

 

This is a GREAT addition!!

However, I just can't seem to get the Index Module to work properly. It won't recognize any of my new templates for the categories and keeps going back to the DEFAULT template. What am I doing wrong. *** Using latest version of oscommerce with a clean install of sts4.2

Bradd

Link to comment
Share on other sites

... I have oscommerce-2.2ms2-060817 installed and working fine...

until one day you want to change some settings under the modules (be it payment, shipping, sts), you discover it just won't updated how many time you try it (well, the devil is in the details :) )! If what I've just said fits in your situation, then you are likely bited by a little 'bug' in the 060817 update (the changes made to the compatibility.php). A couple of work-arounds have been posted in the forum, which you can find under News and Announcements -> osCommerce 2.2 Milestone 2 060817 Update Released -> (page 4).

 

Bradd's problem could also be solved that way if what he refers to 'the newset version' means the same as mentioned above.

 

Good Luck,

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

until one day you want to change some settings under the modules (be it payment, shipping, sts), you discover it just won't updated how many time you try it (well, the devil is in the details :) )! If what I've just said fits in your situation, then you are likely bited by a little 'bug' in the 060817 update (the changes made to the compatibility.php). A couple of work-arounds have been posted in the forum, which you can find under News and Announcements -> osCommerce 2.2 Milestone 2 060817 Update Released -> (page 4).

 

Bradd's problem could also be solved that way if what he refers to 'the newset version' means the same as mentioned above.

 

Good Luck,

Ken

 

Thanks Ken!

 

For some reason, I have no idea why but it's working now. After a few minues of it running slowly it seems to be fine now. Probably related to page caching. So I guess the solution was to manually set configuration_value='true' in the configuration table.

 

Now I'm spending time removing all the extra cruft that I can't get rid of, even with STS (like the "New Products" table) in $content.

 

Thanks all, whoohoo!

Link to comment
Share on other sites

For some reason, I have no idea why but it's working now. After a few minues of it running slowly it seems to be fine now. Probably related to page caching. So I guess the solution was to manually set configuration_value='true' in the configuration table.

No, my post is related to the update problem of sts in modules, not your performance issue.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Hey Guys, I've got STS installed and templated and everything, the index works fine, the static pages (shipping, TOS) pages work fine and the product info pages work, however I can't bring up content on manufacturer or category pages, even using the full and test templates, is there something I'm missing?

Link to comment
Share on other sites

I'm working on a brand new installation and wanted to give this contribution a try.

 

I installed OSC, and then copied over the files from the contribution modifed the permissions, and then did the installation.

 

But in my admin panel, there's no module to activate. Have I missed a step?

 

Thanks,

 

Gin

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