Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi,

I am attempting to use css and have a few questions.....

What do i need to do to add to the code in sts_template.html to include my css sheet?

Thanks

You need the following in each of your STS Template files (except for infobox and popup image templates):

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
</body>
</html>

You will change the link to the stylesheet according to where your specific css file is that you are wanting to link to. This is the default osC setup.

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

It sounds like you tried installing some other contributions that are causing the problem. If the contribution created a new infobox, then you will need to create a STS tag for it, otherwise STS should pick up any pages that were created in the proper osC manner, meaning the correct defines and functions were populated in the proper php files.

 

 

No actually not. I have a fresh an clean OSC Intalled and the only thing i then installed was the STS Templates. You can have a look here shop.shepstar.de

 

Nothing happens once you click on the cat or articles.

 

Would be great if you could help me there, thankx a lot

Link to comment
Share on other sites

No actually not. I have a fresh an clean OSC Intalled and the only thing i then installed was the STS Templates. You can have a look here shop.shepstar.de

 

Nothing happens once you click on the cat or articles.

 

Would be great if you could help me there, thankx a lot

Then the problem lies with how you configured your shops paths in one or both of the configure.php files.

Start with the includes/configure.php file:

 

Open this file:

includes/configure.php

Find the following line:

 

define('DIR_FS_CATALOG', '/home/blahblah/yourdomain.com/');

Change it to the following:

define('DIR_FS_CATALOG', '/home/blahblah/yourdomain.com');

The extra slash is causing your link problems. :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

Hi

 

I have installed the sts4 and I have 2 small problems and i can't find an answer after searching

 

1. The currency is $ dollars and I need it to be £ sterling (I have added the currency and changed the relevant file to reflect the changes)

 

2. Where do I add the $sid token to take care of sessions

 

Thanks

 

Roost

I have the exact same question, and searching only found this question, no answers does any body have a resolution to this?

 

Thanks

Link to comment
Share on other sites

Paula, yes this can be done and is quite normal. You would want to create your osCommerce files into a "shop" directory or "catalog" as it is known to be called. Create a link in your website as you would any other web link to that "shop" directory. You could either link to the directory or to the directory/index.php file, it would go to the same place.

Now, inside the "shop" directory, you could have a "shop homepage". This would be your STS Template "index.php_0.html" page. This is optional of course. :thumbsup:

 

Sorry to ask another question. I did the above and it worked wonderfully.

 

My remaining problem is I need to add a new Link to the header section i.e Home | My Account | Cart Contents | Checkout

 

I can't work out how to do this.

 

I added the following to my general.php

 

$sts->template['Home'] = tep_href_link(FILENAME_HOME, '', 'SSL');

 

and to English.php I added

 

