Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Running the installation on a stock osC does prove something...that the code works on a stock osC shop. Your shop may not be a stock osC shop as you have tinkering with error correction and all. You may have deleted something that was needed.

 

thumbsup.gif TIP: Use a file comparison tool such as BeYond Compare or WinMerge to compare the download package with your site files and then let me know.

 

What you proved is a clean install of 4.6 works on a stock OSC store, it didn't show that upgrading from 4.5.8 to 4.6 as described in the instructions works which is what the problem at hand is.

 

It is one change in one place, not hard to do and I know it was done correctly.

Share this post


Link to post
Share on other sites

Well, why wouldn't it if it was working with v4.5.8 before?? blink.gif

 

That still doesn't show what went wrong during your recent upgrade installation.

 

I'm just stating that something is wrong in the installation guide for this error to have happened only after putting in the new code since it went away when I deleted the new lines.

Share this post


Link to post
Share on other sites

What you proved is a clean install of 4.6 works on a stock OSC store, it didn't show that upgrading from 4.5.8 to 4.6 as described in the instructions works which is what the problem at hand is.

 

It is one change in one place, not hard to do and I know it was done correctly.

 

 

Are you asking a question?

 

Did you try using a file comparison tool to see if everything uploaded properly?


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Found your error in the instructions, if done as decribed in your instructions the code ends up like below.

 

          eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
	// STS V4.6 drop start
       } else {
		if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
			$dir_name = array();
			if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
			   while (false !== ($file = readdir($handle))) {
					$pos = strpos($file, ".");
					if($pos === false){
						$dir_name[] = array("id" => $file, "text" => $file);
						$i++;
					}
				}
				closedir($handle);
			}
			$keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
		}else{
			$keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
		}
       }
	// STS V4.6 drop end
         $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
       }
       $keys .= '<br><br>';
     }
     $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

 

This means that the following line is shown twice

 

          $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
       }

 

Another case of incorrect instructions...

 

Make sure you did not add an extra } at the end of that code segment. It should look like the following:

 

     	eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
 // STS V4.6 drop start
   	} else {
  if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
   $dir_name = array();
   if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
  	while (false !== ($file = readdir($handle))) {
     $pos = strpos($file, ".");
     if($pos === false){
      $dir_name[] = array("id" => $file, "text" => $file);
      $i++;
     }
    }
    closedir($handle);
   }
   $keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
  }else{
   $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
  }
   	}
 // STS V4.6 drop end
   	$keys .= '<br><br>';
 	}
 	$keys = substr($keys, 0, strrpos($keys, '<br><br>'));


Share this post


Link to post
Share on other sites

Found your error in the instructions, if done as decribed in your instructions the code ends up like below.

 

 

Another case of incorrect instructions...

 

 

 

 

I provided all of the files that you needed and all you had to do was compare them and you would have been up and running.

 

WOW!!! So sorry. I guess I charge too much for my contributions.

 

Nice attitude by the way. You will not get much free support around here if you keep that up. pinch.gif


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

If people are supposed to compare the files then don't include instructions for manually copy and pasting the new code.

 

Sorry if I come off as rude but no one ever wants to accept they did something wrong and always blame it on the end user.

Share this post


Link to post
Share on other sites

If people are supposed to compare the files then don't include instructions for manually copy and pasting the new code.

 

Sorry if I come off as rude but no one ever wants to accept they did something wrong and always blame it on the end user.

 

 

Yes, you did come across as very rude. We are all in this together trying to improve our shops. You would have been better recieved had you offered up some corrections to the upgrade installation notes rather than being so critical to someone who is offering it up for free in the first place.

 

"Thanks for changing my flat tire but next time could you be waiting by the curb for me in advance. I'm in too much of a hurry."

 

I'll wait to correct the upgrade instructions until other errors may pop up or someone finds something useful to add to the package.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Great add on...only one thing I need at this point.

 

I want each infobox to have a unique background design. Preferably to be controlled by div/css... I was wondering how I can achieve this with your contribution?


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

I want each infobox to have a unique background design. Preferably to be controlled by div/css... I was wondering how I can achieve this with your contribution?

 

You can have a unique template for each infobox, call it ie infobox_specials.php.html and put it into the boxes folder of your template folder. To this template you can add as much css as you want

Share this post


Link to post
Share on other sites

Hi Bill and people.

 

I was thinking about the changes made in classes/boxes.php, that are affecting the modules, like new_products.php, featured.php etc.

 

