Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pop Not Displaying Right


JeffT

Recommended Posts

Installed the mod and it works great! Thanks!

 

Some issues though. Popups are no longer displaying an image. The popup comes up, but no image is being loaded. I then modified the catalog/popup_image.php to add the commented line (look for "I am playing around" below):

 

require('includes/application_top.php');

 

$navigation->remove_current_page();

 

$products_query = tep_db_query("select pd.products_name, 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);

 

// I am playing around here - adding this line produces an image in popup - but not properly resized

echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], 300,300,'',1,0);

 

$content = CONTENT_POPUP_IMAGE;

$javascript = $content . '.js';

$body_attributes = ' onload="resize();"';

 

 

require(DIR_WS_TEMPLATES . TEMPLATENAME_POPUP);

 

require('includes/application_bottom.php');

?>

 

So this seems to get an image, and it seems to load the image from the /res directory which imagemagick has modified. But imagemagick in this case (although it works fine for thumbnails) only seems to be renaming the file as per what I have set in the admin section for image sizes. The file size for the popup is the full image size and dimensions which were uploaded.

 

It would seem that either the JS resize() function isn't working or the tep_image dimensions have no effect. Any ideas what I can modify with this contribution to get imagemagick to actually change the original via imagemagick?

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