Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


spooks

Recommended Posts

Can somebody post examples of this contrib in action? Would like to have a look a finished product before installing.

 

Hello,

Yes thanks to the help of this thread, and spooks, here is a link for the working contrib.

Working site with Simple Multi Image add-on.

It's not a beer gut, it's padding for my rock hard abs!

Link to comment
Share on other sites

What browser are u using?, note there is an update for issues with ie8.

 

Can u give a link?

 

I'm using Firefox, and also their Namoroka alpha when Firefox plays up.

My shop is www.theurbanrooster.com

If you click on the Ceramic DOG Salt & Pepper, that has got Multi Images.

Thanks,

pete.

Link to comment
Share on other sites

What browser are u using?, note there is an update for issues with ie8.

 

Can u give a link?

 

I'm using Firefox, and also their Namoroka alpha when Firefox plays up.

My shop is www.theurbanrooster.com

If you click on the Ceramic DOG Salt & Pepper, that has got Multi Images.

Thanks,

pete.

Link to comment
Share on other sites

Hi Spooks,

 

great contribution!

 

HAve you got working it with oscThumbs contribution? I have installed STS contrib + Simple Multi Image (your contrib) + oscThumbs.

 

All is working good, but when you pop'up the image in fancybox there no watermark on the picture.

 

thanks

Link to comment
Share on other sites

HAve you got working it with oscThumbs contribution?

 

Yes, but to be honest I don't use the watermark part, as it rarely seems to work, I use it for its thumbnail ability.

 

You can easily test if oscThumb does anything without Fancybox, disable scripts in your browser, then pics will just open in new page instead.

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.

Link to comment
Share on other sites

What browser are u using?, note there is an update for issues with ie8.

 

Can u give a link?

 

Hi, I'm using Firefox, but also their Namoroka alpha when Firefox plays up.

My shop is www.theurbanrooster.com

If you click on the Ceramic Dog Salt & Pepper Shakers, it has Multi Images.

pete.

Link to comment
Share on other sites

What browser are u using?, note there is an update for issues with ie8.

 

Can u give a link?

 

I'm using Firefox 3.5, and also Mamoroka alpha when Firefox is playing up.

Our Shop is at www.theurbanrooster.com

If you click on the Ceramic DOG Salt & Pepper Shakers, that has Multi Images.

Cheers,

pete.

Link to comment
Share on other sites

What browser are u using?, note there is an update for issues with ie8.

 

Can u give a link?

 

I'm using Firefox 3.5, and also Mamoroka alpha when Firefox is playing up.

Our Shop is at www.theurbanrooster.com

If you click on the Ceramic DOG Salt & Pepper Shakers, that has Multi Images.

Cheers,

pete.

Link to comment
Share on other sites

Image not loading

 

 

Your issue is with osCthumb, the main image link is invalid hence it sticks on loading. Try turning off osC thumb see if OK then, also try without Encrypt Image Filenames.

You can easily test if issues are with Fancybox or otherwise, disable scripts in your browser, then pics will just open in new page instead.

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.

Link to comment
Share on other sites

 

Just took a secound look u are using invalid file names!! u are putting researved chars within the name.

 

U have named the pic DoggieS/P.JPG which will be read as P.jpg within a subdir DoggieS which dont exist!!

 

 

For best practice do not put any of: $&+,/:;=?@<>#%{}|^~[]` or any spaces or any quotes.

If u have photoshop, its save for web option will ensure a valid filename.

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.

Link to comment
Share on other sites

hello spooks :)

 

I installed v1.1.5 but it doesnt work ( no fancybox popus) . I get and error on the admin side in Catalog->categories/products which is

 

Additional Images:	
Warning: Variable passed to each() is not an array or object in /home/content/55/4809155/html/admin/categories.php on line 1123

 

I'm using STS , oscThumb and onepagecheckout contributions ( dont know if any of those has any influence )

 

Could you please help me? would really like to use your contribution on my site :)

 

thanks!

Link to comment
Share on other sites

Warning: Variable passed to each() is not an array or object in /home/content/55/4809155/html/admin/categories.php on line 1123

 

 

U have missed smthg from the install, go over it again.

 

U could try with the supplied categories.php

 

U would be best using a file compare tool if u have trouble adding things. (all the mods within the supplied files are commented).

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.

Link to comment
Share on other sites

U have missed smthg from the install, go over it again.

 

U could try with the supplied categories.php

 

U would be best using a file compare tool if u have trouble adding things. (all the mods within the supplied files are commented).

 

I have tried with the supplied files and although the error is gone, the popup image is still a normal browser window and I only see one image on the product description.

I then used Winmerge to compare the supplied files with my own configure.php and product_info.php and the error was back (!).

 

I have one question though, How do I insert the additional images in the product description page? I mean when I click a product, it shows my STS product template with only one clickable image ( pops up with a normal firefox window).

 

Can you please help? thanks once again!

Link to comment
Share on other sites

 

 

If u modify the files correctly as per instructions it will all work, if u have errors then u have failed in that, try again, what more can i say?

 

Try both supplied files.

 

Others in this thread have used this on STS sites, so it can work fine.

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.

Link to comment
Share on other sites

Hi,

Thank you very much for this contribution, is a great job and wonderfull new. Not as crisis N1H1 or something like this!!!things like this make me keep alive...

 

 

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

 

There are many multi image contributions, but I found many have become much too bloated or just didn't fit, so I created this, allowing as many extra product pictures as you want with admin control and fancy lightbox like popups.

 