Till now (v4.5.8) the got treated exactly like boxes, so, if having a template for infobox_featured.php.html it was showing for both, the infobox and the included module on the frontpage or wherever else. Modules without a particular template were following the general infobox.php.html template. After the changes (v4.6), all "modules" got separated:

		if($module_file==1) { // v4.6
		 $template ='$content'; // Default box already in memory, get it from there //v4.6

In the same time, the ability to control each module separately got lost also. Because I want to keep on controlling this, I changed the above original code to this:

		if($module_file==1) { // v4.6 
		 $boxprefix = "module_"; // mm 17 2 10
		 if (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html")) { // mm 17 2 10
		 $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html");// mm 17 2 10
		 } else { // mm 17 2 10
		$template ='$content'; // Default box already in memory, get it from there //v4.6  
		} // mm 17 2 10

I can now create separate templates for each module having the prefix module_ in front of the filename and placing the template to the boxes folder of my template folder ie module_also_purchased_products.php.html

Share this post


Link to post
Share on other sites

You can have a unique template for each infobox, call it ie infobox_specials.php.html and put it into the boxes folder of your template folder. To this template you can add as much css as you want

 

There is no boxes folder..can I just create a boxes folder in catalog/includes/sts_templates/boxes?


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

There is no boxes folder..can I just create a boxes folder in catalog/includes/sts_templates/boxes?

 

Look at the sample template sets for an example of how to do this. Also, have a read in the STS User Manual regarding Infobox Templates.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi Bill and people.

 

I was thinking about the changes made in classes/boxes.php, that are affecting the modules, like new_products.php, featured.php etc.

 

Till now (v4.5.8) the got treated exactly like boxes, so, if having a template for infobox_featured.php.html it was showing for both, the infobox and the included module on the frontpage or wherever else. Modules without a particular template were following the general infobox.php.html template. After the changes (v4.6), all "modules" got separated:

 

 

I'll take a look at this tonight to see what is up. The changes made was supposed to allow more options to designing the infoboxes without being restricted to the table fiasco. You should still be able to design specific infobox templates for each infobox as well as the catalog infoboxes and "module" infoboxes such as the third party featured products module infobox in the content area.

 

If it is not functioning correctly, then it is a bug. As I said, I will look to make sure I uploaded the correct boxes.php script and not one that was still in a beta stage (I've done that before). blush.gif

 

Thanks for bringing it up. thumbsup.gif


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

I have a test site up and running using osCommerce 2.2rc2a, STS v4, and the add on "Simple Multiple Images with Fancy Popups." The site pop ups work when using Firefox, IE7, but not IE8. I have added the <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> to the <head> of my template but it still does not work. If I view the source when on the product_info page, it does not show the <meta> tag. Can someone help me to get my template to emulate IE7?

Edited by gmreeves

Share this post


Link to post
Share on other sites

Hi Bill and people.

 

I was thinking about the changes made in classes/boxes.php, that are affecting the modules, like new_products.php, featured.php etc.

 

Till now (v4.5.8) the got treated exactly like boxes, so, if having a template for infobox_featured.php.html it was showing for both, the infobox and the included module on the frontpage or wherever else. Modules without a particular template were following the general infobox.php.html template. After the changes (v4.6), all "modules" got separated:

		if($module_file==1) { // v4.6
	     $template ='$content'; // Default box already in memory, get it from there //v4.6

In the same time, the ability to control each module separately got lost also. Because I want to keep on controlling this, I changed the above original code to this:

		if($module_file==1) { // v4.6 
	     $boxprefix = "module_"; // mm 17 2 10
	     if (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html")) { // mm 17 2 10
	     $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html");// mm 17 2 10
	     } else { // mm 17 2 10
		$template ='$content'; // Default box already in memory, get it from there //v4.6  
		} // mm 17 2 10

I can now create separate templates for each module having the prefix module_ in front of the filename and placing the template to the boxes folder of my template folder ie module_also_purchased_products.php.html

 

Find this section of code in your includes\classes\boxes.php file:

   global $sts;
 $btrace=debug_backtrace();
 $module_file=0;
 if(stristr($btrace[1]['file'], 'modules') !== FALSE) { $module_file=1; }
 $boxname=basename($btrace[1]['file'],".php"); // backtrace 1 is the calling file
 $boxprefix = "infobox_"; // Added in v4.3SP2.

 // Added in v4.4: allows to use catalog_filename.html as template for boxes created directly in a catalog script.
 $boxname2 = basename($btrace[2]['file'],".php"); // backtrace 2 is the file calling the calling file (like sts_column_left.php)
if ($boxname2=='') $boxprefix = "catalog_";
 if($module_file==1) {
$template ='$content'; // Default box already in memory, get it from there

 }elseif (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html")) {
  $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html"); 

 

Replace it with the following:

   global $sts;
 $btrace=debug_backtrace();
 $boxname=basename($btrace[1]['file'],".php"); // backtrace 1 is the calling file
 $boxprefix = "infobox_"; // Added in v4.3SP2.

 // Added in v4.4: allows to use catalog_filename.html as template for boxes created directly in a catalog script.
 $boxname2 = basename($btrace[2]['file'],".php"); // backtrace 2 is the file calling the calling file (like sts_column_left.php)
if ($boxname2=='') $boxprefix = "catalog_";

  if (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html")) {
  $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html");

 

The bottom code allows you to have specific infobox templates, whether they be modules, catalog or boxes type infoboxes and following the naming syntax as listed in the STS User Manual:

  • boxes type: infobox_scriptname.php.html
  • catalog type: catalog_scriptname.php.html
  • module type: infobox_scriptname.php.html

 

 

 

 


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Can somebody tell me, if I am in my infobox template and I want to change the background of the content area to an image, what is the proper code please

 

<table width="100%" border="0" cellspacing="0" cellpadding="0" background="square5.gif" style="border-collapse: collapse" bordercolor="#111111">
 <tr>
   <td> </td>
<td background="$templatedir$/images/square5.gif">$content</td>
   <td> </td>
 </tr>
 <tr>
   <td width="30"> </td>
   <td width="100%"> </td>
   <td width="31"> </td>
 </tr>
</table>

 

This is what I have tried but it doesn't show up. I have another image there that I changed but I don't remember where I did it. This image is in all the boxes though. I need to override it to my new image on an individual box level. Any help is appreciated...


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

Hi,

some time ago I posted these errors using FWR´s Error Handling:

 

 

I found a way to fix it:

Error: Undefined property: sts_default::$enabled

File: includes/classes/sts.php

Line: 94

if ($this->script->enabled==false) {

Change to:

if (isset($this->script->enabled) && $this->script->enabled==false) {

 

Error: Undefined property: sts::$display_debug_output

File: includes/modules/sts_inc/sts_display_output.php

Line: 33

if ($sts->display_debug_output) {

Change to:

if (isset($sts->display_debug_output)) {

 

I hope this will help! :)

 

 

Hi,

 

Thanks for the help bonester1981. I was able to remove the error with the sts_display_output.php; however I have an extra error and don't find where to fix it.

 

It shows at the top of my search result page. Actually this pages was modified adapting a search module called FACT-Finder, and the page is called search.php

 

 

Notice: Undefined variable: formfirst in /includes/functions/sts.php on line 64

 

Do you or anybody else have an idea how to fix this????

 

Thanks in advance for the help.

 

Mrstech

Share this post


Link to post
Share on other sites

Hello, I have a problem when I try to enter www.mydomain.com / admin tells me that the link is broken and the address is this: that www.mydomain.comdir_ws_http_cataloglogin.php/ and not done badly.

 

Everything was fine until I copied the files from STS v4.6 according to the manual.

 

I hope you can help me, thanks.

Share this post


Link to post
Share on other sites

Hello, I have a problem when I try to enter www.mydomain.com / admin tells me that the link is broken and the address is this: that www.mydomain.comdir_ws_http_cataloglogin.php/ and not done badly.

 

Everything was fine until I copied the files from STS v4.6 according to the manual.

 

I hope you can help me, thanks.

 

Have you defined this in catalog/includes/configure.php

 

define('DIR_WS_HTTP_CATALOG', '/catalog/');


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

Hello, I have a problem when I try to enter www.mydomain.com / admin tells me that the link is broken and the address is this: that www.mydomain.comdir_ws_http_cataloglogin.php/ and not done badly.

 

Everything was fine until I copied the files from STS v4.6 according to the manual.

 

I hope you can help me, thanks.

 

 

What version of osCommerce are you using?


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

<a href="$urlcartcontents$">

 

Does using code like this still allow us to retain session ids?


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

<a href="$urlcartcontents$">

 

Does using code like this still allow us to retain session ids?

 

 

All STS tags that came with the contribution retain the session ids. That is very important.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

In STS, there is mention of it working with Header Tags Control.

 

It seems like there is a Header SEO contribution found here. Are you familiar with it and is STS also compatible?

Edited by sarafina

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

In STS, there is mention of it working with Header Tags Control.

 

It seems like there is a Header SEO contribution found here. Are you familiar with it and is STS also compatible?

 

 

Yes, it is the same one mentioned and highly recommended above all other meta tag contributions. It is also highly supported. Jack and I have worked together to make sure the two are compatible.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Can someone help me with this issue, my site will be ready as soon this problem goes away.

 

I have a Notice error message at the top of my search result page.

 

Notice: Undefined variable: formfirst in /includes/functions/sts.php on line 64

 

Does anybody has an idea how to fix this????

 

Thanks in advance for the help.

 

Mrstech

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×