Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

STS - Popup images not working


synthea

Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

My bad!!!

:blush:

 

This is all that's in the <head> section:

 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>The High Life by Glimpsee</title>
<base href="http://www.moods.com.sg/catalog/">

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
body {
background-color: #BFA884;
background-image: url(http://img.photobucket.com/albums/v226/babyswirl/bckgrd-4.gif);
background-repeat: repeat;
}
.style1 {
font-size: 12;
font-weight: bold;
}
-->
</style></head>

Because you have STS, you have to put the JavaScript code somewhere else....

 

I don't know where it needs to be with STS.

: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

This thread has completely gotten off the subject "Replying to STS - Popup images not working".

 

The suggestions given to correct the problem will only make things worse for users who have STS version 4 and above.

 

I suggest anyone who has STS and is experiencing issues with the popup image go to the STSv4 Forum to seek support (link is in my signature below).

 

STS pulls in the JavaScript from the same location as a non-STS shop does. The only requirement is to place a tag in the head section of your template. This is what makes the HTML template different from any other non-osC HTML page. If you do not place the tag in the head section of your template then STS does not know where to look for the osCommerce JavaScript.

 

If you have the headcontent tag in your head section, then the problem is not related to STS, even if it works with STS off. This only means that you mucked up the origianl osC JavaScript call with your custom code somewhere. If you recently installed a contribution that deviates from the stock popup image, then that is where you need to look. Your shop is not stable and will most likely not work with other contributions, not just issues with STS. STS relies on a stable running osCommerce shop.

 

Hope that helps somehow,

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

  • 3 weeks later...
I was having this issue and I put the javascript code in the head tag of my template file. Seems to work fine for me now.

 

That is NOT the correct way. You are just putting a "bandaide" over a "user-error" that will come back and cause you problems later on, especially with other contributions that need the code that the $headcontent tag brings in as well as osC info regarding metatags.

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

  • 2 months later...

Not sure if this has been covered before, but basically I was 'messing around' with the code in an osCommerce store I am working on for a client (which has STS installed) and today the popup images were not working!

 

I did a "view source" in IE of a random product (displayed from product_info.php), and discovered this a few lines down from the top of the source:

 

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

 

It is supposed to be:

 

<!-- start get_javascript(applicationtop2header) //-->
<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>
<!-- end get_javascript(applicationtop2header) //-->

 

In the end I found out that the problem was due to some STS code missing from the top of catalog/includes/header.php:

 

// START STS 4.1
$sts->restart_capture ('applicationtop2header');
// END STS 4.1

 

The above code must be placed at the top of the page (i.e. before any other code). Now I have working popups again!

 

Hope this helps.

 

Cheers,

 

Sam

Link to comment
Share on other sites

Hi

I am working on a site www.ursexi.co.uk

The popup images are not working

Also i have an intermittent problem that some images are not displayed, on new products, yet on other they are

As a newbe to oscommerce would sure like some expert help

Link to comment
Share on other sites

  • 8 months later...

Hi, im having a similar problem with STS only the popup is working but its showing a blank template file in a small box. When i stretch the window, i can see my normal template file without any content where the $content tag would be. It's not showing the actual popup_image.php template file for some reason, am i missing a file or some code somewhere? Thanks.

 

Here's a link to a product page:

http://heronblu.com/catalog/product_info.p...e/women-style-1

 

I have a few mods installed such as SEO URLs and Maxi DVD extra images mod. SPPC is installed too and Easy Populate.

Edited by sonictrip.net
Link to comment
Share on other sites

(Nevermind)

:blush:

Edited by germ

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

  • 8 months later...

Hi, i still have the popup image problem and have tried all the suggestions on this thread but its still not working almost a year later...

 

Has anyone else discovered any other reasons why this might not be working?

 

A page where the problem occurs...: http://heronblu.com/catalog/product_info.php/cPath/98_79_80/products_id/828

Link to comment
Share on other sites

Hi, i still have the popup image problem and have tried all the suggestions on this thread but its still not working almost a year later...

 

Has anyone else discovered any other reasons why this might not be working?

 

A page where the problem occurs...: http://heronblu.com/catalog/product_info.php/cPath/98_79_80/products_id/828

 

Im just using the normal catalog/product_info.php file for my template, not the STS one but when i enable the template for the product info page, it doesnt change to the STS template. Is this correct for the Product Info STS settings?:

 

Product info templates and content templates (v2.1.0)

 

Use template for product info page

true

 

Enable STS3 compatibility mode

false

 

Files for normal template

sts_user_code.php

 

Files for content template

sts_user_code.php;product_info.php.html

Link to comment
Share on other sites

Working on a store for a client, www.hawk-stock.com

 

I am using STS but no other mods. Popup images won't work. php isn't my strong suit, I need help figuring this one out.

 

I did not edit the popup_image.php file at all. Help please!

 

This doesn't appear to be an Oscommerce installation.

Link to comment
Share on other sites

  • 2 weeks later...

If you've tried everything trying to get popup images to work with STS then maybe this is the one little thing left to try. It seems to have kinda half worked for me. Go into Configuration/My Store in the admin and change "Use Search-Engine Safe URLs" to False. Mine was set to true and was interfering with the links generated for the popup images :)

Edited by sonictrip.net
Link to comment
Share on other sites

  • 2 weeks later...

If you've tried everything trying to get popup images to work with STS then maybe this is the one little thing left to try. It seems to have kinda half worked for me. Go into Configuration/My Store in the admin and change "Use Search-Engine Safe URLs" to False. Mine was set to true and was interfering with the links generated for the popup images smile.gif

 

 

thumbsup.gif You should NEVER have that setting set to true unless you have installed on of the SEO contributions. If you have it set to true, then no telling what will not work in your shop.

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

  • 1 year later...

Hi,

 

couldn't find the answer , but a fter some thinking and testing I come up with a soluition or being able to use cataloglogo placholder in popup_image file rather than manualy writing out is location.

 

in sts_inc/popup_image.php

 

use

<?php
/*
 $Id: popup_image.php,v MoPics 6 2003/06/05 23:26:23 Rigadin $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
$sts->template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); 

 $products_query = tep_db_query("select pd.products_name, p.products_model, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);

$sts->template['productname'] = $products['products_name'];
$sts->template['productmodel'] =  $products['products_model'];
$sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image'],'','','', 'name="prodimage"');

// Empty placeholders, to be used in case you build something for several product images
 $sts->template['back']=''; // Back button, in case there are several product images
$sts->template['next']= ''; // Next button
$sts->template['count']=''; // For the text 1/7 (first picture on seven, ...)

?>

 

basically added the catalogologo line at the top, now I can use it as a placeholder in the popupimage I cant see any ill affects can any tell me if this is going to cuase problems down the line or its an okay solution

 

Thanks

Getting better with mods but no programmer am I.

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