Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

My question concerns the latest version of STS and HTC contribution. The STS instructions say not to totally follow the HTC catalog side of the instructions if I understood correctly. Does adding the headertags.php file to admin section of STS suppose to replace having to modify this bit of code in every page you need header tags.

 

 

All I get is "Currently Viewing:" with nothing else

 

As I said, I solved it with changing the code but would like to confirm I have it working as it was designed to function in STS.

Basically my question is , by adding the headertags.php file after sts_user_code.php in admin, is this suppose to take care of this automatically because it seems to contain the same code to include in the page.

To Keith:

Be sure you have followed all of the installation instructions in my Step by Step:

 

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

 

Pay particular attention to Step 6. Did you add the code to each of your STS Modules in the admin as Step 6 points out?

 

 

To Ash:

Keep up the good work on your site. You're getting there! :thumbsup:

 

To Tyler:

Sorry, but I could not get your site to open at all. Is it live yet?

 

To Sherrie:

Yes this can be done. I think the code that you need is in the includes/boxes/shopping_cart.php file. Take a look at the SQL string and then create a tag accordingly. I'm sorry that I do not have the time at the moment to help you further. Maybe someone else in this forum has some time for this.

 

To Everyone:

Sorry, I will not be available to post responses until after the week-end. :-

 

Today is my birthday so I will be spending it with my family. :rolleyes:

Happy New Year Everyone! :lol:

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

Um...sorry about this seemingly blank post-I didn't know how to get anything to show up, but then I looked up a couple posts and found it, and I don't see where to delete my crybaby post, so...um...God I feel blonde :/

Edited by NJRAS5
Link to comment
Share on other sites

To Everyone:

Sorry, I will not be available to post responses until after the week-end. :-

 

Today is my birthday so I will be spending it with my family. :rolleyes:

Happy New Year Everyone! :lol:

 

HAPPY BIRTHDAY BILL!! :thumbsup:

~Tracy
 

Link to comment
Share on other sites

forget about the featured products question, my new question is im trying to get the popup_image to work, i installed it in admin, and i copied the template from the full example just to see if it works and placed it sts_templates/mytemplate/popup_image.php.html and when i click on the click to enlarge, it doesnt do anything, shows an error on the bottom left.

Link to comment
Share on other sites

What does the error say?

 

forget about the featured products question, my new question is im trying to get the popup_image to work, i installed it in admin, and i copied the template from the full example just to see if it works and placed it sts_templates/mytemplate/popup_image.php.html and when i click on the click to enlarge, it doesnt do anything, shows an error on the bottom left.
Link to comment
Share on other sites

Ash, you're missing the Javascript code for popupWindow(url) in the <head> section of your code.

 

Look at the top of product_info.php for it. At least that's where it's at in "stock" osC code.

 

When I try to post it here, the forum butchers it....

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

my images (big) are located under catalog/images/images_big

i think i did something to make the images_big work before but i dont remember, do i have to do something???

 

 

i copied the code but it still gives me the error saying object expected

 

this is whats inside my popup_image.php.html

 

<?php define ('STS_END_CHAR', '}'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams}>
<head>
<!--$headcontent-->
<script language="javascript"><!--


function resize() {
 var i=0;
 var MarginW = 60;
 var MarginH = 140;

 if (document.layers) i=40;
 if (document.prodimage.width>document.bannerimage.width) {Width=document.prodimage.width +MarginW}
else Width = document.bannerimage.width+MarginW;
 Height = document.prodimage.height+document.bannerimage.height+MarginH;
 window.resizeTo(Width,Height);
 self.focus();
}
//--></script>
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
<?php // BOF: More Pics 6 ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
<?php // EOF: More Pics 6 ?>
</head>
<body onLoad="resize();">
<table width="100" border="5" align="center" cellpadding="5" bgcolor="#FFFFFF" id="table1">
 <tr>
<td>
<table border="0"
cellpadding="0" cellspacing="0" style="width: 100%; border-collapse:collapse" bordercolor="#111111">
  <tbody>
	<tr>
	  <td>
		  <img border="0" src="images/oscommerce.gif" name="bannerimage"></td>
	  </tr>
  </tbody>
</table>
<p align="center"><font face="Arial">$productname}</font><font color="#808080" size="2">[$productmodel}]<br>
</font>$popupimage}</td>
 </tr>
</table>
</body>
</html>

Edited by kewldude_3001
Link to comment
Share on other sites

Well, I have no clue how STS works, but if this is your site:

 

Click Me

 

(I got that link from one of your earler posts in this thread)

 

That's where the javascript is missing.

 

