Jump to content
spooks

Simple Multi Image Add-on (Un-Limited) with FancyBox Popups

Recommended Posts

This contribution is excelent, too bad is not compatible with Easy Populate

 

 

Sorry, I cant do everything, have you asked the Easy Populate author if he can make it so, or maybe have a go yourself? wink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Sorry to bother on Christmas eve :sweating:

 

Is it possible to call out a specific image from the blob? :huh:

I want to use say image 3 alone on the review box instead of the default product_image

Current Value:

a:6:{i:0;s:15:"DEMO001-02L.jpg";i:1;s:15:"DEMO001-03L.jpg";i:2;s:15:"DEMO001-04L.jpg";i:3;s:15:"DEMO001-05L.jpg";i:4;s:15:"DEMO001-06L.jpg";i:5;s:15:"DEMO001-07L.jpg";....

 

(I use to use additional images and just replace product_image with product_image_sm_1) ^_^

 

This is as far as I got:

$random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image_array, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.customers_id != 2 and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and r.approved = '1' ";

 

$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image_array'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a><br><div align="center">' . '</div>');

(We use image 3 as the pic of us reviewing the product)

Edited by Stephan (VS)

"I have no special talent. I am only passionately curious"

- Albert Einstein

Share this post


Link to post
Share on other sites

How to get jsut one of the images

 

 

The images are placed into a array in memory with

$products_image_array = unserialize($product_info['products_image_array']);

 

so to get the 3rd image, just use

$products_image_array[2]

 

note though that when a product is edited the array is re-created to ensure no empty slots, ie should you delete image 2, image 3 willl become image 2


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Thanks for this addon. I had no problems with install. At least that I have noticed anyway. Just what I was looking for. You can view my site and the section I needed it the most for at http://www.lynnsleathernlace.com then go to the lingerie section and corsets. I have to add new images throughout the site now. :rolleyes:

Share this post


Link to post
Share on other sites

Thanks for this addon. I had no problems with install. At least that I have noticed anyway. Just what I was looking for. You can view my site and the section I needed it the most for at http://www.lynnsleathernlace.com then go to the lingerie section and corsets. I have to add new images throughout the site now. rolleyes.gif

 

 

Glad you like it. I think your site could do with other impovements too, a fixed width would look better & thumbnails for the listing for starters.wink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I love this addon but im having a small problem.

 

I am using Simple Multiple Images (Unlimited) with Fancy Popups V1.3.5 and it is conflicting with read_more v1.2.

 

When i choose the read more on the any products details page it is supposed to open the read more information on this product in a new page not in a Fancy popup. I would rather the read more page just display the text of the read more information however i am fine with the read more link just opening a new page within my template.

 

an example of how this is failing is here http://www.proteinxpress.com/product_info.php?products_id=195 ; click on the read more link to see how it is poping up in a fancy popup rather than its own window.

 

The interesting thing i found out is if i take the www out of the link it opens up the read more link properly, see here: http://proteinxpress.com/product_info.php?products_id=195

 

Here is my product_info.php code:

 

<?php

