Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Finally found it - YAY!! Apparently when adding the Header Tags contrib I missed a new word in RC1 - the word "empty" - LOL

 

If anyone else has this: look for this line and make sure it has the word empty in it (mine didn't)

if (isset ($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS) ) {

 

Without the word "empty", whenever I clicked to "edit" a product in the admin, it would give me a blank "new product" page. When I added the "empty" and clicked to "edit" a product in the admin, it gives me the products information all filled in on the "new product" page :huh:

 

Don't claim to understand it - but it works! ;)

 

 

Anybody know where the link is set for the "edit product" button in admin/categories.php ?

 

I'm working on upgrading to RC1 and using the latest STS and HTC, and am now implementing Master Products. I seem to have most everything working, my biggest issue on the admin side is the "edit product" button - it calls the "new product" action :'(

 

I've been staring over the code for hours now, and I've gone through the entire RC1 Release thread hoping maybe it was just something on that update - but so far I've not been able to find anything. If anyone knows where the action is set for the edit product button it would be greatly appreciated :blush:

~Tracy
 

Link to comment
Share on other sites

Ok - new issue :blush:

 

setup - RC1, STS 4.5.8, HTC 2.6.3 - now adding Master Products 1.2

 

I am not getting the slave products on the product_info page of the Master Product. There should be a table underneath the description of the Master Product that shows the Slave Products - but for some reason that is not getting pulled in through the $content tag. (I am using product_info templates). I added the $slaveproducts tag to my product_info template (according to Power Pack instructions) - but it just shows up on the browser as $slaveproducts.

 

Any ideas on what needs to be tweaked in the new STS with RC1 in order to get the slave products to show up on the product_info page of their Master product? :huh:

 

Oh - and if anyone is interested let me know and I'll publish the RC1, STS 4.5.8, HTC 2.6.3, Master Products 1.2 as a downloadable package on the Power Pack page. (once it's working properly of course :thumbsup: )

 

Once I have these contrib's playing nice together I will be adding SPPC and could again publish for those who want both Master Products and SPPC on RC1 with STS & Header Tags :thumbsup:

~Tracy
 

Link to comment
Share on other sites

PS - the slave products also do not show up on the master products product_info page with STS turned off :'(

 

If anyone has ideas that would be great - if not, sorry. Apparently it isn't an issue with how it interacts with STS (shoulda checked that first eh?) :blush:

~Tracy
 

Link to comment
Share on other sites

PS - the slave products also do not show up on the master products product_info page with STS turned off :'(

 

If anyone has ideas that would be great - if not, sorry. Apparently it isn't an issue with how it interacts with STS (shoulda checked that first eh?) :blush:

 

Hmm....I recently installed Master Products onto RC1 (w/STS) for a client and didn't run into any issues that I can remember. If I get time tonight, I'll take a look through my notes and see if I had to do anything beyond the Master Products installation to get it working.

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

Is there a simple way to disable STS for the callback?

 

Thanks again for the help :)

 

I don't have a lot of time to troubleshoot your problem but if all you are looking for is how to exclude a file from being used by STS here you go:

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

That should do the trick for you.

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

Link to comment
Share on other sites

Any ideas as to why I'm getting duplicate boxes on my site. I've removed reviews, currency, language and still show up. Also, check out my item detail page, looks weird. Using default full template, code below

 

My website

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table border="0" width="100%" cellspacing="0" cellpadding="10">
<tr class="header">
	<td valign="middle">
		<img border="0" src="images/Logo2.gif"></td>
	<td align=right>
		<a href="$urlmyaccount">
		<img border="0" src="images/header_account.gif"></a>
		<a href="$urlcartcontents">
		<img border="0" src="images/header_cart.gif"></a>
		<a href="$urlcheckout">
		<img border="0" src="images/header_checkout.gif"></a>
	</td>
</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
	<td class="headerNavigation">
		  
		$breadcrumbs
	</td>
	<td align="right" class="headerNavigation">
		$myaccountlogoff | $cartcontents | $checkout
		  
	</td>
</tr>
</table>

<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td valign="top" width="125">
  <table border="0" width="125" cellspacing="0" cellpadding="2">

	<tr><td>$categorybox</td></tr>

	<tr><td>$whatsnewbox</td></tr>
	<tr><td>$specialbox</td></tr>
	<tr><td>$searchbox</td></tr>
	<tr><td>$informationbox</td></tr>
  </table>
</td>
<td valign="top">
  <p>$content</p>
  <p> </p>
</td>
<td valign="top" width="125">
  <table border="0" width="125" cellspacing="0" cellpadding="2">
	<tr><td>$cartbox</td></tr>
	<tr><td>$maninfobox</td></tr>
	<tr><td>$orderhistorybox</td></tr>
	<tr><td>$bestsellersbox</td></tr>
	<tr><td>$reviewsbox</td></tr>
	<tr><td>$tellafriendbox</td></tr>
  </table>
</td>
 </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
<td class="footer">  $date  </td>
<td align="right" class="footer">  $numrequests  </td>
 </tr>
</table>

<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center" class="smallText">
  $footer_text
<br>
Simple Template System by <a href="http://www.diamondsea.com/">DiamondSea.com</a><br>
STS v4.5.3 by <a href="http://soundsgoodpro.com"> SoundsGoodProductions.com</a></td>
 </tr>
</table>

<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td align="center">
  $banner_only
</td>
 </tr>
</table>


 </body>
</html>

Edited by barkster
Link to comment
Share on other sites

In the sts_default.php file, find the following code:

CODE

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))

