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

Thank you for your response Sam...

 

I installed Fancy on a problem free website.

 

The immediate results were the warning message which I posted.

 

I'm sure that I am never supposed to assume, which I did, that the warning was connected to the installation.

 

I will start a new thread asking for input to solve this problem

 

Thank you, Regards Robert

 

 

Thats OK biggrin.gif , these co-incidences seem to happen often, I would suspect you will find that your host has just upgrades php, hence the sudden notices as osC uses a lot of the now depereciated regex extension functions. ohmy.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

Hi Sam,

 

I was wondering if you could help me integrate some code into product_info.php. The site has the simple multi image contribution but I also need the YMM contribution.

 

This is the current section of code:

 

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

 

This is what I need to integrate:

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where " . (YMM_FILTER_PRODUCT_INFO == 'Yes' ? $YMM_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 . "'");

 

 

I tried it like this:

 

$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 " . (YMM_FILTER_PRODUCT_INFO == 'Yes' ? $YMM_where : '') . " 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 . "'");

 

 

BUT, Got this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where p.products_status = '1' and p.products_id = '28' and pd.products_id = p.pr' at line 2

 

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 products p, products_description pd where pd where p.products_status = '1' and p.products_id = '28' and pd.products_id = p.products_id and pd.language_id = '1'

 

 

Could you give me some clue how to integrate this ?

 

 

Thanks

 

Chris

Link to comment
Share on other sites

Hi Sam,

 

I was wondering if you could help me integrate some code into product_info.php. The site has the simple multi image contribution but I also need the YMM contribution.

 

This is the current section of code:

 

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

 

This is what I need to integrate:

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where " . (YMM_FILTER_PRODUCT_INFO == 'Yes' ? $YMM_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 . "'");

 

 

I tried it like this:

 

$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 " . (YMM_FILTER_PRODUCT_INFO == 'Yes' ? $YMM_where : '') . " 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 . "'");

 

 

BUT, Got this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where p.products_status = '1' and p.products_id = '28' and pd.products_id = p.pr' at line 2

 

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 products p, products_description pd where pd where p.products_status = '1' and p.products_id = '28' and pd.products_id = p.products_id and pd.language_id = '1'

 

 

Could you give me some clue how to integrate this ?

 

 

Thanks

 

Chris

 

 

I AM NOT SURE WHY THIS DOUBLE POSTED. THE FORUM REFRESHED AND IT WAS HERE TWICE. SORRY ABOUT THAT.

Edited by DunWeb
Link to comment
Share on other sites

 

 

Your trying to mod the query I removed ($product_check_query), you know why I removed it?

 

Ie the query is asking if the product requested exists, your saying the YMM contribution can have situations where a existing product should appear (on product_info at least) to not exist.

 

If that is not the case then the YMM contribution is yet another thats modding that query as its there, not because they know what its for!! ohmy.gif

 

 

 

Yes I know there's a new bug that making double posts, its happened to me too!! Sometimes the extra post don't appear till much later!! I suspect its overuse of forum javascript with browser/javascript compatibilty issues.

 

 

PS what is the YMM contribution?

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

$50.00 IN STORE CREDIT TO ANYONE WHO CAN SOLVE THIS SEEMINGLY SIMPLE PROBLEM WITH MY PAGES...

 

Ever since I installed this fantastic addon, I have been having issues with the page stretching or exploding horizontally when loading and then being imploded back kind of like a horizontal accordion effect. I'm not suggesting that this addon caused my problem in any way. I'm just saying that my issues started around the same time. This is a weird horizontal stretch effect during page load being caused by the images.

 

Can someone please look at why this is happening?

 

some page samples are:

 

http://bastardjeans.com/products.php?cPath=3

 

or

 

http://bastardjeans.com/product_info.php?cPath=3&products_id=64

 

I will give $50 to whoever can give me the definitive fix for this issue.

 

Thanks,

 

Henry

Link to comment
Share on other sites

 

 

I note your issue is IE only (OK in firefox) It also occurs on many pages, not just product_info, so nothing to do with this.

 

I suspect you issue is your site sizeing method, its NAFF!!

 

You are use a table method to size the site & have multiple nested tables all with width set the same (860 I think it was), very bad idea.

 

This details the best & simplest method (to my mind) smile.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

I note your issue is IE only (OK in firefox) It also occurs on many pages, not just product_info, so nothing to do with this.

 

I suspect you issue is your site sizeing method, its NAFF!!

 

You are use a table method to size the site & have multiple nested tables all with width set the same (860 I think it was), very bad idea.

 

This details the best & simplest method (to my mind) smile.gif

 

Thanks for the immediate feedback Sam. Actually, the sizing was 100% on most of the elements on the page. I was just toying with it to see if that had any affect on my problem. I'll change them back now. But the problem still stands.

Link to comment
Share on other sites

The problem is only happening with products.php and product_info.php pages. Those are the pages that have product images on them and the Mulit Image Add-on.

Thanks,

Henry

 

 

products.php is not a standard osC page & only has standard images on it so this has no effect on that page at all. You've not even included the javascript there, so why??? crying.gif

 

 

 

I was refering to the

 

<table border="0" width="850" height="65" cellspacing="0" cellpadding="0">

 