All it has in the <head> now is:

 

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Kumar's Bookstore</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="stylesheet.css" rel="stylesheet" type="text/css"></head>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

OK,

 

Now put all the Javascript on ONE LINE.

 

The code that startes with window.open( and ends with left=150') needs to be on ONE LINE OF TEXT.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

yayyyyy :), it opens it, now to make it actually show the larger images. i changed my popup_image.php to contain this so what else do i need to do to make it show the larger images instead of the smaller ones

 

<body onLoad="resize();">
<?php echo tep_image(DIR_WS_IMAGES.'/images_big/'.$products['products_image'], $products['products_name']); ?>
</body>

Edited by kewldude_3001
Link to comment
Share on other sites

forget about the featured products question, my new question is im trying to get the popup_image to work, i installed it in admin, and i copied the template from the full example just to see if it works and placed it sts_templates/mytemplate/popup_image.php.html and when i click on the click to enlarge, it doesnt do anything, shows an error on the bottom left.

Ash,

Your Popup Image issue is not STS related. It appears you either removed or copied over the JavaScript that is needed in the stock osCommerce PHP files.

 

:thumbsup: Tip: The only reason STS would not pull in the required JavaScript is if you left out the needed tag in your STS template:

<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->

 

:thumbsup: Also: To help rule out STS in the future, just turn STS off in the admin temporarily and if you still have issues then you know they are not STS related.

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

This is not the way to get your popups to work correctly. You should not add the JavaScript directly to your template. It should be added in your product_info.php file just the same way as a stock osCommerce store.

 

See my post above to be sure you have the $htmlparams tag in your template.

 

-Bill Kellum

 

 

my images (big) are located under catalog/images/images_big

i think i did something to make the images_big work before but i dont remember, do i have to do something???

 

 

i copied the code but it still gives me the error saying object expected

 

this is whats inside my popup_image.php.html

 

<?php define ('STS_END_CHAR', '}'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams}>
<head>
<!--$headcontent-->
<script language="javascript"><!--


function resize() {
 var i=0;
 var MarginW = 60;
 var MarginH = 140;

 if (document.layers) i=40;
 if (document.prodimage.width>document.bannerimage.width) {Width=document.prodimage.width +MarginW}
else Width = document.bannerimage.width+MarginW;
 Height = document.prodimage.height+document.bannerimage.height+MarginH;
 window.resizeTo(Width,Height);
 self.focus();
}
//--></script>
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
<?php // BOF: More Pics 6 ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
<?php // EOF: More Pics 6 ?>
</head>
<body onLoad="resize();">
<table width="100" border="5" align="center" cellpadding="5" bgcolor="#FFFFFF" id="table1">
 <tr>
<td>
<table border="0"
cellpadding="0" cellspacing="0" style="width: 100%; border-collapse:collapse" bordercolor="#111111">
  <tbody>
	<tr>
	  <td>
		  <img border="0" src="images/oscommerce.gif" name="bannerimage"></td>
	  </tr>
  </tbody>
</table>
<p align="center"><font face="Arial">$productname}</font><font color="#808080" size="2">[$productmodel}]<br>
</font>$popupimage}</td>
 </tr>
</table>
</body>
</html>

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

lol funny thing, i turned off popup_image from the admin side and deleted the javascript from the product_info.php.html (inside the content folder) and it started working.

 

But its not using the lightbox effect for the window. i thought if i didnt use a template it would execute like the default and its not :(

 

i see one for sts :), i'll let u know how it turns out :)

Edited by kewldude_3001
Link to comment
Share on other sites

This is quite a long support thread. My store for some reason has a problem. The STS in the admin is not working anymore. I click on it and it goes nowhere. The absolute only thing that has been done with the store since it was working fine was 2 new categories and new products. Would that break it? Any help is aprecited.

 

Also the UPS module isn't working either, but that's for another thread. Just odd that these things both broke for no reason.

Link to comment
Share on other sites

YAYYYYYYYY i did it, i fixed it, i read through the contributions for this: http://addons.oscommerce.com/info/5236 and fixed it, the key thing is to download the latest from the guy's site and then follow the first instructions by Erik Svensson and then do this lil part

Edit: includes/modules/sts_inc/product_info.php

About in line 80 find:
-------------------------------------------------------------------------------------------------
$template_pinfo['product_popup']= '<script language="javascript"><!--'."\n".
							   'document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . (int)$products_id) . '\\\')">' . $template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\');'."\n".
							   '//--></script>'."\n".
							   '<noscript>'."\n".
							   '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n".
							   '</noscript>'."\n";
} else {
 $template_pinfo['imagesmall'] ='';
 $template_pinfo['imagelarge'] ='';
 $template_pinfo['product_popup']=''
}
-------------------------------------------------------------------------------------------------

 Replace with:
