Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi,

 

I am trying to get rid of the table_background_default.gif that appears in the $content. I have been altering the index.php.html that was in the directory "full" of the sts_templates.The docs tell me it should be in column_right.php, but I can't find it where it should be. The one I can find does not appear to have any references to that particular image.

 

TIA

gina

Link to comment
Share on other sites

Hi,

 

I am trying to get rid of the table_background_default.gif that appears in the $content. I have been altering the index.php.html that was in the directory "full" of the sts_templates.The docs tell me it should be in column_right.php, but I can't find it where it should be. The one I can find does not appear to have any references to that particular image.

 

TIA

gina

 

after searching for hours I finally posted here and of course I found it within 5 minutes after posting: it's in index.php in the catalog folder.....

Link to comment
Share on other sites

Hi Guys,

 

I installed a clean version of osc online merchant v2 and STS v4.5.3 for osC Online Merchant RC1 with no other addons yet. When I go to the STS module I can install all the modules under STS only I cant install Product info, it keep saying install when I click on it. Anyone know a way to fix this?

Link to comment
Share on other sites

Hi Guys,

 

I installed a clean version of osc online merchant v2 and STS v4.5.3 for osC Online Merchant RC1 with no other addons yet. When I go to the STS module I can install all the modules under STS only I cant install Product info, it keep saying install when I click on it. Anyone know a way to fix this?

Jasper, It appears you are missing some files from the contribution on the admin side. Re-check your 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

Hi,

 

First i'd like to say this is my first time using osc and sts and also i'm no pro html/css/php user so ... maybe i did something wrong but i doubt.

I installed osc with 2-3 contribs then i tested BTS ... didn't like the way it worked, too complicated for a newbie so i tried sts ... easy install, easy to work with it seems from what i read.

The problem is i couldn't get it to work.

Installed everything as it said in the text, got the module in admin interface but when i try to use it, i enable it and set it to use template:true and save changes but then it's still use template:false

Since it's a test osc so far i tried reinstalling osc alltogether to install sts on a fresh install ... same issue.

 

Any hint would be appreciated, and no i didn't read all the posts in this thread, i read about 20+ pages then did a search in the topic, didn't find anything relevant.

Thx in advance :>

Link to comment
Share on other sites

This is a bug from osCommerce 2.2MS2-060817, it has been mentionned many times in this thread (maybe not in the last 20 pages). One solution has been posted by Bill Kellum on the STS contribution page on October 22, 2006. Another solution is to use the latest osCommerce release: 2.2RC1.

 

- Chris

Link to comment
Share on other sites

I hate to repost but was really wondering about this, if something was made for STS v2 in Nov 05, how compatible would it be with STS 4.5.3 for osC RC1?

 

The Contrib in question is Add Shopping Cart Info to Your Header Contrib 1079 http://www.oscommerce.com/community/contributions,1079/

Edited by Eighteen48

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Hi, I'm trying to get this contribution to work with STS:

 

http://www.oscommerce.com/community/contri...h,category+menu

 

To install normally, all you have to do is replace the includes/boxes/categories.php file and theput the right code in your stylesheet.

 

When I installed a CSS Menu, I needed to include something in the STS template file.

 

I assume I need to do the same here, but what?

 

The contributions categories.php file:

<?php
/*
 $Id: show_subcategories.php,v 1.0 2003/01/08 10:37:00 Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com/

 Based on: main_categories.php Ver. 1.0 by Gustavo Barreto

 History: 1.0 Creation

 Released under the GNU General Public License

*/

