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

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);

 

 

Charles

Link to comment
Share on other sites

I love your contributions and I always choose yours above others.

 

I just finished adding this little beauty to a new Commerce site that I am building for a friend.

 

I ran into a little issue: the Admin > Images section now shows two instances of "Product Information Image Width" and "Product Information Image Height".

Both instances of "Product Information Image Width" have a value of 100, while both instances of "Product Information Image Height" have no values.

 

How do I go about fixing this issue?

 

Thank You,

Steve

Link to comment
Share on other sites

Congratulations!

Congratulations to the author for the contribution that I needed to put it in my store.

But I need help to adjust the layout of my store the image and the information we're getting to the right of my site and leaving a blank space in the center of the screen.

Can anyone help me, I lay in php but I am starting studies

Below I leave the address to see

 

My link

 

Thank you and big hug to the whole community!

Edited by Crash®
Link to comment
Share on other sites

too many settings

 

 

You must have run the sql twice, you could iether remove the extra fields with php my admin or add Total Configuration http://addons.oscommerce.com/info/5040

That allows you to edit/delete any setting

Its a quick easy install.

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 Sam,

 

Thank you for your help with the multiple instances of Image Height and Image Width.

 

I installed the Total Configuration add-on which allowed me to remove the multiple instances.

However, I think I messed something up because I applied the Bug Fix to Total Configuration AFTER I removed the multiple instances and I am now receiving the following error when I go to Admin > Tools > Total Configuration:

 

Parse error: syntax error, unexpected T_VARIABLE in /public_html/catalog/admin/total_configuration.php on line 565

 

I have re-done the installation as well as applying the bug fix, neither if which fixed the above.

 

 

In addition I noticed that I am receiving an error message when I go to Admin > Images:

 

Additional Images:

Warning: Variable passed to each() is not an array or object in /public_html/catalog/admin/categories.php on line 883

 

Not sure if the two errors are related or not but I really need your help with these.

 

Thank you in advance,

Steve

Link to comment
Share on other sites

 

 

1 You have made errors, check your edits

 

2. Please read the FAQ

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 Spooks,

First of all thank you so much for the wonderful addon "Simple Multi Image Add-on with FancyBox"

 

I have installed and working perfectly, except one thing:

I noticed that the "product description" is missing.

 

I suspect that I wrongly edited the "product_info.php",

In the install manuel It says"

Find (124):


         <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" 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"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
             </td>
           </tr>
         </table>

 

 

and replace with the given code.

But I noticed that my "product_info.php" has similar but different content.see below( "product_info.php" from my installation ).

 

<div class="main prod_info" style="width:<?php echo (SMALL_IMAGE_WIDTH +23);?>px;">

<?php echo tep_draw_prod_pic_top();?><script language="javascript">
<!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>'; ?>');
//--></script><noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') .  '</a>'; ?></noscript><?php echo tep_draw_prod_pic_bottom();?>

<script language="javascript"><!--
document.write('<?php echo '<a class="enlarge" href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript><?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' .  TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript></div> 
<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>
                                 <br><div><?php echo $products_price?></div></div><br>
<div style="clear:both;"></div>
<?php
   }
?>

 

 

So the issue is, without finding the actual code, how can I replace ?

 

Is there anyone can help me where to edit this.Thank you so much.

(I am using a Template bought from TempMonst)

Link to comment
Share on other sites

Using a template

 

 

Any time your using a template, esp one with rubbish coding like TM does, your best looking at a original rc2a file so you can see how the code is supposed to be, then working out your changes with that.

 

Your description is done with this bit:

 

<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>
                                 <br><div><?php echo $products_price?></div></div><br>

 

Just put that after my code, but take care you have a

<?php
   }
?>

that looks missplaced, any further trouble you need to speak to TM, as its against forum rules to support commercial products, sorry. smile.gif

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

Dear friends could solve the problem that was happening with my store on the update of PHP, the contribution is working OK

So I'm not getting hit and the position of the contribution in the display because it is all right on the screen and is leaving a blank space in the center of my shop.

I installed Firebug Firefox to try to find the lines to adjust but I had no success.

I have to turn to for this I come to ask your help

imagem-loja2.jpg

 

My store

 

Please help me .. :'(

Link to comment
Share on other sites

Hello Sam,

 

As always, thank you very much for the Add-on as well as your effort and patience with assisting those of us that are "script challenged".

Upon your suggestion I am double (triple) checking my editing using the original file from OSC. During this process I found that your instructions state:

 