Features:

 

1.Its a simple strait forward design, only two files to edit.

2.An un-limited number of additional images can be added to any product without modification.

3.Any product can have as many (or few) images as wanted.

4.Additional images can be deleted if needed.

5.Fancybox is used for the image popups, so all product images can be browsed within a single popup. (Fancybox is like lightbox but better lighter code).

6.Additional image layout can be modified in admin, selecting a horizontal or vertical layout and the number or images to show per row

7.Additional image size is also set in admin.

8.I recommend this is used with OscThumb for auto thumbnailing & faster load times.

9.As a bonus addition, a function is added in the product edit page to give a instant update option.

 

Fancybox is released under the MIT License, details and examples can be found here .

 

 

To work Fancybox is particular about the doc-type used, check at their site & in the installation.

 

 

Tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals off compatible.

 

 

 

Contribution is here

Link to comment
Share on other sites

it works.. no black boarders, nothing, just the frist install, and the correct doctype.

 

I see the black border issue on your site with my version of ie8, I suggest u upgrade to the latest 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.

Link to comment
Share on other sites

about phpthumb, did you manage to have watermark with image or text working on popup image with the fancybox ? :blush:

 

 

The watermark rarely seems to work in osC thumb, I use it for its thumbnail ability only. Its watermarking ability will not be effected by FancyBox.

 

You can easily test if oscThumb does watermarks without Fancybox, disable scripts in your browser, then pics will just open in new page instead. :)

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.

Link to comment
Share on other sites

You can easily test if oscThumb does watermarks without Fancybox, disable scripts in your browser, then pics will just open in new page instead.

 

i was aking if there is any solution to have the javascript take the image with a tep_image function so that the modfication done by oscthum are taken ...

MS2

Link to comment
Share on other sites

Hello!

Another Question.

 

Is it posible to get the Image from a Folder under the Image-Folder?

 

My Images are in ...images/workplace/

 

If i change the a:1:{i:0;s:13:"image.jpg";} to a:1:{i:0;s:13:"/workplace/image.jpg";}

in the Datebase then there is no Image to see...

 

Can you help me?

Link to comment
Share on other sites

i was aking if there is any solution to have the javascript take the image with a tep_image function so that the modfication done by oscthum are taken ...

 

 

It is using the tep_image function, its the daft way some parts of osC thumjb are implemented, it only watermarks popup images that are passed through popup_image.php which is only called (on an unmodified store) by the javascript popup function that means all thats needed to get a non-watermarked image is to disable javascript in the browser!!

 

You can test that yourself, click on reviews, then click on the image to enlarge, script on = watermarked off = clean!!

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.

Link to comment
Share on other sites

Installed this contributions, and it looks amazing from what i have seen but can't seem to get mine correct.

 

I get this error when looking at a product image.

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\oscommerce-2.2rc2a\catalog\includes\functions\database.php on line 103

Product not found!

 

I followed the instructions down to a tee and everything seemed to feel perfect until i got to this step in the doc file: -

 

Find(762)

 

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td>

</tr>

<?php

}

?>

<tr>

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

</tr>

</table>

<?php

}

?>

 

Add after:

 

<!-- Simple multi image addon -->

<table summary=""><tr><td>Additional Images:</td><td class="main" colspan="3"><table summary=""><tr>

 

<?php $i=1; while (list($key, $value) = each($products_image_array)) { ?>

 

 

<?php echo '<td align="center">' . tep_image(DIR_WS_CATALOG_IMAGES . $value, $value, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="8" vspace="5"');

if($HTTP_POST_VARS['delete_image_' .$i] == 'on') echo '<br />To Be Deleted';

echo '</td>'; ++$i; } ?>

 

</tr>

</table></td></tr></table>

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

 

I couldn't find that exact entry in the categories.php, there was things similar but lots of other things inbetween.

 

Here is a sample of my code from that area...

 

<td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td>

</tr>

<?php

}

?>

<tr>

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

</tr>

<?php

}

 

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {

if (isset($HTTP_GET_VARS['origin'])) {

$pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0);

if ($pos_params != false) {

$back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params);

$back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1);

} else {

$back_url = $HTTP_GET_VARS['origin'];

$back_url_params = '';

}

} else {

$back_url = FILENAME_CATEGORIES;

$back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id;

}

?>

<tr>

<td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

</tr>

<?php

} else {

?>

<tr>

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

<?php

/* Re-Post all POST'ed variables */

reset($HTTP_POST_VARS);

while (list($key, $value) = each($HTTP_POST_VARS)) {

if (!is_array($HTTP_POST_VARS[$key])) {

echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));

}

}

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

}

echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

 

echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . '  ';

 

if (isset($HTTP_GET_VARS['pID'])) {

echo tep_image_submit('button_update.gif', IMAGE_UPDATE);

} else {

echo tep_image_submit('button_insert.gif', IMAGE_INSERT);

}

echo '  <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';

?></td>

</tr>

</table>

 

 

 

Also, when importing SQL everything seemed perfect but i think i imported both SQL files by mistake.

 

 

Can anyone offer any guidance?

Link to comment
Share on other sites

My Images are in ...images/workplace/

 

If i change the a:1:{i:0;s:13:"image.jpg";} to a:1:{i:0;s:13:"/workplace/image.jpg";}

in the Datebase then there is no Image to see...

 

Can you help me?

 

 

Modify categories.php so it places the images in that folder & adds the relavent path to the filename, then no changes required to javascript or product_info.php.

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.

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