Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

I would first make sure you uploaded your catalog/includes/modules/sts_inc folder to your site as it looks like the errors are telling you it can't find the files in that folder.

 

Hello, Sorry for my english.

 

Oscommerce version: MS2.2 RC2a

Sts version: STSv4.5.8

 

I Have a error in my pages:

 

 

Warning: include(includes/modules/sts_inc/create_account.php) [function.include]: failed to open stream: No such file or directory in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/create_account.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include(includes/modules/sts_inc/information.php) [function.include]: failed to open stream: No such file or directory in /pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/information.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

What is this error?

 

Please help me.


~Tracy
 

Share this post


Link to post
Share on other sites

Would anyone here happen to know how I could force the output of the below code into multiple rows? This is for the subcategories of the category tabs with subcategories contribution - but when I have more subcategories than will fit straight across in one line they get all jumbled and unreadable as it appears the script doesn't know how to create a 2nd row.

 

I tried looking through the category tabs contribution that has multiple rows for the initial tab - but I couldn't understand it well enough to know what changes I would need to make in this file to get the subcategories to simply create another row of text after a certain point.

 

This is what I have:

function show_subcategories($counter) 
{
global $fooa, $subcategories_string, $id, $HTTP_GET_VARS;
$cPath_new = 'cPath=' . $fooa[$counter]['path'];

$subcategories_string .= '<a href="';
$subcategories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new);
$subcategories_string .= '"  class="headerNavigation">';

// display category name
$subcategories_string .= $fooa[$counter]['name'];

$subcategories_string .= '</a> ';

if ($fooa[$counter]['next_id']) {
	$subcategories_string .= '| ';
	show_subcategories($fooa[$counter]['next_id']);
}else{
	$subcategories_string .= ' ';
}
}
?>

<!-- subcategories //-->
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr class="headerNavigation"><td class="headerNavigation">
<?php
if ($cPath) {
	$subcategories_string = '';
	$new_path = '';
	$id = split('_', $cPath);
	reset($id);
	while (list($key, $value) = each($id)) {
		unset($prev_id);
		unset($first_id);
		$subcategories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");
		$subcategory_check = tep_db_num_rows($subcategories_query);
		if ($subcategory_check > 0) {
			$new_path .= $value;
			while ($row = tep_db_fetch_array($subcategories_query)) {
				$fooa[$row['categories_id']] = array(
					'name' => $row['categories_name'],
					'parent' => $row['parent_id'],
					'level' => $key+1,
					'path' => $new_path . '_' . $row['categories_id'],
					'next_id' => false
				);
				if (isset($prev_id)) {
					$fooa[$prev_id]['next_id'] = $row['categories_id'];
				}

				$prev_id = $row['categories_id'];

				if (!isset($first_id)) {
					$first_id = $row['categories_id'];
				}

				$last_id = $row['categories_id'];
			}
			$fooa[$last_id]['next_id'] = $fooa[$value]['next_id'];
			$fooa[$value]['next_id'] = $first_id;
			$new_path .= '_';
		} else {
			break;
		}
	}
}

if ($id[0] != ''){
	show_subcategories($id[0]); 
	echo $subcategories_string;
}

?>
</td>
</tr>
</table>

 

If anyone knows how to do this it would be greatly appreciated!! :)


~Tracy
 

Share this post


Link to post
Share on other sites
Mike and Josh....

 

Keep in mind that when using a content template, it is only for the "content" portion of the page, not for the header, right & left columns and footer. The main template will take care of those areas.

 

How it works, general template:

 

Main templates are templates containing the columns, header and footer. The center of the page only contains the $content placeholder.

With the Product Info Module, you have the possibility to define a separate "content template" that will replace the $content of the main template. Content templates must be located in the "content" folder inside the templates folder (includes/sts_templates/*your template folder*/content)

 