Find (446)

 

$products_url = $HTTP_POST_VARS['products_url'];

 

Add after:

 

// Simple multi image addon

$products_image_array = array();

for ($i = 1; $i <= (int)$_POST['image_array_limit']; ++$i)

{

if (tep_not_null($_POST['products_image_' . $i])) $products_image_array[] = $_POST['products_image_' . $i];

}

// EOF Simple multi image addon

 

The problem I've encountered is that $products_url = $HTTP_POST_VARS['products_url']; exists in two places in the original file: Line 388 and 604.

Do I insert the Add-on script after both of those instances? If not then after which one?

 

Your time, effort and most of all patience is greatly appreciated,

Steve

Link to comment
Share on other sites

Dear friends could solve the problem that was happening with my store on the update of PHP, the contribution is working OK

So I'm not getting hit and the position of the contribution in the display because it is all right on the screen and is leaving a blank space in the center of my shop.

I installed Firebug Firefox to try to find the lines to adjust but I had no success.

I have to turn to for this I come to ask your help

imagem-loja2.jpg

 

My store

 

My product_info

 

Please help me .. :'(

Link to comment
Share on other sites

Bad page stucture makes bad layout!!

 

Crash®, on 11 January

 

 

You must ensure you correctly open/close all table elements

 

w3c will help find errors. http://validator.w3.org/check?uri=http%3A//www.facilitibrasil.com.br/lojateste/product_info.php%3Fproducts_id%3D46

 

HTML Tuition http://www.w3schools.com/html/default.asp

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

product description missing

The product information is missing;

 

 

 

I assume you mean the product description is missing.

 

This does not modify that part of the file, the product description appears immediatly after the image edits.

 

If your product description is missing, you have either deleted that part accidently, or made errors editing the dbase query, check all your edits again till you find your error.

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

Your description is done with this bit:

 

<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>
                                 <br><div><?php echo $products_price?></div></div><br>

Thank you very much!

The problem is solved.

Link to comment
Share on other sites

Your description is done with this bit:

 

<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>
                                 <br><div><?php echo $products_price?></div></div><br>

Thank you very much!

The problem is solved.

 

Your welcome, do me a favor, don't bump.. its rude.. esp when u bump without reading your existing reply, it means next time u may get no reply, as its now known you may not bother to read it anyway!!

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

 

 

Hi Sam,

 

I hate to be an echo but I have the same question again as JR. Could you steer us in the right direction as to how to implement FancyBox on the product review page? Otherwise, everything works great and this is really a giant improvement over the stock layout.

 

Many Thanks,

 

Nick

Link to comment
Share on other sites

I have got Fancybox working perfectly, but now I have a big problem cause I have several options in each product, it is, color, so I do not want to create 4 products for each colour...I can create attributes with a contribution, but I would like to know how I could show images associated to each option... is it possible to adapt fancybox contribution (this one from this post) to take images from attributes ??..

 

I hope anyone could give me a light about this¡¡¡¡

 

Thanks in advances,

Edited by javibmw
Link to comment
Share on other sites

implement FancyBox on the product review page

 

 

the next update will have the option of implementing FancyBox on the product review page, its in progress, it will appear as time allows. sweatingbullets.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.

Link to comment
Share on other sites

Made some random error & think your phycic so can tell what I dun wrong!!

 

 

Your error is due to an error you have made in the install, as I don`t know what error you made I have no idea what you have done wrong!!

 

If your thinking your error is due to this add-on, ask yourself, why has no-one else had my issue??

 

Go over the install again till you find where u went wrong. Use the included files in place of yours if needed.

 

Perhaps How do I install a contribution http://www.oscommerce.com/forums/index.php?showtopic=343384 will help you? wink.gif

 

 

PS b4 u say 'I've installed perfectly & checked many times' Every time someone has an issue they say 'I've installed perfectly & checked many times' yet 99% of the time their issue turns out to be due to thier own error or missed off instruction!! huh.gif

 

 

PPS Why are u shouting??? pinch.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.

Link to comment
Share on other sites

Does anybody can help me???????

 

I have decided to use simple multi image add-on with fancybox making only one change, but I need to know how to do it.

 

I want to asign a name to each aditional image (used in this contribution), it is, with this contribution you can assign such images as you want, selecting an image to load...I want to assign a name to every image I upload, so when any image is popped up, it is shown the name , for example, red clock, blue clock, ...

 

in which table and what fields should I insert??

 

Please, give me a light.

Edited by javibmw
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...