/*

$Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

// Simple multi image addon

$image_group = TINY_IMAGE_GROUP_SIZE; //Number of images to show per row/column

$vertical_format = (ADDITIONAL_IMAGE_FORMAT == 'vertical');

$max_title_length = 40; //Set the maximm length of popup titles before they are broken into multiple lines.

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_read_more, p.products_model, p.products_quantity, p.products_image, p.products_image_array, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

$products_image_array = unserialize($product_info['products_image_array']);

if (!is_array($products_image_array)) $products_image_array = array();

// EOF Simple multi image addon

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html <?php echo HTML_PARAMS; ?>>

<head>

<!-- Simple multi image addon -->

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<!-- EOF Simple multi image addon -->

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<!-- Simple multi image addon -->

<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.js"></script>

<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.fancybox.js"></script>

<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.easing.js"></script>

<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.easydrag.handler.beta2.js"></script>

<link rel="stylesheet" href="<?php echo DIR_WS_IMAGES ?>js/fancybox.css" type="text/css" media="screen">

<script type="text/javascript">

$(document).ready(function() {

$("div#fancy a").fancybox({

'zoomSpeedIn': 800,

'zoomSpeedOut': 700,

'imageScale' : true,

'centerOnScroll': true,

'overlayShow': <?php echo (DIM_BACKGROUND == 'true' ? 'true' : 'false'); ?>,

'overlayOpacity': <?php echo (BKG_LUMA/10); ?>,

'zoomOpacity': true,

<?php if (SWING_POPUP == 'true') echo "'easingIn' : 'easeOutBack',"; ?>

'hideOnContentClick': true,

'hideOnOverlayClick': false

 

});

<?php if (DRAG_POPUP == 'true') echo '$("#fancy_outer").easydrag();'; ?>

});

 

</script>

<style type="text/css">

<?php if (SHOW_NAV == 'true') echo 'span#fancy_left_ico {left: 20px;} span#fancy_right_ico {right: 20px;}';

switch (POS_NAV) {

case 'top':

echo 'span.fancy_ico { top: 38px; }';

break;

case 'bottom':

echo 'span.fancy_ico { bottom: 20px; }';

break;

default:

echo 'span.fancy_ico { top: 50%; }';

break;

}

?>

 

</style>

<!-- EOF Simple multi image addon -->

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

// Simple multi image addon

if (!tep_db_num_rows($product_info_query)) {

// EOF Simple multi image addon

?>

<tr>

<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

// Simple multi image addon section moved

 

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

 

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main">

<?php

if (tep_not_null($product_info['products_image'])) {

?>

<!-- Simple multi image addon -->

<div id="fancy">

<table border="0" cellspacing="0" cellpadding="2" align="right">

<tr>

<td align="center" class="smallText">

 

<?php if (strlen($product_info['products_name']) > $max_title_length) { $title = wordwrap(htmlspecialchars($product_info['products_name']), $max_title_length, '<br>');

} else { $title = htmlspecialchars($product_info['products_name']); }

$m_source = ''; $thumb = (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On'); if ($thumb) { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image); $m_source=str_replace('&','&',$image[1]); }

echo '<a rel="image_group" title="'.$title.'" href="' . ($m_source ? $m_source : DIR_WS_IMAGES . $product_info['products_image']) . '" alt="' . $product_info['products_name'] . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a><br />';

if(!$vertical_format) {

echo ''; $row = 1; reset($products_image_array);

foreach($products_image_array as $value) {

if ($thumb) {

$source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image); $source=str_replace('&','&',$image[1]);

}

echo '<a rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>';

++$row; if ($row > $image_group) { echo '<br />'; $row = 1; }

}

}

echo '</td>';

if($vertical_format) {

echo '<td>'; $row = 1; reset($products_image_array);

foreach($products_image_array as $value) {

if ($thumb) {

$source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image); $source=str_replace('&','&',$image[1]);

}

echo '<a rel="image_group" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br />' . '</a>';

 

++$row; if ($row > $image_group) { echo '</td><td>'; $row = 1; }

} echo '</td>';

} ?>

</table>

<!-- EOF Simple multi image addon -->

<?php

}

?>

<!-- </td></tr><tr><td class="smallText"> --><p><?php echo stripslashes($product_info['products_description']); ?></p>

<?php

if (tep_not_null($product_info['products_read_more'])) {

?>

<p><?php echo '<a href="' . tep_href_link(FILENAME_READ_MORE, 'products_id=' . $product_info['products_id']) . '">' . TEXT_READ_MORE_LINK . '</a>'; ?></p>

<?php

}

?>

<?php

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

?>

<table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>

</tr>

<?php

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

$products_options_array = array();

// BOE: Attribute Sort with Clone Tool

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort");

// EOE: Attribute Sort with Clone Tool

 

while ($products_options = tep_db_fetch_array($products_options_query)) {

$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

}

 

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

?>

<tr>

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>

</tr>

<?php

}

?>

</table>

<?php

}

?>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$reviews = tep_db_fetch_array($reviews_query);

if ($reviews['count'] > 0) {

?>

<tr>

<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

if (tep_not_null($product_info['products_url'])) {

?>

<tr>

<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

</td>

</tr>

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Share this post


Link to post
Share on other sites

I just installed the v1.3.5 mod and it works fine except that the pop up images are coming out distorted. They are slightly smaller in height than the original and much narrower than the original, making them very distorted. What did I do wrong? Is there a way to edit this? Shouldn't they be the same size and proportion as the uploaded pics?

 

Thanks,

 

Dan

Share this post


Link to post
Share on other sites

I just installed the v1.3.5 mod and it works fine except that the pop up images are coming out distorted. They are slightly smaller in height than the original and much narrower than the original, making them very distorted. What did I do wrong? Is there a way to edit this? Shouldn't they be the same size and proportion as the uploaded pics?

 

Thanks,

 

Dan

 

Dont set the width and the height of the image just one or the other. I chose to set the height value as all my images have the same height just not the same width. To apply this setting it is in Admin/Images/ Product Information Image Height & Width...

 

GL

Share this post


Link to post
Share on other sites

Dont set the width and the height of the image just one or the other. I chose to set the height value as all my images have the same height just not the same width. To apply this setting it is in Admin/Images/ Product Information Image Height & Width...

 

GL

I'm speaking of the actual pop up image, not the thumbnail. I have all the width settings blank for the smail images, tiny images, etc.

Share this post


Link to post
Share on other sites

images are scaled

 

 

 

images are scaled if larger than the viewport, scaling proportions in ie can be slighty out, this issue & solutions are discussed ealier in this thread.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

other page links effected

 

 

the script looks for any links on the page within a div with the id fancy and modifies their behaviour, make sure your links are outside of that.

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

images are scaled

 

 

images are scaled if larger than the viewport, scaling proportions in ie can be slighty out, this issue & solutions are discussed ealier in this thread.

I was not able to find mention of this issue earlier in the thread but I discovered that all popup images, large or small, were being reduced by 16 px in width and 32 px in height. I partially solved the problem by increasing the padding in jquery.fancybox.js from 10 to 30. I edited:

 

$.fn.fancybox.defaults = {

padding : 30,

 

The pics are no longer distorted and appear the correct size but they are offset to the right and down. How can I center them without distorting them?

 

Dan

Share this post


Link to post
Share on other sites

other page links effected

 

 

the script looks for any links on the page within a div with the id fancy and modifies their behaviour, make sure your links are outside of that.

 

Still trying to fix this could i ask for you assistance?

 

In the Product_info.php is where the call to read_more link exists; it is within the fancybox script. How do i remove the pd.products_read_more from the script but also keep its position on the product_info.php page?

 

example: http://www.proteinxpress.com/product_info.php?cPath=2&products_id=199

 

Code below:

 

Product_info.php line 15-23 see [pd.products_read_more] reference on line 5

 

// Simple multi image addon

$image_group = TINY_IMAGE_GROUP_SIZE; //Number of images to show per row/column

$vertical_format = (ADDITIONAL_IMAGE_FORMAT == 'vertical');

$max_title_length = 40; //Set the maximm length of popup titles before they are broken into multiple lines.

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_read_more, p.products_model, p.products_quantity, p.products_image, p.products_image_array, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

$products_image_array = unserialize($product_info['products_image_array']);

if (!is_array($products_image_array)) $products_image_array = array();

// EOF Simple multi image addon

Edited by mdemaris

Share this post


Link to post
Share on other sites

Still trying to fix this could i ask for you assistance?

 

In the Product_info.php is where the call to read_more link exists; it is within the fancybox script. How do i remove the pd.products_read_more from the script but also keep its position on the product_info.php page?

 

example: http://www.proteinxp...products_id=199

 

Code below:

 

 

 

 

Thats not where your error is, you have modified the code I gave & removed the closing div, follow correct html rules when altering things.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Thats not where your error is, you have modified the code I gave & removed the closing div, follow correct html rules when altering things.

 

Fixed!

 

Thank You for the direction

 

I'm not sure how i went wrong implimenting the addon, possibly modifing it while i was a zombie...

 

Made it center align instead of right to correct the tiny left hand column of text

 

<!-- Simple multi image addon -->

<div id="fancy">

<table border="0" cellspacing="0" cellpadding="1" align="center">

 

 

I found the missing close Div and the worked like a charm!

 

</tr><?php echo '<tr><td class="smallText">' . TEXT_CLICK_TO_ENLARGE . '</td></tr>'; ?>

</table>

</div>

<!-- EOF Simple multi image addon -->

Share this post


Link to post
Share on other sites

Hello...

 

at first thanks for this contrib....

 

if i follow the install instruction i got an error...

 

i compare the install instruction with the included files and in the product_info.php this change does not exist...

 

if i use the code from the included product_info.php it works fine ...

 

Is this a mistake in the install indruktion? (i dont know php but now it is working)

 

Find: (92)

 

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_array, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

 

Replace with:

 

// Simple multi image addon section moved

Share this post


Link to post
Share on other sites

Hello...

 

at first thanks for this contrib....

 

if i follow the install instruction i got an error...

 

i compare the install instruction with the included files and in the product_info.php this change does not exist...

 

if i use the code from the included product_info.php it works fine ...

 

Is this a mistake in the install indruktion? (i dont know php but now it is working)

 

Find: (92)

 

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_array, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

 

Replace with:

 

// Simple multi image addon section moved

 

On, that code is what appears in a ms2 to rc2a site, perhaps you have some other version.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I like the Simple Multiple Images contribution but I am getting a strange problem. When the first image pops up it does so full size then immediately goes to half width. Clicking on the nav button momentarily restores the width before the next image appears in the same way full width and reduces to half width.

 

Tearing my hair out! Please help

 

The config is thus:-

TitleValueAction Small Image Width100

Small Image Height125

Heading Image Width57

Heading Image Height70

Subcategory Image Width100

Subcategory Image Height57

Calculate Image Sizetrue

Image Requiredtrue

Tiny Image Width57

Tiny Image Height70

Additional images per row/column2

Additional Image Formathorizontal

Dim background on popuptrue

Background luminosity9

Popup images dragablefalse

Popup 'swing' effecttrue

Show popup navigationtrue

Popup navigation positionmiddle You can see this on www.fieryiriedesigns.com

Share this post


Link to post
Share on other sites

 

 

Check for possible javascript conflicts if your using any elsewhere on the page.

 

Check for css conflicts/errors.

 

Try other doctypes.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Check for possible javascript conflicts if your using any elsewhere on the page.

 

Check for css conflicts/errors.

 

Try other doctypes.

 

Hi Spooks,

Just wanted to say I got 2 x javascripts(Simple Multiple Images & jQuery Kwicks and CSS Image Sprites ) working on the same page using the

jQuery.noConflict script example below

 

<script> var $j = jQuery.noConflict(); </script>

<script type="text/javascript">

 

function my_kwicks(){

$j('.kwicks').kwicks({

duration: 300,

max: 400,

spacing: 0

});

}

 

$j(document).ready(function(){

my_kwicks();

});

 

</script>

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Hi Sam,

 

Thanks for all the hard work on all your contrib.

 

I was wondering if anyone has implemented the FancyBox on any of the "Review" pages? The review pages only have the one main product thumbnail and I'd like that to be displayed in the FancyBox instead of opening a new browser window. Would this be a simple code replacement in product_review_info/write.php or is it more involved than that?

 

Thanks, JR

Share this post


Link to post
Share on other sites

Hello,

To this contribution I got the following error.

 

1054 - Unknown column 'p.products_image_array' in 'field list'

 

select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_array, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '1' and p.products_id = pd.products_id and pd.language_id = '1'

 

I checked my configure.php.

...

define('DB_SERVER', '**********.de');

define('DB_SERVER_USERNAME', 'dbo313257542');

define('DB_SERVER_PASSWORD', '********');

define('DB_DATABASE', 'db313257542');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

 

Every thing seems ok. The DB seem to be correctly connected.

 

Any suggestions?

 

Xin

Share this post


Link to post
Share on other sites

 

 

Complete the install as detailed!! wink.gif

 

 

3. Apply the included SQL with phpMyAdmin.

 

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi Spooks,

 

I came across an instruction error that may create a stumbling block. The area in red needs to be removed so when you are doing the find it can find the file. The original file does not have simple multi image installed yet so that part will stop it from locating the entire file.

 

Find(420)

 

'products_price' => '',

'products_weight' => '',

'products_date_added' => '',

'products_last_modified' => '',

'products_date_available' => '',

'products_status' => '',

'products_tax_class_id' => '',

'manufacturers_id' => '');

 

$pInfo = new objectInfo($parameters);

 

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

// Simple multi image addon

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×