define(HEADER_TITLE_HOME', 'HOME');

 

but I don't know if that's correct or what extra steps I need to do.

 

Thanks

Link to comment
Share on other sites

Hello,

I'm using product_info template with the placeholders.

The thing is i made new pages ,without using product info template,

(those pages have different content for the same product , thats why i can't use the product info template...)

and i wonder how can use the placeholders in a page like that?

I'll appreciate any help...

Link to comment
Share on other sites

The way I changed my InfoBox sizes was in the catalog/includes/classes/boxes.php file. However, I'm using STS v4.2 - so I'm not sure if the new version has a better way to adjust their width individually.

 

If you do a search of the contributions there are a couple different ones for the images. One gives you other images to use, another turns them into transparent gif's so they just don't show up at all.

 

Dunno on the pop-up - hopefully someone else can help you troubleshoot that one - I'd also search for STS and popup on google as I'm pretty sure I've seen others with that issue and fixes were posted :thumbsup:

 

Do you know where I can make the information box larger here's my problem:

 

I have a category and the text is just slightly too long and so it wraps and I want to avoid that - can that be done?

 

Thanks

Link to comment
Share on other sites

I just upgraded to this version of STS and I am having some problems.

 

I get no PHP error messages but at the top of the page I see this:

Template file does not exist: [includes/sts_template.html]

 

In my module I have the default folder set to test, and the message doesnt show that. Also I have tried using the module to change the file name/folder name and the error message does not change at all.

 

So I put a copy of sts_template.html in includes/ and then it goes away but I think this is a remnant of an older version of STS that I need to still get rid of. I deleted all the old STS files in includes, and I commented out all the old STS lines in the confugration.php file, and that got rid of the message but the templating system still will not work properly.

 

It seems as if everything is displaying below my template instead of inside of it, and this template worked perfectly with the older STS system. But to check, I used the sample ones as well and it seems the content just gets displayed vertically.

 

Example (this is using the sample sts_template.html shipped with the contrib):

sts_error.jpg

Link to comment
Share on other sites

You have to remove old STS code from several files in the catalog/includes folder: header.php, footer.php, application_bottom.php and application_top.php, then you can start installing the new STS.

 

- Chris

Link to comment
Share on other sites

Hello,

 

How do i install 'On The Fly' Auto Thumbnailer, after installing STS? Im having problems to change the code in html_output.php Is there a simple thumbnailer contribution to install with STS?

 

Thanks

Miguel

Edited by phpsurfer
Link to comment
Share on other sites

Both contributions are modifying tep_image function. The STS modification must be made right at the beginning of the function, then should come the thumbnailer modifications.

 

$addtocartbutton is only for product info page, but you can create the same kind of tag in your sts_user_code.php. You can see how $addtocartbutton is made in includes/modules/sts_inc/product_info.php.

The code must be placed in $sts->template['PlaceholderNameComesHere'].

 

- Chris

Link to comment
Share on other sites

You have to remove old STS code from several files in the catalog/includes folder: header.php, footer.php, application_bottom.php and application_top.php, then you can start installing the new STS.

 

- Chris

 

I used beyond compare to update all the code in those files. The old STS code was all replaced with new STS code. With old versions of STS are there any referances in other files that I may have missed?

Link to comment
Share on other sites

I am attempting to use Customer Testimonials v2 - but I am getting an STS error upon submission of the form. It is supposed to show me a message stating that my testimonial has been submitted for review, but instead I get this error:

 

Fatal error: Call to a member function on a non-object in /includes/classes/sts.php on line 187

 

Lines 187-189 are:

 if ($messageStack->size('header') > 0) {
  $this->template['content'] = $messageStack->output('header') . $this->template['content'];
}

 

I am using STS v4.2 with HTC v2.5.9 on this site.

 

I did find another post with the same question, but no answer as they created a new thread rather than posting here. That post is at: http://www.oscommerce.com/forums/index.php?showtopic=263281

~Tracy
 

Link to comment
Share on other sites

I am attempting to use Customer Testimonials v2 - but I am getting an STS error upon submission of the form. It is supposed to show me a message stating that my testimonial has been submitted for review, but instead I get this error:

 

Fatal error: Call to a member function on a non-object in /includes/classes/sts.php on line 187

 

Lines 187-189 are:

 if ($messageStack->size('header') > 0) {
  $this->template['content'] = $messageStack->output('header') . $this->template['content'];
}

 

I am using STS v4.2 with HTC v2.5.9 on this site.

 

I did find another post with the same question, but no answer as they created a new thread rather than posting here. That post is at: http://www.oscommerce.com/forums/index.php?showtopic=263281

 

PS - I've tried the fix for application_top.php, but my application_top already had this:

// START STS 4.1
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
// END STS 4.1

 

It does not seem to matter where in the code I move that to. I've put it above this:

// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

 

I've moved the initialize message stack code below the start sts code. Either way I still get the same error.

 

I'm guessing the code that is causing the action that generates the error is this ?:

<form name="customer_testimonial" method="post" action="<?php echo tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, 'action=insert', 'NONSSL'); ?>"  >

 

The submit button looks like this:

<?php echo tep_image_submit('button_submit.gif', IMAGE_BUTTON_INSERT). '  <a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, '', 'NONSSL') . '"></a></td>'; ?>

 

Any thoughts?

~Tracy
 

Link to comment
Share on other sites

While investigating further it would appear this is the code that actually creates the error and success messages and tells them to print:

 

catalog/customer_testimonials.php

if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {	  
  case 'insert':	  
	$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	$testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	$testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	$testimonials_last_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_last_name']);
	$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

	$testimonials_error = false;
	$messageStack = ERROR_HEADER;
	if (empty($testimonials_title)) {
	  $messageStack .= '['.ERROR_TESTIMONIALS_TITLE_REQUIRED.']';
	  $testimonials_error = true;
	}
	if (empty($testimonials_name)) {
	  $messageStack .= '['.ERROR_TESTIMONIALS_NAME_REQUIRED.']';
	  $testimonials_error = true;
	}
	if (empty($html_text)) {
	  $messageStack.= '['.ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED.']';
	  $testimonials_error = true;
	}

	if (!$testimonials_error) {
	  $sql_data_array = array('testimonials_title' => $testimonials_title,
							  'testimonials_url' => $testimonials_url,
							  'testimonials_url_title' => $testimonials_url_title,
							  'testimonials_name' => $testimonials_name,
							  'testimonials_last_name' => $testimonials_last_name,
							  'testimonials_html_text' => $html_text);
	 if ($HTTP_GET_VARS['action'] == 'insert') {
	   $insert_sql_data = array('date_added' => 'now()',
								 'status' => '0');
		$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
		tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
		$testimonials_id = tep_db_insert_id();			
	  }   
	  echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';  
	  echo '<tr><td class="main">'. TEXT_TESTIMONIALS_SUCCESSFUL .'</td><td class="main"></td></tr>';
	  $testimonials_id = '';
	   $testimonials_title = '';
	   $testimonials_url = '';
	   $testimonials_url_title = '';
	   $testimonials_name = ''; 
	   $testimonials_last_name = '';
	   $html_text = '';	
	} else {		  
	   echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';  
	   echo '<tr><td class="main">'. $messageStack .'</td><td class="main"></td></tr>'; 

	   $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	   $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	   $testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	   $testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	   $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	   $testimonials_last_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_last_name']);
	   $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);
	}
	break;	 
}
 }

