Jump to content
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

Go back to the original version (the one in the More Pics distribution.) Please verify for me that you see no product images in the products table for any category.

 

Next, check your Admin -> Catalog -> Product Images. Do you have one (and only one) image for each product that has the Category flag set (Green light in the listing under Category?)

 

Regards

Jim

okay i have taken the files from more_pix_2.0.7_rollup\more_pics_advanced_2.0.6\catalog

i still have the same problem that the products are shown twice... it makes me crazy...

i also used the file install.php to update the pictures to my database product_images

 

REGARDS BERUSKA

Share this post


Link to post
Share on other sites

so here is the fix :)

i deleted all entries from the table product_images and run the install.php

now its only show once, still THANK YOU FOR YOUR GREAT HELP!!!!

 

REGARDS BERUSKA

Share this post


Link to post
Share on other sites
Try putting the images on the left or right side and see if you like that. If not, the code you need is Lines 121 through 145 of catalog/includes/modules/more_pics.php. You need to set up an index on that while() loop, then count how many images. Once the count is above your limit, add another copy of Line 141 followed by a copy of Line 129. This needs to be inserted around Line 138. If I'm not completely off my head here -- the anesthesia is starting to wear off.....

 

Regards

Jim

 

Hi Jim

 

Thanks for your reply. I have tried it but i am not getting my while loop right. The images are displayed large one in the center and then the thumbnails listed in a single line below. Sorry i am not great with code.... could you give simple instructions please.....

 

 

Many thanks Sarah

Share this post


Link to post
Share on other sites

OK, here's a quick try at this. Find this code in catalog/includes/modules/more_pics.php (Line 134)

		  if ($num_products_images > 1) {
		$small_images_string .= '			 <a href="' . tep_href_link (basename ($PHP_SELF), 'products_id=' . $products_id . '#morepics') . '" name="morepics" ' . MORE_PICS_MOUSE_OPERATION . '="document.MainImage.src=\'' . DIR_WS_IMAGES . $images['image_filename'] . '\'">' . tep_image (DIR_WS_IMAGES . $images['image_filename'], $products_name, $image_width, $image_height, 'class="productsImages"') . '</a>';
	  }
	  $small_images_string .= '		   </td>' . "\n";

and add this just after it:

		  if (MORE_PICS_IMAGE_ROW > 0 && MORE_PICS_IMAGE_ROW == $images_order+1) {
		$small_images_string .= '		 </tr>' . "\n";
		$small_images_string .= '		 <tr>' . "\n";
	  }

Then run this SQL on your database:

INSERT INTO `configuration` VALUES(NULL, 'Small Image Rows', 'MORE_PICS_IMAGE_ROW', '0', 'Set the maximum number of small images in a row. Location = Top or Bottom only. 0 = Off.', 6124, 40, now(), now(), NULL, NULL);

Now go to your More Pics Admin and set Small Image Rows to the maximum number of thumbnails you want in a row.

 

This is untested, so beware of fat-finger typos. Please let me know if it works for you.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
OK, here's a quick try at this. Find this code in catalog/includes/modules/more_pics.php (Line 134)

		  if ($num_products_images > 1) {
		$small_images_string .= '			 <a href="' . tep_href_link (basename ($PHP_SELF), 'products_id=' . $products_id . '#morepics') . '" name="morepics" ' . MORE_PICS_MOUSE_OPERATION . '="document.MainImage.src=\'' . DIR_WS_IMAGES . $images['image_filename'] . '\'">' . tep_image (DIR_WS_IMAGES . $images['image_filename'], $products_name, $image_width, $image_height, 'class="productsImages"') . '</a>';
	  }
	  $small_images_string .= '		   </td>' . "\n";

and add this just after it:

		  if (MORE_PICS_IMAGE_ROW > 0 && MORE_PICS_IMAGE_ROW == $images_order+1) {
		$small_images_string .= '		 </tr>' . "\n";
		$small_images_string .= '		 <tr>' . "\n";
	  }

