Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Popup images not popping up


beauregard

Recommended Posts

I have reinstalled osC on a new server and am redoing my shop.

I have added a product with its photo in the admin section.

On the product_info page, when I click to enlarge, the photo is not there.

I have popup allowed in IE and it doesn't popup either on Firefox, so I guess I have to upload the photo somewhere and not only when I add new products in Admin.

How do I fix that ?

Thanks everyone in advance

Link to comment
Share on other sites

I have reinstalled osC on a new server and am redoing my shop.

I have added a product with its photo in the admin section.

On the product_info page, when I click to enlarge, the photo is not there.

I have popup allowed in IE and it doesn't popup either on Firefox, so I guess I have to upload the photo somewhere and not only when I add new products in Admin.

How do I fix that ?

Thanks everyone in advance

 

You should not have to upload the image seperately from adding the product unless you have an image contribution that requires it. Are you using sts by any chance? If so then you will need to apply the fix found in the support thread.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

You should not have to upload the image seperately from adding the product unless you have an image contribution that requires it. Are you using sts by any chance? If so then you will need to apply the fix found in the support thread.

I am using STS and have just tried applying the fix provided by Kingsley dated dec 18 http://www.oscommerce.com/community/contributions,1524

It does return the popup window but at the same time, it resizes my browser at the same size as the popup window, that's a reletively minor bug, these are the lines of code he provided in his contrib

 

open catalog/includes/sts_product_info.php

replace:

$template['productsid'] = $product_info['products_id'];// Just for consistende with osC names

with

$template['product_popup_url'] = FILENAME_POPUP_IMAGE . "?pID=" . $product_info['products_id'];

 

open catalog/includes/sts_templates/product_info.php.html

Add the following between the <head> </head> tags: <script language="javascript" type="text/javascript">

<!--function popupWindow(url){ newwindow=window.open url,'name','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');

if (window.focus) {newwindow.focus()}

return false;}// --></script>

 

And then:

Add these lines further down in the same file where you want the popups to be:

<a href="$product_popup_url" onClick="return popupWindow('$product_popup_url')">$imagesmall</a>

<a href="$product_popup_url" onClick="return popupWindow('$product_popup_url')">Click to Enlarge</a>

 

What should I change ???

Should I try another fix ?

Link to comment
Share on other sites

All you should need to do is add the javascript for the pop to your header and the problem should go away.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

All you should need to do is add the javascript for the pop to your header and the problem should go away.

I presume this is the popup script, if it is, I put it at various places in /includes/header.php and it's not working, any other suggestions ?

 

<script language="javascript" type="text/javascript">

<!--

function popupWindow(url)

{

newwindow=window.open(url,'name','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');

if (window.focus) {newwindow.focus()}

return false;

}

 

// -->

</script>

Link to comment
Share on other sites

I presume this is the popup script, if it is, I put it at various places in /includes/header.php and it's not working, any other suggestions ?

 

<script language="javascript" type="text/javascript">

<!--

function popupWindow(url)

{

newwindow=window.open(url,'name','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');

if (window.focus) {newwindow.focus()}

return false;

}

 

// -->

</script>

 

It has been awhile but try adding it to the header of you sts_template.html file

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...