followed by :

 

<!-- NAVIGATION BAR -->

<table border="0" width="850" cellspacing="0" cellpadding="0">

 

followed by :

 

<!-- body //-->

<div style="margin:auto; width:850px; text-align:center;">

 

followed by :

 

<table border="0" width="850" cellspacing="3" cellpadding="3" class="sitecontent">

 

 

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

Sam, although I found the solution, your suggestions were instrumental in leading me to the right places to look. I spent hours looking through the code and image calculations. Instead, the problem had to do with the outer div containers. The solution was to add overflow:hidden to the div. Thanks very much.

Henry

Link to comment
Share on other sites

Hi,

 

I installed this contrib today and it works like a charm! It has greatly improved the look and feel of my store, together with OscThumbs. But, I have found a tiny glitch that is causing trouble with CSS Menu 0_4_1 (http://addons.oscommerce.com/info/4589). When I browse the categories from a main or subcategory page, e.g. My store front, it works fine. But if I'm on a product info page (e.g This product, there are small gaps between the categories and products in the drop down menu. This causes the menu to close when the mouse cursor goes over the gaps. These gaps weren't there before installing SMIA, so I guess there's something in product_info.php that causes them, a cellspacing or cellpadding setting or whatever. I have compared both files (before and after add-on) with Winmerge, but I'm unable to find the difference.

BTW, the installed product_info.php file is the one included in the contrib without any changes. Can you help me to locate this?

TIA

Link to comment
Share on other sites

My product_info page now looks slightly different to the rest of my site.

 

 

 

In the doc it says:

 

 

 

Q.My product_info page now looks slightly different to the rest of my site.

 

A.This install gives options for a limited number of valid DocType declarations, if the DocType is now different on the product_info page to others it may cause this issue, try different valid DocTypes to fix.

 

 

Did you miss that? 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.

Link to comment
Share on other sites

Oops... :rolleyes: I did read the whole doc, but I didn't identify that question as related to my problem. Seems easy enough to fix, thanks for the tip :)

 

Edit: Problem solved, thanks again for this fantastic add-on and for your help.

Edited by Dandon
Link to comment
Share on other sites

jquery

 

i just installed this then realised i have a footer bnner using jquery for a slideshow...doh

 

any ideas as to how to solve this?

 

is there no way to have multiple instances using jquery? ...if not then perhaps other methods of creating slideshows?

 

any ideas?

 

i want a footer slideshow (which ive coded directly into the banner manager actually for manufacturer adverts) and a header slideshow (for selected "featured products")

 

a bit off topic but related to the jquery problem...perhaps someone could suggest a thread related to contrib advice...

Link to comment
Share on other sites

 

 

 

The doc says:

Fancybox is jquery based, if you have any other jquery apps on the product info page you must ensure that there is only one instance of jquery, that its version is what's needed for all apps using it and it contains all the calls needed.

 

 

Check you did copy the supplied js directory & contents to your images directory?

 

 

Please read it 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.

Link to comment
Share on other sites

Hi, great contribution.

 

I have a problem. The popup images dont seem to work with IE8. Ive tried the doctypes you suggest on page 5/6 but still wont work.

 

When I try to click on an image, it shows the loading gif in the middle, but then doesnt do anything. Shows error in status bar of IE8:

Webpage error details

 

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0; AskTB5.5)

Timestamp: Wed, 17 Mar 2010 17:18:28 UTC

 

 

Message: Not implemented

 

Line: 202

Char: 6

Code: 0

URI: http://karczewski.co.uk/hrc/images/js/jquery.fancybox.js

 

 

 

It works with Chrome, Firefox and IE7, just not IE8.

 

Any ideas? Site is at karczewski.co.uk/hrc

Link to comment
Share on other sites

Hi, great contribution.

 

I have a problem. The popup images dont seem to work with IE8. Ive tried the doctypes you suggest on page 5/6 but still wont work.

 

When I try to click on an image, it shows the loading gif in the middle, but then doesnt do anything. Shows error in status bar of IE8:

Webpage error details

 

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0; AskTB5.5)

Timestamp: Wed, 17 Mar 2010 17:18:28 UTC

 

 

Message: Not implemented

 

Line: 202

Char: 6

Code: 0

URI: http://karczewski.co.uk/hrc/images/js/jquery.fancybox.js

 

 

 

It works with Chrome, Firefox and IE7, just not IE8.

 

Any ideas? Site is at karczewski.co.uk/hrc

Link to comment
Share on other sites

It works with Chrome, Firefox and IE7, just not IE8.

 

 

 

Most times when things don't work its as you failed to follow the install fully, as is this case, so always triple check your install first, please wink.gif

 

 

 

PS meta missing!!!

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

hmmm, was a fresh install - just a drag and drop plus sql on a new install of OSC

 

I'll uninstall then reinstall.

 

 

Are you saying the missing bits I noted on your page are'nt really missing!! Just check as I advised, if you use a filecompare tool it will make it obvious. 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.

Link to comment
Share on other sites

Hi Sam

 

Thanks for a great contribution.

 

I am getting an error, caused by the ‘alt’ in the <a> rel Attribute

 

Is there another way to write this to correct the problem?

 

Thanks

 

Ken

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