return ''; // We don't use template for these scripts

 

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

CODE

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))

return ''; // We don't use template for these scripts

 

That should do the trick for you.

Hope this helped,

 

I put "wpcallback" in place of "your_script_here", and it works perfectly. The callback page looks like a dog's dinner without the lovely STS, but for the 3 seconds it's shown it's not a significant problem.

 

As this appears to be a historical problem mentioned in this thread and many others, I'll put a few keywords at the end of the post so others with the same fault can find it easily.

 

Thanks again Bill,

Adam

 

---

WorldPay , wpcallback , STS , callback fails

---

Link to comment
Share on other sites

That would be great - or even if you could send me a copy of the catalog/index.php and catalog/product_info.php and I can do a comparison. I have a feeling it's in one of those two files - will be researching it more today :thumbsup:

 

 

Hmm....I recently installed Master Products onto RC1 (w/STS) for a client and didn't run into any issues that I can remember. If I get time tonight, I'll take a look through my notes and see if I had to do anything beyond the Master Products installation to get it working.

~Tracy
 

Link to comment
Share on other sites

Well - it has to have something to do with RC1 because I just took a fresh copy of RC1 and only added Master Products v1.2 (no other contrib's) and I still have the same problem - no slave products showing on the master products' product_info.php page - they only show up in the category page (index.php).

 

If your notes shed any light on it let me know :) In the meantime I've posted on the Master Products forum as well - hopefully someone will have made the jump to RC1 with Master Products and be able to point me in the right direction :blush:

~Tracy
 

Link to comment
Share on other sites

Hi

 

I have a firefox Vs ie issue in and is something to do with the style sheet.

 

I have the following in my stylesheet.css

 

.main_bg {
text-align: left;
background-image: url(images/blog_bg.jpg);
background-repeat: repeat-y;
}

 

Now my html code in the sts_template is....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="keywords" content="training, courses, teaching, groups,  live training, innovations, innov@tions, school, colleges, timetable, managment information systems, mis, microsoft, office, remote trainnig, green, environmently friendly, cost effective training, " />
<!--$headcontent-->
 <link href="stylesheet.css" rel="stylesheet" type="text/css">


</head>
<body>
<table width="960" border="0" cellpadding="0" cellspacing="0" class="main_bg">
 <tr>
   <td><p> </p>
   <p> </p>
   <p> </p>
   <p> </p>
   <p>hello</p>
   <p> </p></td>
 </tr>
</table>

 