-------------------------------------------------------------------------------------------------
 $template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n";

} else {
 $template_pinfo['imagesmall'] ='';
 $template_pinfo['imagelarge'] ='';
 $template_pinfo['product_popup']='';	
}
-------------------------------------------------------------------------------------------------

As you can see it's the $template_pinfo['product_popup'] that has to be changed.

That's all. Good luck.

 

Check out how it works if you dont know how it works already :)

My Site

 

lol sorry for all the posts, but it helps me to see what the problem is, i bet if i waited to try everything then i wouldnt have posted at all :)

Link to comment
Share on other sites

I use the lightbox contribution for STS and it works great. Not hard to implement, either.

 

lol funny thing, i turned off popup_image from the admin side and deleted the javascript from the product_info.php.html (inside the content folder) and it started working.

 

But its not using the lightbox effect for the window. i thought if i didnt use a template it would execute like the default and its not :(

 

i see one for sts :), i'll let u know how it turns out :)

Link to comment
Share on other sites

I'm telling you, you do not have to go to that extreme to get your popups working with STS. STS popups work "OUT OF THE BOX".

 

You must have deleted or copied over some of the stock osC code to cause your popups to stop working in the first place or your added something in your popup image template (or other templates) to cause it not to work.

 

As you can see, all of the sample templates work with the popup image.

 

The Lightbox popup is a totally different contribution and not a "solution" to your problem. It is an added feature that just so happened over-wrote your bad code to cause your popups to work. Without knowing what caused your problem in the first place will most certainly mean you may cross this road again and then not know what you did to cause your cart to break.

 

YAYYYYYYYY i did it, i fixed it, i read through the contributions for this: http://addons.oscommerce.com/info/5236 and fixed it, the key thing is to download the latest from the guy's site and then follow the first instructions by Erik Svensson and then do this lil part

Edit: includes/modules/sts_inc/product_info.php

About in line 80 find:
-------------------------------------------------------------------------------------------------
$template_pinfo['product_popup']= '<script language="javascript"><!--'."\n".
							   'document.write(\'<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . (int)$products_id) . '\\\')">' . $template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>\');'."\n".
							   '//--></script>'."\n".
							   '<noscript>'."\n".
							   '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n".
							   '</noscript>'."\n";
} else {
 $template_pinfo['imagesmall'] ='';
 $template_pinfo['imagelarge'] ='';
 $template_pinfo['product_popup']=''
}
-------------------------------------------------------------------------------------------------

 Replace with:
-------------------------------------------------------------------------------------------------
 $template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">'.$template_pinfo['imagesmall'] . '<br>' . TEXT_CLICK_TO_ENLARGE .'</a>'."\n";

} else {
 $template_pinfo['imagesmall'] ='';
 $template_pinfo['imagelarge'] ='';
 $template_pinfo['product_popup']='';	
}
-------------------------------------------------------------------------------------------------

As you can see it's the $template_pinfo['product_popup'] that has to be changed.

That's all. Good luck.

 

Check out how it works if you dont know how it works already :)

My Site

 

lol sorry for all the posts, but it helps me to see what the problem is, i bet if i waited to try everything then i wouldnt have posted at all :)

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

This is quite a long support thread. My store for some reason has a problem. The STS in the admin is not working anymore. I click on it and it goes nowhere. The absolute only thing that has been done with the store since it was working fine was 2 new categories and new products. Would that break it? Any help is aprecited.

 

Also the UPS module isn't working either, but that's for another thread. Just odd that these things both broke for no reason.

 

Frank,

 

I will assume that you are using the 060817 version of osCommerce. If so, then you are experiencing the "Refresh bug".

See the following link to fix your problem (this is not related to STS):

 

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

 

Hope this helped and yes, this is a long thread full of helpful information! Use the Google to search this thread for answers:

 

site:www.oscommerce.com/forums [Contribution] sts v4

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

Frank,

 

I will assume that you are using the 060817 version of osCommerce. If so, then you are experiencing the "Refresh bug".

See the following link to fix your problem (this is not related to STS):

 

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

 

Hope this helped and yes, this is a long thread full of helpful information! Use the Google to search this thread for answers:

 

site:www.oscommerce.com/forums [Contribution] sts v4

 

 

Thanks Bill!

 

I checked those files and I do have the changes already in there. This is the RC1 version of osc. It's very odd. Any other suggestions? And thanks for the google link, that will help when searching with 2 letter words! :)

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