[Contribution] Additional Images Module
#1461
Posted 13 April 2011 - 09:52 PM
While everything appears to be functioning, i have this one issue which i am not sure where to find the solution to.
Additional image popups do not load anythign when clicked (also, the additional image is the FULL image size merely scaled... the original product image is resized properly with a small file size etc), the lightbox presents itself and just 'loads'. Under closer examination, the url to the image for which is to be included in the pop up is as follows:
http://www.thecitywidestore.ca/images/
As you can see, the 'click to expand' link is pointing to the image folder itself.
Any ideas????
What did i miss?
Thank you!
(Please help)
#1462
Posted 28 April 2011 - 12:09 PM
I have installed Easy Populate to get my products into the database. In the CSV file, I have specified the product image and the additional images.
I can process the product images fine but cannot process the additional images. When I click to show unprocessed images, the additional images do not show up for me to process. This results in the product info pages displaying the correct size main image but all the additional images are full size due to them not being processed. The only way to get round it is to go to each product that has an additional image, delete the additional image and then re-upload it and process it at the same time. This wouldn't be too much trouble for a dozen or so images but I have over 800 products with additional images.
Is there a simpler way to process the additional images rather than doing them one by one?
Thanks
Carl
#1463
Posted 20 June 2011 - 02:28 PM
#1464
Posted 29 June 2011 - 10:50 PM
It seems Additional Images conflicts with Ultimate Search Engine Optimized Urls (USU5)
Does anyone out there know if there is a solution?
Please..
Eveline
#1465
Posted 21 July 2011 - 08:43 AM
The thumbnail images aren't loading on the catalog, although the others that are uploaded do fine. That field only tries to load 102 characters of the URL, and not the rest.
Any ideas?
Thanks!
***EDIT***
Sorted, just had to change the field length in PhpMyAdmin. Should have thought of that earlier...
Edited by Rubin Remus, 21 July 2011 - 08:54 AM.
#1466
Posted 21 July 2011 - 08:46 AM
Denkster, on 29 June 2011 - 10:50 PM, said:
It seems Additional Images conflicts with Ultimate Search Engine Optimized Urls (USU5)
Does anyone out there know if there is a solution?
Please..
Eveline
I haven't noticed a conflict really. You just need to be logical when you're making code changes. Can you explain the problem a little more?
#1467
Posted 21 July 2011 - 01:22 PM
Edited by Rubin Remus, 21 July 2011 - 01:32 PM.
#1468
Posted 25 July 2011 - 03:13 PM
#1469
Posted 25 July 2011 - 10:08 PM
Rubin Remus, on 21 July 2011 - 08:46 AM, said:
I was not watching this forum, while searching for the cause and a solution myself.
Please correct me if I'm wrong, here are my thoughts.
The problem I found
with USU5 in combination with image add-ons was that USU5 did not redirect correctly after putting a product in the shopping cart.
The cause of the problem seemed to be:
(I'm not sure if the cause was Additional Images only or Product Cycle Slideshow too)
- USU5 requires strict and correct use of the function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL').
- Linking to a page directly (without tep_href_link), or with a different function, is not allowed when using USU5.
The parameters in the page URL must be inside the brackets. Parameters cannot be added outside tep_href_link(), or USU5 will redirect to an unintended location.
This goes for the front end of the shop; AFAIK USU does not change the admin.
In at least one link of an image application I found link-URL parameters outside the function brackets (type 1 error).
I found an error of the first type, in line 150 of displayimages.php
document.write(\'<a href="' . (!$this->onpagemenu ? 'javascript:popupWindow(\\\'' : '') . tep_href_link( $this->linkurl, ($item==0&&$this->groupwithparent=='true'?'pID='.$products_id:'imagesID='.$addimages_images[$item]['id'])) . (!empty($_GET['products_id']) ? '&products_id='.$_GET['products_id'] : '') . (!empty($_GET['cPath']) ? '&cPath='.$_GET['cPath'] : '') . (!$this->onpagemenu ? '\\\')' : '') . '"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes($addimages_images[$item]['desc']), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE) . '</a>\');
In that line, these URL parameters (if !empty) are outside the brackets op tep_href_link():
'&products_id='.$_GET['products_id'] .'&cPath='.$_GET['cPath']
I found an error of the 2nd type (link notusing tep_href_link) in line 407 of additional_images.php
$lc_text = ' <a href="javascript:popupWindow(\'additional_images_popup.php?'.(!empty($listing['additional_images_id'])?'additional_images_id='.$listing['additional_images_id']:'products_id='.$listing['products_id']).'\')">' . ($_GET['show_images'] == 'y' ? tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . (!empty($listing['products_image']) ? $listing['products_image'] : (!empty($listing['products_image_med']) ? $listing['products_image_med'] : (!empty($listing['products_image_pop']) ? $listing['products_image_pop'] : '' ) ) ), $listing['products_name'], (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'')) : '') . '</a> ';
And in line 142 of displayimages.php
document.write(\'<a href="images/' . $addimages_images[$item]['popimage'] . '"target="_blank" rel="lightbox[group]" title="' . addslashes(htmlspecialchars($addimages_images[$item]['desc'])) .'"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes(htmlspecialchars($addimages_images[$item]['desc'])), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE). '</a>\');
And in line 35 of categories.php
define('TEXT_PRODUCT_MORE_INFORMATION', 'For more information, please visit this products <a href="http://%s" target="blank"><u>webpage</u></a>.');
#1470
Posted 06 August 2011 - 08:11 PM
#1471
Posted 09 August 2011 - 08:07 PM
I put in oscommerce rc2, the image is appearing more great is to leave the 400px resolution:
I put so it does not work <div id="loadarea" style="width: 400px" align="left"></div>
product_info.php
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td align="center" id="loadarea" class="smallText">
<?php
if ($product_info['products_image_med']!='') {
$new_image = $product_info['products_image_med'];
$image_width = MEDIUM_IMAGE_WIDTH;
$image_height = MEDIUM_IMAGE_HEIGHT;
} else {
$new_image = $product_info['products_image'];
$image_width = SMALL_IMAGE_WIDTH;
$image_height = SMALL_IMAGE_HEIGHT;
}
?>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']).'"rel="opacity:70; opacity-reverse:true; zoom-fade:true; zoom-fade-in-speed:800; zoom-fade-out-speed:400; zoom-width:420px; zoom-height: 420px; zoom-position:center; thumb-change:mouseover; drag-mode:false; always-show-zoom:false "class="MagicZoom">' .tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], 420, 420, 'hspace="0" vspace="0"') . '</a>'; ?><br>
<?php echo tep_image(DIR_WS_IMAGES . 'detalhes.gif', HEADER_DETALHES); ?></td>
</tr>
</table>
additional_images.php
<?php echo '<a class="magicborder" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_sm_1']) . '"rel="enlargeimage::click" rev="loadarea"">' . tep_image(DIR_WS_IMAGES . $product_info['products_image_sm_1'], $product_info['products_name'], ULT_THUMB_IMAGE_WIDTH, ULT_THUMB_IMAGE_HEIGHT, 'hspace="1" vspace="1"') . '</a>'; ?>
#1472
Posted 23 November 2011 - 06:19 PM
any help would be greatly appreciated.
#1473
Posted 16 March 2012 - 10:47 AM
#1474
Posted 27 April 2012 - 04:14 PM
The first was to change
function IsHexColor($HexColorString) {
return eregi('^[0-9A-F]{6}$', $HexColorString);
}
to
function IsHexColor($HexColorString) {
return preg_match('#^[0-9A-F]{6}$#i', $HexColorString);
}
The second was to change
function gd_version($fullstring=false) {
static $cache_gd_version = array();
if (empty($cache_gd_version)) {
$gd_info = gd_info();
if (eregi('bundled \((.+)\)$', $gd_info['GD Version'], $matches)) {
$cache_gd_version[1] = $gd_info['GD Version']; // e.g. "bundled (2.0.15 compatible)"
$cache_gd_version[0] = (float) $matches[1]; // e.g. "2.0" (not "bundled (2.0.15 compatible)")
} else {
$cache_gd_version[1] = $gd_info['GD Version']; // e.g. "1.6.2 or higher"
$cache_gd_version[0] = (float) substr($gd_info['GD Version'], 0, 3); // e.g. "1.6" (not "1.6.2 or higher")
}
}
return $cache_gd_version[intval($fullstring)];
}
to
static function gd_version($fullstring=false) {
static $cache_gd_version = array();
if (empty($cache_gd_version)) {
$gd_info = gd_info();
if (preg_match('#bundled \((.+)\)$#i', $gd_info['GD Version'], $matches)) {
$cache_gd_version[1] = $gd_info['GD Version']; // e.g. "bundled (2.0.15 compatible)"
$cache_gd_version[0] = (float) $matches[1]; // e.g. "2.0" (not "bundled (2.0.15 compatible)")
} else {
$cache_gd_version[1] = $gd_info['GD Version']; // e.g. "1.6.2 or higher"
$cache_gd_version[0] = (float) substr($gd_info['GD Version'], 0, 3); // e.g. "1.6" (not "1.6.2 or higher")
}
}
return $cache_gd_version[intval($fullstring)];
}
I am not a coder, so dont bother sending PMs asking for help as you wont get any.
OSC has a steep learning curve, but in general the program does work. If it doesnt work, the chances are it is something you have done.