The table is using a class of "main_bg" to add a background image to the table. appears okay in IE but not in firefox or opera. Yet using this simple code outside of sts template ie. html code and css in the same folder works okay. The image file is there but firefox/opera cannot find it.

 

The full site can be seen at this testbed.... www.keystrokeswebhosting.co.uk

 

The crazy thing is the infoboxes are using a graphic as a background and they work okay in firefox/opera. The css code of the info box is...

 

.infoBoxContents {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
background-image: url(images/bkgrd.jpg);
}

 

so if you run the following address in firefox/opera it will bring up the graphic...

 

www.keystrokeswebhosting.co.uk/images/blog_bg.jpg

www.keystrokeswebhosting.co.uk/images/bkgrd.jpg

 

Any would be much appreciated.

 

Thanks

Lloyd

Edited by keystrokes247
Link to comment
Share on other sites

I'm new to STS and I've run into a problem, which might very well be that my understanding of STS still have large gaps

 

Setup: RC1 and STS 4.5.8

Problem: My infobox_categories.php.html only contain a single line, <ul id="categories">$content</ul>, but the ul tag doesn't show up on the page, only the $content is shown. Any ideas?

Link to comment
Share on other sites

Please take a look at my site: http://www.gotowebsmithsite.com/catalog/

It's a fresh install with STS and lighbox downloaded together in the bundle.

I can't imaging what's wrong after looking and READING everything, can anyone help?

Ron

///

Ron, I looked at the instructions for the contribution and it seems to have left some things out. Let it be known that I have not used or installed this so I may be shooting in the dark here...
  1. You will have to either add the lightbox css to your stylesheet.css file or add the lightbox.css file to your root folder of your shop.
  2. Check to be sure you have added the JavaScript info inside each of your template pages. This is mentioned in the install.txt of the lightbox for STS contribution.
  3. Try turning off your Popup Image Template in the admin to see if that is causing the problem.

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'm new to STS and I've run into a problem, which might very well be that my understanding of STS still have large gaps

 

Setup: RC1 and STS 4.5.8

Problem: My infobox_categories.php.html only contain a single line, <ul id="categories">$content</ul>, but the ul tag doesn't show up on the page, only the $content is shown. Any ideas?

 

What are you trying to do here? Do you have the unordered list "categories" specified somewhere?

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've managed to get a background image working in all browsers via CSS - but what I did was apply it to the div style. You could have a 0 border table (1 row 1 column) and put your div inside of that. Then put your table inside of the div. The background would be applied to the div rather than the table.

 

For some reason, if memory serves me correctly, Firefox and IE read tables differently, so it can be difficult to get something to work in both.

 

My CSS has:

.main_bg {
text-align: left;
background-image: url(images/blog_bg.jpg);
background-repeat: repeat-y;
}

~Tracy
 

Link to comment
Share on other sites

Hello, I have installed STS 90% successfully.

 

My only problem is in the admin modules section, under the 'sts'and 'payment'sections I am unable to get the last column showing (where you edit the details). (even when I click on th info symbol) Also in 'payment' it is only showing the first 8 modules on the list.

 

Grateful for any help. thanks

Link to comment
Share on other sites

I could use some help working with STS. I got the latest version installed on a clean latest version installation of OSC. I was loking through the docs and got confused with the extracss option. I did a google search and found the following post: http://www.oscommerce.com/forums/lofiversion/i...204381-800.html

 

Someone else asked the same question there, but the answer left me a bit confused. >_<

 

In most cases the extracss tag is not needed, just put the link to your stylesheet in the header.

If you have for example another stylesheet for your infoboxes, you can add it to the extracss like this:

 

$sts->template['extracss'] .= '<link rel="stylesheet" type="text/css" href="boxestylesheet.css">';

 

and place <!--$extracss--> in your header.

 

As you can place php code into your templates, you can place something in extracss dynamically, for example according to user's language or month of the year or whatever you are able to code.

 

- Rigadin

 