// Preorder tree traversal
 function preorder($cid, $level, $foo, $cpath)
 {
global $categories_string, $HTTP_GET_VARS;

// Display link
if ($cid != 0) {
  for ($i=0; $i<$level; $i++)
	$categories_string .=  '  ';
  $categories_string .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath
=' . $cpath . $cid) . '">';

// 1.6 Are we on the "path" to selected category?
  $bold = strstr($HTTP_GET_VARS['cPath'], $cpath . $cid . '_') ||  $HTTP_GET_VARS['cPath'] == $cpath . $cid;
// 1.6 If yes, use <b>
  if ($bold)
	$categories_string .=  '<b>';
  $categories_string .=  $foo[$cid]['name'];
  if ($bold)
	$categories_string .=  '</b>';
  $categories_string .=  '</a>';
// 1.4 SHOW_COUNTS is 'true' or 'false', not true or false
  if (SHOW_COUNTS == 'true') {
	$products_in_category = tep_count_products_in_category($cid);
	if ($products_in_category > 0) {
	  $categories_string .= ' (' . $products_in_category . ')';
	}
  }
  $categories_string .= '<br>';
}

// Traverse category tree- this is for older snapshots pre-November 2002
/*	foreach ($foo as $key => $value) {
  if ($foo[$key]['parent'] == $cid) {
//		print "$key, $level, $cid, $cpath<br>";
	preorder($key, $level+1, $foo, ($level != 0 ? $cpath . $cid . '_' : ''))
;
  } */
// Function used for post November 2002 snapshots
 function tep_show_category($counter) {
global $foo, $categories_string, $id;

for ($a=0; $a<$foo[$counter]['level']; $a++) {
  $categories_string .= "  ";
}
}
 }

?>
<!-- show_subcategories //-->
	  <tr>
		<td class="infoBox_left">

<?php

//////////
// Display box heading
//////////
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left', 'text'  => BOX_HEADING_CATEGORIES);
 new infoBoxHeading($info_box_contents, true, false, false, true);

//////////
// Get categories list
//////////
// 1.2 Test for presence of status field for compatibility with older versions
//  $status = tep_db_num_rows(tep_db_query('describe categories status')); used for older snapshots
$status = tep_db_num_rows(tep_db_query('describe ' .  TABLE_CATEGORIES . ' status'));


 $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
		from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
		where c.categories_id = cd.categories_id";
// 1.3 Can't have 'where' in an if statement!
 if ($status >0)
$query.= " and c.status = '1'";
 $query.= " and cd.language_id='" . $languages_id ."'
		order by sort_order, cd.categories_name";

 $categories_query = tep_db_query($query);


// Initiate tree traverse
 $categories_string = '';
 preorder(0, 0, $foo, '');

//////////
// Display box contents
//////////
 $info_box_contents = array();
 $row = 0;
 $col = 0;
 while ($categories = tep_db_fetch_array($categories_query)) {
  if ($categories['parent_id'] == 0) 
  {
		$temp_cPath_array = $cPath_array;  //Johan's solution - kill the array but save it for the rest of the site
	 unset($cPath_array);

		$cPath_new = tep_get_path($categories['categories_id']);

	 $text_subcategories = '';
 $subcategories_query = tep_db_query($query);
 while ($subcategories = tep_db_fetch_array($subcategories_query)) 
	 {

			if ($subcategories['parent_id'] == $categories['categories_id'])
			{

									$cPath_new_sub = "cPath="  . $categories['categories_id'] . "_" . $subcategories['categories_id'];

				$text_subcategories .= '' . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new_sub, 'NONSSL') . '" class="menusubcateg">' . '   ' . tep_image(DIR_WS_IMAGES . 'pointer_blue_light.gif', '') . $subcategories['categories_name'] . '</a>' . " ";
			} // if
 } // While Interno
$info_box_contents[$row] = array('align' => 'left',
									   'params' => 'class="smallText" width="125" valign="top"',
									   'text' => '' . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '" class="menucateg"><b>' . ' ' . tep_image(DIR_WS_IMAGES . 'pointer_blue.gif', '') . $categories['categories_name'] . '</b></a>' . $text_subcategories);
$col ++;
if ($col > 0) 
	{
			$col = 0;
			$row ++;
}
$cPath_array = $temp_cPath_array; //Re-enable the array for the rest of the code
  }
 }
 new infoBox($info_box_contents, true);


?>
		</td>
	  </tr>
<!-- show_subcategories_eof //-->

 