Then run this SQL on your database:

INSERT INTO `configuration` VALUES(NULL, 'Small Image Rows', 'MORE_PICS_IMAGE_ROW', '0', 'Set the maximum number of small images in a row. Location = Top or Bottom only. 0 = Off.', 6124, 40, now(), now(), NULL, NULL);

Now go to your More Pics Admin and set Small Image Rows to the maximum number of thumbnails you want in a row.

 

This is untested, so beware of fat-finger typos. Please let me know if it works for you.

 

Regards

Jim

 

Fantasic it works, your a star!!! Thank you :)

 

I do have one more question.......

 

I have a best sellers scrolling box with images which worked before i added MorePics. Now the images don't load up. Are the images defined differently using More PICs? I have tried hard to get it working but am at a loss. The code is below, do you have any suggestions?

 

 if (isset($current_category_id) && ($current_category_id > 0)) {
$best_sellers_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 } else {
$best_sellers_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 }

 if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {
?>
<!-- best_sellers_scroll //-->
	  <tr>
		<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_BESTSELLERS);

new infoBoxHeading($info_box_contents, false, false);

$rows = 0;
$bestsellers_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';
while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
  $rows++;
  $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">'  . '</td><td class="infoBoxContents">'. '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' .tep_image(DIR_WS_IMAGES . $best_sellers['products_image'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'<br>'. tep_row_number_format($rows). '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>';
}
$bestsellers_list .= '</table>';

$info_box_contents = array();
$info_box_contents[] = array('text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>');


new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- best_sellers_scroll_eof //-->
<?php
 }
?>

 

I am very greatfull for your help.

 

sarah

Share this post


Link to post
Share on other sites

Yes, More Pics changes the location of the image name, so other addons won't work without changes. You need to change the queries to this:

	$best_sellers_query = tep_db_query("select distinct p.products_id, pi.image_filename, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1', " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);

$best_sellers_query = tep_db_query("select distinct p.products_id, pi.image_filename, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1', " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);

and the part of the file that uses the data so:

	  $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">'  . '</td><td class="infoBoxContents">'. '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' .tep_image(DIR_WS_IMAGES . $best_sellers['image_filename'], $best_sellers['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'<br>'. tep_row_number_format($rows). '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>';

BTW, I hope I'm not typical of your customers. I hate anything that scrolls or moves, and will leave your store if I can't stop the motion. Just a thought.

 

Regards

Jim

 

Edit: Spell checker? What spell checker?

Edited by kymation

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim, Contrib works great. Just having trouble integrating with Fetured Products. Code is slightly different. PLease have a look. Can't get the databse query right:

 

if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) {

$featured_products_query = tep_db_query("select p.products_date_added, p.products_id, pi.image_filename, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

} else {

$featured_products_query = tep_db_query("select p.products_date_added, distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

}

 

$row = 0;

$col = 0;

 

 

echo '

<table cellspacing=0 cellpadding=0>

<tr>

 

 

 

';

 

while ($featured_products = tep_db_fetch_array($featured_products_query)) {

$featured_products['products_name'] = tep_get_products_name($featured_products['products_id']);

// added for New Product Icon contribution

// 2592000 = 30 days in the unix timestamp format

if ( ($today_time - strtotime($featured_products['products_date_added'])) < 2592000) {

$featured_products['products_name'] .= '<br>' . tep_image_button('icon_newarrival.gif', TEXT_ICON_NEW_PRODUCT);

}

// end addition

$product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$featured_products['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

$featured_products['products_description'] = $product['products_description'];

// get products category

$categories_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$featured_products['products_id'] . "'");

if (tep_db_num_rows($categories_query) > 0) {

$categories = tep_db_fetch_array($categories_query);

$categories_query2 = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$categories['categories_id'] . "'");

$categories2 = tep_db_fetch_array($categories_query2);

$category_name = $categories2['categories_name'];

} else {

$category_name = '';

}

// get products manufacturers

$man_query = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$featured_products['products_id'] . "'");

if (tep_db_num_rows($categories_query) > 0) {

$manuf = tep_db_fetch_array($man_query);

$man_query2 = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manuf['manufacturers_id'] . "'");

$manuf2 = tep_db_fetch_array($man_query2);

$man_name = $manuf2['manufacturers_name'];

} else {

$man_name = '';

}

 

 

 