This may sound like a dumb question, but where do I put the code at? I tried in the sts_user_code.php and got nothing. I also tried to use grep to find any similar lines in the php files in the directory with no success. I am trying to do exactly what the post mentions - use a custom stylesheet for the infoboxes. Any help is greatly appreciated.

Link to comment
Share on other sites

Catalog infoboxes

 

I am trying to customise my infoboxes with images for titles. I can do this with the static infoboxes by creating infobox_infoboxname_header.php.html and infobox_infoboxname.php.html and replacing $headertext with a static img src tag, but I can't seem to do the same with the catalog infoboxes. I have tried to customise the shopping cart infobox by creating infobox_shopping_cart_header.php.html and infobox_shopping_cart.php.html *and* catalog_shopping_cart_header.php.html and catalog_shopping_cart.php.html but neither does anything.

 

I'm using STS 4.5.6 and I'm a bit reluctant to upgrade to 4.5.8 at the moment as I'm very close to going live. Am I missing something? I can't find any other reference to this so apologies if this is a FAQ but I'm going to have to roll everything back if I can't find an answer.

Link to comment
Share on other sites

Hello, I have installed STS 90% successfully.

 

My only problem is in the admin modules section, under the 'sts'and 'payment'sections I am unable to get the last column showing (where you edit the details). (even when I click on th info symbol) Also in 'payment' it is only showing the first 8 modules on the list.

 

Grateful for any help. thanks

Sounds like you did not do a complete installation.

 

:thumbsup: I would suggest that you use a file comparison utility such as WinMerge or Beyond Compare (better) to copare you current files with those of the STS contributuion. You should very easily find out what you are missing by doing this.

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 got a problem. I installed STS 4.5.4 and all works.

Then I tried to get HTC v2.6.3 to work. It seems that there no probs.

I made all changes in STS to get this together work, but when I add headertags.php to the files for normal templates, there is only a blank site. I can't find the error I made. Any ideas? which code shoud i post to identify the error?

 

thx and greetz

 

future

Link to comment
Share on other sites

Hi, I've installed box newsletter contribution (http://addons.oscommerce.com/info/5548), and I need to create a new placeholder (i.e. $newsletter) to include in my template.

 

I've read the documentation and several forums and I can't find the way that it works.

 

Can anybody help me, please?

 

Thanks a lot

How to add a custom infobox in your sts template:

 

Excerpt from catalog/includes/modules/sts_inc/sts_user_code.php:

 

/* The following code is a sample of how to add new boxes easily.
 Use as many blocks as you need and just change the block names.
  $sts->start_capture();
  require(DIR_WS_BOXES . 'new_thing_box.php');
  $sts->stop_capture('newthingbox', 'box');  // 'box' makes the system remove some html code before and after the box. Otherwise big mess!
Note: If $sts->stop_capture('newthingbox', 'box') is followed by $sts->start_capture, you can replace both by $sts->restart_capture('newthingbox', 'box')
Another way to declare STS variables is to enter them directly into the STS array:
  $sts->template['MyText']='Hello World';
*/

 

For example:

The code below will create a sts user tag for the infobox "search.php" and the tag will be "$whatever":

 

$sts->start_capture();
  require(DIR_WS_BOXES . 'search.php');
  $sts->stop_capture('whatever', 'box');

 

You will save this code just before the last ?> in the includes/modules/sts_inc/sts_user_code.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

Hi there,

 

i got a problem. I installed STS 4.5.4 and all works.

Then I tried to get HTC v2.6.3 to work. It seems that there no probs.

I made all changes in STS to get this together work, but when I add headertags.php to the files for normal templates, there is only a blank site. I can't find the error I made. Any ideas? which code shoud i post to identify the error?

 

thx and greetz

 

future

OK...first of all you should strongly consider upgrading to STSv4.5.8. Your current version has some bugs related to infobox templates and contributions that need to return an error message to the user.

 

As for how you installed HTCv2.6.3, take a look at the link in my signature on how to successfully install HTC onto your STS shop. If you followed all of the steps, you issue may have to do with step #6 and #7.

 

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

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