Cheers

Link to comment
Share on other sites

I hate to repost but was really wondering about this, if something was made for STS v2 in Nov 05, how compatible would it be with STS 4.5.3 for osC RC1?

 

The Contrib in question is Add Shopping Cart Info to Your Header Contrib 1079 http://www.oscommerce.com/community/contributions,1079/

 

This contribution should not be a problem to integrate with STS v4, if you look on your contribution page you'll find how to do it (for STS PLUS, but that's the same method). Generally, when upgrading, you'll have to check all the code added in sts_user_code.php and "convert" it to the STS4 syntax. Nothing difficult.

 

- Chris

Link to comment
Share on other sites

This contribution should not be a problem to integrate with STS v4, if you look on your contribution page you'll find how to do it (for STS PLUS, but that's the same method). Generally, when upgrading, you'll have to check all the code added in sts_user_code.php and "convert" it to the STS4 syntax. Nothing difficult.

 

- Chris

Yes, as Chris mentioned above, the conversion has already been done for you in the STS_Plus method listed on that contribution's download page.

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, I'm trying to get this contribution to work with STS:

 

http://www.oscommerce.com/community/contri...h,category+menu

 

To install normally, all you have to do is replace the includes/boxes/categories.php file and theput the right code in your stylesheet.

 

When I installed a CSS Menu, I needed to include something in the STS template file.

 

I assume I need to do the same here, but what?

 

Cheers

Try it and see what happens. If the contribution is only making changes to the categories.php file and the stylesheet, then the sts tag for categories box should pick up the changes with no issues.

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 have posted STS 4.5.4 on the contribution page.

 

Bug fix: error messages and info messages sent via URL where never displayed. 2 files modified (see changelog). The fix proposed in this forum was correcting only the error messages, not the info messages, and was not using the original classes for the display. Now this is corrected and behaves like an original osCommerce store.

 

Files included for both osCommerce 2.2MS2-060817 and 2.2RC1 (STS itself is same, only modified files are different).

 

- Chris

Link to comment
Share on other sites

Try it and see what happens. If the contribution is only making changes to the categories.php file and the stylesheet, then the sts tag for categories box should pick up the changes with no issues.

 

Did and you are correct. It just worked.

 

However, it didn't work as expected.

 

Although it works fine without STS, with a templated enabled I get this:

catmenli1.th.jpg

 

A you can see, the manufacturers box hs stretched to 100% of the page. This happens to the box below wherever I put the menu.

 

Obviously the menu is conflicting with something in STS...but what? :)

Link to comment
Share on other sites

Sorry, the version 4.5.4 I just posted on the contribution page is missing the corrected code in the sts.php class file, so error and info messages still won't work with this version.

I have just posted v4.5.5 where the infobox problem mentionned in the previous post by Kopite is corrected, as well as the sts.php class.

 

So, if you have STS v4.5.2, 4.5.3 or 4.5.4, please use the patch 4.5.5 (3 files)

 

- Chris

Edited by rigadin2
Link to comment
Share on other sites

Hello All,

 

I am starting a new cart using Osc RC1. First mod was Bill's recent update for STS. Easy and worked well. I installed the recent of Header Tag Controller and Bill's advise to use the headertags.php file out of the Power Pack mod. I am now installing Mo Pics. I used an older version by surfalot with the STS v4.2 option. Except for the popup_image.php.html, it works. If I disable the popup image in STS module, I can use the standard popup. When I enable it, the only thing that I can get the popup up image to do is display the master image.

 

Does anyone have advise on how to get the popup image to rotate through the multiple pics using the STS popup enabled?

 

Thanks...

Link to comment
Share on other sites

You need to adapt catalog\includes\modules\sts_inc\popup_image.php in order to place the right image in $sts->template['popupimage'].

You can also adapt $sts->template['back'] and $sts->template['next'] to display the "previous image " and "next image" buttons. Use the surfalot's code to help you.

 

- Chris

Link to comment
Share on other sites