echo '

<td width=140 valign=top style="padding-left: 9px">

<table cellspacing=0 cellpadding=0 width=160>

<tr><td height=13></td></tr>

<td width=87 valingn=top>

<table cellspacing=0 cellpadding=8px>

 

 

<td width=73 valign=top><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['image_filename'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'vspace=0') . '</a></td>

 

<tr><td><a class="pr_name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '"> ' . $featured_products['products_name'] . '</a></td></tr>

 

<tr><td><span class=ch6>only:</span> <span class=ch7>'.$currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])).'</span></td></tr>

</table>

</td></tr>

<tr><td height=14></td></tr>

<tr><td colspan=2 style="padding-left: 12px"><a href="' . tep_href_link('product_info.php','products_id=' . $featured_products['products_id']) . '">' . tep_image_button('small_view.gif') . '</a><span style="padding-left: 6px"></span><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id']) . '">' . tep_image_button('button_in_cart.gif') . '</a></td></tr>

<tr><td height=15></td></tr>

</table>

</td>

';

Share this post


Link to post
Share on other sites

Needs some work on the queries. Try this:

$featured_products_query = tep_db_query("select p.products_date_added, p.products_id, pi.image_filename, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_idleft join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1' where p.products_status = '1' and f.status = '1' order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
} else {
$featured_products_query = tep_db_query("select p.products_date_added, distinct pi.image_filename, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_idleft join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.category_page = '1' where c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

After install more pics on admin categories, where I can see the information of product and where I can add a product, I can't see image.

I have modified this queries (in bold) but I can't see images again. Anyone have resolved this problem?

On admin/categories.php:

 

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, pi.image_filename, 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, p.products_to_rss from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.product_page = '1', " . 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 . "'");v

 

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, pi.image_filename, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, p.products_to_rss from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.product_page = '1', " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, pi.image_filename, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id, p.products_to_rss from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.product_page = '1', " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, pi.image_filename, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_to_rss from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_IMAGES . " pi on p.products_id = pi.products_id and pi.product_page = '1', " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");

Share this post


Link to post
Share on other sites

Those queries appear to be correct. Where are you using the data? If you intend to change the operation of admin/categories.php, you may certainly do that, but I don't know how you are going to make that work with More Pics. I may be able to help with this if you explain what you are trying to accomplish here.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Those queries appear to be correct. Where are you using the data? If you intend to change the operation of admin/categories.php, you may certainly do that, but I don't know how you are going to make that work with More Pics. I may be able to help with this if you explain what you are trying to accomplish here.

 

Regards

Jim

 

The images in my store are only uploaded with more pics, I haven't the classic product image. This determines no images when I go on admin -> catalog -> categories/product , I can't see images of existing products and images of products when I modified any information.

I try to change the queries that you have read, but I have the same problem. I don't know if is sufficient to change the queries or must do another changes.

Regards

Giulio

Edited by giuli8

Share this post


Link to post
Share on other sites

This is the correct behavior. Please read section 3 of the how_to_use.txt in the distribution.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim

 

 

After installing more_pics_advanced_2.0.6 no product can now be changed. Get the following error in the admin

1054 - Unknown column 'pi.image_filename' in 'field list'

 

select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, pi.image_filename, 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 = '19' and p.products_id = pd.products_id and pd.language_id = '2'

 

 

Have more_pics_advanced_2.0.6 installed.

phpMyAdmin with the database.sql loaded.

install.php called. (Basic store and shop with other addons tested)

 

 

Is even one mistake.

What is wrong?

 

 

I have found here in Tread on page 48 the following

 

pi.products_image should be pi.image_filename. Another typo. Thanks for spotting that one. I found it in catalog/index.php -- after about 30 seconds of searching. If it seriously takes you an hour to find something like that, get a better editor. Eclipse is free and open source. It has a great search feature. Two of them, actually, but you want the global search for something like this.

 

Other editors have a global search feature as well, so if you don't like Eclipse then go find one that you like. You'll do a lot better work with a lot less frustration if you have good tools. Not that frustration never happens (What do you mean "Unknown error at Line 0"? Stupid PHP.)

 

Regards

Jim

[/quote]

But do not understand this.

 

In my index, there is no pi.products_image.

 

 

 

Can you show my the way please?

 

Regards

Joachim

Share this post


Link to post
Share on other sites

You missed an edit in that SQL string.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
You missed an edit in that SQL string.

 

Regards

Jim

 

 

I think I am now a bit too stupid for that.

what do you mean? A change in the database?

Or select string in the above?

 

My English is not so good!

Did not notice this in the How_to_use or Read_me recognized.

 

Could you tell me precisely what I must edit?

 

Regards

Joachim

Share this post


Link to post
Share on other sites

There is an error in the string that you posted. I don't know where you got that string, so I can't give you exact instructions on fixing it. Use your compare program to check your modified file against the one in the distribution. There may be more than one difference in that line, so be careful.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi Jim,

 

I asked this question also in the recently viewed topic a few days ago, but this one seems more alive so I'll try again here.

 

I'm running recently viewed as well as more pics but I think I've to change the sql for recently viewed to see the product images. Since you developed both I hope you can help me out.

 

Thanks in advance en regards,

Marja.

Share this post


Link to post
Share on other sites

This forum silently deletes my topic subscriptions. If I don't answer a post, you can PM me to ask me to look at your post. I don't guarantee that I'll know the answer, but I will look at it.

 

Yes, you need to modify any addon that uses images to work with More Pics Advanced. That's due to the new database structure needed to deal with unlimited images. I'm working on a collection of mods to other addons to be included in a future edition.

 

Now I'll go answer your question in the appropriate thread.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
There is an error in the string that you posted. I don't know where you got that string, so I can't give you exact instructions on fixing it. Use your compare program to check your modified file against the one in the distribution. There may be more than one difference in that line, so be careful.

 

Regards

Jim

 

Yes. You have once again right. :rolleyes:

5 hours strings cut and assembled and already is.

HeaderTags_SEO and More_Pics are not necessarily easy to connect. :blink:

At least for laymen like me.

 

Regards

Joachim

Share this post


Link to post
Share on other sites
This is the correct behavior. Please read section 3 of the how_to_use.txt in the distribution.

 

Regards

Jim

 

I have read section 3 of how_to_use.txt and I have check with Diffmerge my admin/categories.php and the same file in the contribution. I have done the modified exactly also with other contributions (Header Tags Seo and Xsell). If you have 5 minutes, can I send to you my categories.php ?

Thanks

Share this post


Link to post
Share on other sites

Before you do that, do you understand that you should NOT be able to see any product images in your Admin -> Catalog -> Categories / Products?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hi,

 

i have installed More pics 6 v1.3b (aka "More pics 6 v1.3b (clean & beauty)"), but i have some problems

with my popup_image....

 

Everytime when i click on image, it open ok, but it doesn´t show the "next, previous and close buttoms. If maximinize the window, it show all buttoms, but when click the buttom, the next image is open and dont show buttoms again...

 

I didn´t find any upgrade instruction about my version... I guess i need to uninstall it and install the 2.0.7 version, but SQL changes looks a bit different and probally i will have problem.

 

Anyone know how i can fix this problem with next/previous/close buttoms? Or maybe tell me if is possible upgrade my version to another one...

 

PS: Using oscommerce 2.2 RC2a

 

Here is my popup_image.php:

 

<?php
/*
 $Id: popup_image.php,v MoPics 6 2003/06/05 23:26:23 Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
 Updated by John Wood - www.z-is.net
*/

 require('includes/application_top.php');

 $navigation->remove_current_page();

 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
// BOF: More Pics 6
$PID = $HTTP_GET_VARS['pID'];
$invis = $HTTP_GET_VARS['invis'];
$result = mysql_query("select * from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
// EOF: More Pics 6
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<link type="text/css" rel="stylesheet" href="/css/stylesheet.css">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
<?php // BOF: More Pics 6 ?>
 if (document.layers) i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +45, document.images[0].height+135-i);
<?php // EOF: More Pics 6 ?>
 self.focus();
}
//--></script>
<?php // BOF: More Pics 6 ?>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
<?php // EOF: More Pics 6 ?>
</head>
<body onLoad="resize();">
<p class="smallText" align="center" valign="bottom">
<?php // BOF: More Pics 6 ?>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
     <?php // Lets find the last available image !
$image = tep_db_fetch_array($result);
if ($image['products_subimage6'] != ''){       
$last = '6';
}elseif ($image['products_subimage5'] != ''){
$last = '5';
}elseif ($image['products_subimage4'] != ''){
$last = '4';
}elseif ($image['products_subimage3'] != ''){       
$last = '3';
}elseif ($image['products_subimage2'] != ''){       
$last = '2';
}elseif ($image['products_subimage1'] != ''){       
$last = '1';
}elseif ($image['products_image'] != ''){       
$last = '0';
}
$next = $invis + '1';
$back = $invis - '1';
?>
<?php
if (($invis == '0') || ($invis == '')){
$insert = $image['products_image'];
} else  {
$insert = $image['products_subimage' . $invis. ''];
}

$img = DIR_WS_IMAGES . $insert;
echo '<tr width="100%"><td align="center">' .tep_image(DIR_WS_IMAGES . $insert) . '</td></tr>';
?>        
</table>
  <table width="100%"> 
<?php
if (($back != '-1') || ($next <= $last)) {
 echo '<hr color="#666666" size="3">';
}
if ($back != '-1'){
echo '<td align="left" width="50%"><a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='.$back).'">' . tep_image(DIR_WS_IMAGES.'left.gif', 'previous', '', '', 'border="0"') . '</a></td>  ';
}
if ($next <= $last){
echo '<td align="left" width="50%"><a href="'.tep_href_link('popup_image.php','pID='.$PID.'&invis='. $next).'">' . tep_image(DIR_WS_IMAGES.'right.gif', 'next', '', '', 'border="0"') . '</a></td>';
}
echo '<td align="right" width="50%"><a href="java script:window.close()">' . tep_image(DIR_WS_IMAGES.'close.gif', 'Close Window', '', '', 'border="0"') . '</a></td>';
echo '';
?>
</table>

<?php // EOF: More Pics 6 ?>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

Edited by Mildway

Share this post


Link to post
Share on other sites
Before you do that, do you understand that you should NOT be able to see any product images in your Admin -> Catalog -> Categories / Products?

 

Regards

Jim

 

Yes, I cannot see any images. I check the queries and are correct. I don't know why can't see any pictures.

Share this post


Link to post
Share on other sites
Hi,

 

i have installed More pics 6 v1.3b (aka "More pics 6 v1.3b (clean & beauty)"), but i have some problems

with my popup_image....

<snip>

You can upgrade to More Pics Classic 1.4.3 (using the same database as your current version.) I can't guarantee it will solve your problem, but it should. It's in the More Pics 2.0.7 Combined distribution.

 

If you want to upgrade to 2.0.6, there are upgrade instructions in the Upgrades folder in the distribution.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

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

×