?>

~Tracy
 

Link to comment
Share on other sites

Not sure if this is how I add a question to this forum but I tried adding it to Templates and Images and no response. I know that people are busy but then I thought maybe nobody was seeing it.

 

I had a problem with one store where my category headings were duplicating http://doowopden.com/store/index.php?cPath=144

 

so I decided to just start with a new install of oscommerce and different database. I installed STS and HTC bundle and I go to admin and the link is there. However, when I click next to default (or index or anything) and click install, it doesn't do anything. I just see the install button again. I have never had this happen - very strange. Can someone give me any clues on what might be causing this? Thanks.

Link to comment
Share on other sites

Not sure if this is how I add a question to this forum but I tried adding it to Templates and Images and no response. I know that people are busy but then I thought maybe nobody was seeing it.

 

I had a problem with one store where my category headings were duplicating http://doowopden.com/store/index.php?cPath=144

 

so I decided to just start with a new install of oscommerce and different database. I installed STS and HTC bundle and I go to admin and the link is there. However, when I click next to default (or index or anything) and click install, it doesn't do anything. I just see the install button again. I have never had this happen - very strange. Can someone give me any clues on what might be causing this? Thanks.

If this is a new installation of osC 060817, then you are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc.

There is a simple fix:

 

 

1. Open the catalog/admin/includes/functions/compatibility.php.

2. At the end of the “do_magic_quotes_gpc” routine, add the following code

 

reset($ar);

 

It will end up looking like this:

 

function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

 

3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php.

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

PS - the above changes that I tried in application_top were from this post:

http://www.oscommerce.com/forums/index.php?showtopic=253442

Tracy, the changes mentioned in that thread were supposed to be in the application_top.php file already. That individual did not complete the STS installation so that is why he was having problems.

Now if you are not using STS v4.4 or above, you will not have that code either. I do suggest that you upgrade your STS4.2 to STSv4.5.2 since it adds new features but also corrects some bugs along the way.

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

I asked 2 qustiont un the last week and I don't know if u guys didn;t answer because the questions were to simpl3e or because my English is not clear...

ANYWAY....I would like to try one more time if that's o.k..

 

1.How can I add $addtocartbutton on a page which is not product_info template??

I did a search but i can't find an answer..

 

2.I'm usind breadcrumbs,

I have categories and subcategories that are not prooducts,

offcourse I made new pages for this categories .

The problem is the breadcrumbs doesn't recognize those categories.

you can see it here:

http://www.switch-x.com/switchxsales.php?osCsid=d1e9a0fc3f3bbc397a8e2d834e2cb91d

you can see the subcategory (Switch-x sales) but not the category(ordering)

is there an sts way to solve this?

should I define my categories diffrently?

 

I'll appreciate your help

Thank you

Edited by sefimor
Link to comment
Share on other sites

thanks bkellum but I tried that already and still no luck. any other ideas? Thanks

 

Cindy

 

 

If this is a new installation of osC 060817, then you are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc.

There is a simple fix:

1. Open the catalog/admin/includes/functions/compatibility.php.

2. At the end of the “do_magic_quotes_gpc” routine, add the following code

 

reset($ar);

 

It will end up looking like this:

 

function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

 

3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php.

Link to comment
Share on other sites

do i have to download sts to acheive this kind (http://www.marlicards.com/) of design? i'm on the verge of giving up trying to edit the layout and overall look. i need drastic changes so editing just the stylesheets is not what i'm going to do.

 

btw are there any versions of sts that is able to work with register globals set to 1?

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