Check the STS4 Power Pack, I posted some code in february this year. It is made for ACA users (who can choose the nbr of extra images from admin), but you can adapt it by setting the nbr of images to 6.

 

- Chris

Link to comment
Share on other sites

View the outputted HTML from your browser (View>Page Source). Almost looks to me like your table structure got messed up, like your <tr> and <td> tags aren't nested correctly or something along that line.

 

Did and you are correct. It just worked.

 

However, it didn't work as expected.

 

Although it works fine without STS, with a templated enabled I get this:

catmenli1.th.jpg

 

A you can see, the manufacturers box hs stretched to 100% of the page. This happens to the box below wherever I put the menu.

 

Obviously the menu is conflicting with something in STS...but what? :)

Link to comment
Share on other sites

Sorry, the version 4.5.4 I just posted on the contribution page is missing the corrected code in the sts.php class file, so error and info messages still won't work with this version.

I have just posted v4.5.5 where the infobox problem mentionned in the previous post by Kopite is corrected, as well as the sts.php class.

 

So, if you have STS v4.5.2, 4.5.3 or 4.5.4, please use the patch 4.5.5 (3 files)

 

- Chris

Chris,

 

Well Done!!!!

This has got to be the best documentation for any STS version up to date! You put a lot of effort into this version and it shows! Great Job!!! :thumbsup: :thumbsup: :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

Check the STS4 Power Pack, I posted some code in february this year. It is made for ACA users (who can choose the nbr of extra images from admin), but you can adapt it by setting the nbr of images to 6.

 

- Chris

 

Chris, I am glad to see contribution authors finally taking advantage of the STS Power Pack site. You and I have been doing that for quite some time. Whenever I see a STS add-on posted in the forums, I strongly suggest to the author of such to upload into the STS Power Pack site for the benefit of all STS users.

 

:thumbsup: The Power Pack site is really becoming an excellent collection of STS add-ons. I hope others continue to contribute to it as well as take advantage of all of the resources listed there.

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,

Firstly many thanks for the great contribution.

Secondly I am (how shall I put this) - ah yes I am blissfully ignorant :blink: about all things php, and need to try and include another contrib called index-ads that rotates banners in columns and rows on my index page.

I had the contrib works with MS2.2 and have now upgraded to RC1 could one of you wonderfull, helpful code writers let me know how to integrate this in to my index page using STS 4.

 

Thirdly I would like to use this contributiuon as the index only, and not for any other pages. I have RTM but due to my blisfull ignorance understand very little of it.

Anyone help my responding in baby language??? :thumbsup:

 

Thx

 

Psychosonic sid

Link to comment
Share on other sites

There maybe a really simple solution to this, but I can not figure out how to do this properly.

 

I just added Cart In Header Contrib, and am trying to have the output displayed as a link to the shopping cart page. I have been able to get it to display as a link if there is no items in the cart, but all attempts if there is items in the shopping cart otherwise has been meet with failure.

 

Here is the code inserted into the sts_user_code.php file

$sts->start_capture();
$productno = $cart->count_contents();
$totalprice = $currencies->format($cart->show_total());

if ($productno > 1) {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEMS;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
} elseif ($productno == 0) {
echo ENTRY_HCART_EMPTY;
} else {
echo ENTRY_HCART_CONTAINS;
echo " ";
echo $productno;
echo " ";
echo ENTRY_HCART_ITEM;
echo " "; echo " ";
echo ENTRY_HCART_PRICE;
echo " ";
echo $totalprice;
}
$sts->stop_capture ('headcart');

 

and this is inserted into the English language file with my one link

ENTRY_HCART_EMPTY', '<a href="shopping_cart.php">0 Products $0.00</a>');
define('ENTRY_HCART_CONTAINS', ''Your cart contains:");
define('ENTRY_HCART_ITEM', 'Product');
define('ENTRY_HCART_ITEMS', 'Products');
define('ENTRY_HCART_PRICE', 'Total price:');

 

I have tried putting link tags around just about everything, but still can not figure it out.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

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