When the Product Info Module is enabled, it looks in the template folder to see what templates exist. It is possible to define templates based on the product ID or it's category ID. Templates must be located in the templates folder (includes/sts_templates/*your template folder*).

 

It works like this (first found first used):

 

1. Check for a main template based on the product ID, for example product with ID 4:

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific main template, based on the category ID where the product is located. (Example below with a product located in sub-category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

3. No specific template found, use default template as defined in the default module (by default it is sts_template.html)

 

 

 

Now that we have a main template, STS will look to see if there is a content template, based on product ID and the category where it belongs: example with product ID4 (STS looks in the 'content' folder):

 

1.1 Use product_info.php_4.html if exists.

 

2. Check for category specific content template, based on the category ID where the product is located. (Example below with a product located in sub-category 22, located in category 11)

 

2.1 Use product_info.php_c11_22.html if exists.

 

2.2 Use product_info.php_c11.html if exists.

 

2.3 Use product_info.php.html if exists.

 

If no content template is found then do not use any, $content will come from the original catalog/product_info.php .

 

So...your manufacturer box and Tell a Friend box would not be inserted into the 'content' template but should be inserted into your main template that holds the header, columns and footer portions of the page.

 

 

i will try that

 

the problem i see with it however is i wont be be able to place it directly where i want to (like next to the add a cart button)

 

if im putting it with $content on the main cat template. Ill let you know how it goes

 

thanks!

Share this post


Link to post
Share on other sites
edit

oh man, i took a deep breathe and did it. works!

 

THANKS for everthing, sorry it took me so long to get it right.

 

the last thing i have to figure out is how to add more attribute fields to my products using sts and im done.

 

thanks everybody

Share this post


Link to post
Share on other sites
i will try that

 

the problem i see with it however is i wont be be able to place it directly where i want to (like next to the add a cart button)

 

if im putting it with $content on the main cat template. Ill let you know how it goes

 

thanks!

 

Josh,

 

Glad it worked.

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

Share this post


Link to post
Share on other sites
Hello, Sorry for my english.

 

Oscommerce version: MS2.2 RC2a

Sts version: STSv4.5.8

 

I Have a error in my pages:

 

 

Warning: include(includes/modules/sts_inc/create_account.php) [function.include]: failed to open stream: No such file or directory in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/create_account.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include(includes/modules/sts_inc/information.php) [function.include]: failed to open stream: No such file or directory in /pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/information.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in pathmysite/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

What is this error?

 

Please help me.

Danielle,

 

Be sure you are not adding anything extra (other than what was the default setting) in the "Files to Include" fields in the STS Modules in the admin. It appears you may have added some filenames in these fields and now STS is looking for these files in those folders specified in the error message.

 

Also, if you had a previous version of STS installed, older than version 4.1, you would need to remove all of the STS defines in the admin/includes/configure.php and includes/configure.php files that were created by those earlier versions of STS. All STSv4.x versions no longer require you to edit the configure.php files since they install using a module, much like the payment and shipping modules.

 

Hope this helped,


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
Danielle,

 

Be sure you are not adding anything extra (other than what was the default setting) in the "Files to Include" fields in the STS Modules in the admin. It appears you may have added some filenames in these fields and now STS is looking for these files in those folders specified in the error message.

 

Also, if you had a previous version of STS installed, older than version 4.1, you would need to remove all of the STS defines in the admin/includes/configure.php and includes/configure.php files that were created by those earlier versions of STS. All STSv4.x versions no longer require you to edit the configure.php files since they install using a module, much like the payment and shipping modules.

 

Hope this helped,

real quick how can i get rid of the input field, i just want the image up if its just going to shoot you to another page anyways. ?>

<!-- tell_a_friend //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_TELL_A_FRIEND);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),

'align' => 'center',

'text' => tep_draw_input_field('to_email_address', 'enter email', 'size="10"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- tell_a_friend_eof //-->

 

 

i tried to comment out what i thought would be it, no luck.

Share this post


Link to post
Share on other sites
real quick how can i get rid of the input field, i just want the image up if its just going to shoot you to another page anyways.http://hoboarona.com/product_info.php?cPath=22_28&products_id=31 for reference i want to get rid of the input field above the "tell a friend" image.

 

 

?>

<!-- tell_a_friend //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_TELL_A_FRIEND);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),

'align' => 'center',

'text' => tep_draw_input_field('to_email_address', 'enter email', 'size="10"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- tell_a_friend_eof //-->

 

 

i tried to comment out what i thought would be it, no luck.

Share this post


Link to post
Share on other sites

I would try removing this bit from the code you posted and see if it works

 

tep_draw_input_field('to_email_address', 'enter email', 'size="10"') . ' ' .

 

I don't know if it tries to call the email address when you click the submit button or not, but it doesn't look like it needs it. You may have to check the page that it goes to when you click to see if it is requiring that info though.


~Tracy
 

Share this post


Link to post
Share on other sites
I would try removing this bit from the code you posted and see if it works

 

tep_draw_input_field('to_email_address', 'enter email', 'size="10"') . ' ' .

 

I don't know if it tries to call the email address when you click the submit button or not, but it doesn't look like it needs it. You may have to check the page that it goes to when you click to see if it is requiring that info though.

cool worked, i actully did the same earlier but did not work but i forgot to get rid of the "." All set now!

Share this post


Link to post
Share on other sites
Danielle,

 

Be sure you are not adding anything extra (other than what was the default setting) in the "Files to Include" fields in the STS Modules in the admin. It appears you may have added some filenames in these fields and now STS is looking for these files in those folders specified in the error message.

 

Also, if you had a previous version of STS installed, older than version 4.1, you would need to remove all of the STS defines in the admin/includes/configure.php and includes/configure.php files that were created by those earlier versions of STS. All STSv4.x versions no longer require you to edit the configure.php files since they install using a module, much like the payment and shipping modules.

 

Hope this helped,

 

Thanks joshcamerote, but the files "create_account.php" and "information.php" are files of OsCommerce.

 

If I open the file "sts_display_output.php" and add an echo in the line 22 "echo $sts_modules_str.= $sts_mod .' - ';" In catalog i see this:

 

general.php - general.php - create_account.php - general.php - create_account.php - information.php - general.php - create_account.php - information.php - sts_user_code.php -

 

 

it's normal for repeat the same file many times?

Share this post


Link to post
Share on other sites
Thanks joshcamerote, but the files "create_account.php" and "information.php" are files of OsCommerce.

 

If I open the file "sts_display_output.php" and add an echo in the line 22 "echo $sts_modules_str.= $sts_mod .' - ';" In catalog i see this:

 

general.php - general.php - create_account.php - general.php - create_account.php - information.php - general.php - create_account.php - information.php - sts_user_code.php -

 

 

it's normal for repeat the same file many times?

 

Danielle,

 

You do not need to add anything in the sts_display_output.php file.

 

Try reinstalling STSv4.5.8 completely, making sure you keep the folder structure intact.


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

For one reason and another I want to build a few static html pages. I am using sts v4, on a windows box (no mod rewrite) so wish to create static pages. for example I want to use the following http://mydomain.com/widgets.html. for seo. I would like to use a static html template from STS call it widgets.html so that I can customise metatags, add text descriptions to the page etc for the category/subcategory and then populate it with dynamic content from osc such as $content from the widgets category within osc. I also use dynamenu so is it possible to select the widgets category in dynamenu to link direct to widgets.html.

 

If there is a better way to do it by all means please post a link the main points are

http://www.mydomain.com/widgets.html, it could be .php if it makes it easier

Can add text descriptions to the page etc

Dynamenu will link to the correct widgets page instead of id_category_subcategory

 

I should add I have compiled extra .php pages from your pdf file explanation without any problem. Just need to maybe take it one step further.

 

Sorry if I have not explained this very well if you need any clarification just ask.

Share this post


Link to post
Share on other sites
Hi Bill

For one reason and another I want to build a few static html pages. I am using sts v4, on a windows box (no mod rewrite) so wish to create static pages. for example I want to use the following http://mydomain.com/widgets.html. for seo. I would like to use a static html template from STS call it widgets.html so that I can customise metatags, add text descriptions to the page etc for the category/subcategory and then populate it with dynamic content from osc such as $content from the widgets category within osc. I also use dynamenu so is it possible to select the widgets category in dynamenu to link direct to widgets.html.

 

If there is a better way to do it by all means please post a link the main points are

http://www.mydomain.com/widgets.html, it could be .php if it makes it easier

Can add text descriptions to the page etc

Dynamenu will link to the correct widgets page instead of id_category_subcategory

 

I should add I have compiled extra .php pages from your pdf file explanation without any problem. Just need to maybe take it one step further.

 

Sorry if I have not explained this very well if you need any clarification just ask.

 

Brian,

 

There is a better way to do this and it is SEO as well.

 

Install Header Tags Controller or Header Tags SEO. This will give you the metatags as well as the descriptions. You will also want to use my step by step "Add New Pages Using STS" STS add-on which is located in the STS Power Pack download site (a site for all STS add-ons).

 

I also have a step by step on how to install Header Tags Controller with STS (see link in my signature below).


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

I already have htc installed and works a treat for the seo.

My main problem with being on a windows box is that I cannot get osc to generate seo friendly urls so i was thinking of constructiing pages manually with dymamic conent to populate them.

It is more the categories and subcategories to make them look and feel right and then try and sort out dynamenu to link direct to manually generated pages.

 

Your add pages option would work a treat if we could replace the category ID with the widgets.php page in Dynamenu.

Can that be done?

Share this post


Link to post
Share on other sites
Hi Bill

I already have htc installed and works a treat for the seo.

My main problem with being on a windows box is that I cannot get osc to generate seo friendly urls so i was thinking of constructiing pages manually with dymamic conent to populate them.

It is more the categories and subcategories to make them look and feel right and then try and sort out dynamenu to link direct to manually generated pages.

 

Your add pages option would work a treat if we could replace the category ID with the widgets.php page in Dynamenu.

Can that be done?

The windows box has nothing to do with the seo friendly URLs. Keep in mind that osC has an option for this but IT DOES NOT WORK, hence the words "still in development". To worry about the URLs is totally a farse since the search engines no longer have an issue with PHP URLs as in a stock osCommerce.

 

If you really have to have the nicer looking URLS, then look into the SEO URLS contribution.

 

Regarding the different category and subcategory pages, STS already allows you to create specific template pages for each category and subcategory "out of the box".


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

Hey Bill,

 

Does STS strip beginning and ending table tags off of an include from the boxes folder? I created a new file in catalog/includes/boxes/ and for some reason, it is throwing everything off. When I view the source code I find the beginning <table><tr> and <td> tags are missing for the included file.

 

I created it in sts_user_code like this:

//BEGIN Product Info for Category Pages
$sts->start_capture();
require(DIR_WS_BOXES . 'product_info2.php');
$sts->stop_capture('ProductInfo', 'box');
//END Product Info for Category Pages

 

I then inserted it with $ProductInfo into my template. It shows up - but as I said, the initial table tags are stripped out and I'm plum out of ideas as to why :blush:


~Tracy
 

Share this post


Link to post
Share on other sites
Hey Bill,

 

Does STS strip beginning and ending table tags off of an include from the boxes folder? I created a new file in catalog/includes/boxes/ and for some reason, it is throwing everything off. When I view the source code I find the beginning <table><tr> and <td> tags are missing for the included file.

 

I created it in sts_user_code like this:

//BEGIN Product Info for Category Pages
$sts->start_capture();
require(DIR_WS_BOXES . 'product_info2.php');
$sts->stop_capture('ProductInfo', 'box');
//END Product Info for Category Pages

 

I then inserted it with $ProductInfo into my template. It shows up - but as I said, the initial table tags are stripped out and I'm plum out of ideas as to why :blush:

Try doing it like the following:

 

//BEGIN Product Info for Category Pages
$sts->start_capture();
require(DIR_WS_BOXES . 'product_info2.php');
$sts->stop_capture('ProductInfo');
//END Product Info for Category Pages


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

Thank you Bill !! I knew it was something simple but had just stared at it too long to remember the simple stuff anymore -LOL

 

Worked like a charm! WOOHOO!!

:blush:

 

Try doing it like the following:

 

//BEGIN Product Info for Category Pages
$sts->start_capture();
require(DIR_WS_BOXES . 'product_info2.php');
$sts->stop_capture('ProductInfo');
//END Product Info for Category Pages


~Tracy
 

Share this post


Link to post
Share on other sites

I am new to this and apparently I don't understand much. Is there instructions for using this contribution that are more detailed than the User Manual that came with the download?

 

Also, someone told me that it was best to download a template from oswd.org and then integrate it with STS. How do I do it?

 

Any help would be appreciated.

 

Thanks!

Share this post


Link to post
Share on other sites
I am new to this and apparently I don't understand much. Is there instructions for using this contribution that are more detailed than the User Manual that came with the download?

 

Also, someone told me that it was best to download a template from oswd.org and then integrate it with STS. How do I do it?

 

Any help would be appreciated.

 

Thanks!

I wrote the User Manual to be read "as you need it". In other words, just go to the section that applies to your issue verses reading it cover to cover.

 

Regarding your template question....

 

It depends upon if it is an osCommerce template or a general web template. The latter is the easiest but you can also integrate an osCommerce template by following my step by step in this link:

http://forums.oscommerce.com/index.php?sho...p;#entry1131089


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 fresh 2.2 RC2 installed working fine.

 

I created a new language translating of the english for the brazilian portuguese (for inclusion in the administration of the system of a new language and creating new archive and folder for the same).

 

What it occurs is that after to install the STS the language standard comes back to english, and for Portuguese only if I choose in the desired language option on the front-end (a resource that will be removed since the store will operate only in Portuguese).

 

I followed step-by-step the installation with a lot of care of and I don't know where it can be the error.

 

Thanks for the attention.

 

[]'s,

Eduardo

 

PS: Sorry about the bad english.

Share this post


Link to post
Share on other sites
I have a fresh 2.2 RC2 installed working fine.

 

I created a new language translating of the english for the brazilian portuguese (for inclusion in the administration of the system of a new language and creating new archive and folder for the same).

 

What it occurs is that after to install the STS the language standard comes back to english, and for Portuguese only if I choose in the desired language option on the front-end (a resource that will be removed since the store will operate only in Portuguese).

 

I followed step-by-step the installation with a lot of care of and I don't know where it can be the error.

 

Thanks for the attention.

 

[]'s,

Eduardo

 

PS: Sorry about the bad english.

Eduardo,

STS does not come with the Portuguesse language by default. You will need to add this to your setup and then select this as your defualt language in your shop's admin so that your store will display this language by default.

 

This is not a difficult thing to accomplish. You will need to add the following:

  • includes/languages/portuguesse/modules/sts/
    • sts.default.php
    • sts.index.php
    • sts.popup_image.php
    • sts_product_info.php

Hope this helped,


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

 

I want to populate my index.php page with just a whats new style 3 x 3 or 3 x 4 table of the lastest items added to the catalogue. I have created an index.php_0.html page but I cannot figure out what placeholder to use to get just the whats new products to show. I do not want the table header background with "new products for july" to show either.

 

any ideas welcome, or can you suggest any contribs that populate the index.php page just with products and buy now button that works with sts

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

×