Jump to content
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

I'm a dealer at a convention this weekend and I am trying to print off a catalog of my wares for the con. Because I am using the More Pics Advanced it says there is "The product "XXX" has no picture. I use the generic picture: no_picture.jpg". I know the images are there, and so I'm hoping you can help me redirect the contribution to the images.

 

The catalog one I'm using is PDF Catalogs v.2.0.1 for osCommerce v.2.2 MS2

 

Please help!!

 

Naloomi

 

(P.S. - No luck on image sub-directories yet)

Share this post


Link to post
Share on other sites

I'm not familiar with that PDF addon, but just about anything can be converted to work with MorePics with a little bit of work. Try comparing one of the simple pages, like catalog/reviews.php, to the stock unmodified version. There's a couple of changes to the SQL and one to the image itself. You should then be able to make the same changes to the code in your PDF addon.

 

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

I've been trying to do that. I 'believe' that this is when they are grabbing the image.

$products_new_query_raw = "select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_model, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id order by p.products_date_added DESC, pd.products_name";

 

I've changed the 'p.products_image' to 'pi.image_filename', but that did not work. Gave me an error in the code itself. I am looking at other pages. I'll look at reviews.php and see if that steers me in the right direction.

 

Naloomi

Share this post


Link to post
Share on other sites

What you did was right, but you also need to add the new images table to that line. The Reviews page has the right code for that.

 

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

in catalog/product_info.php there is supposed to be this code:

 

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

 

i couldnt find that anywhere in product_info.php are you sure its supposed to be there? if not then where is it supposed to be>?

 

cheers

Share this post


Link to post
Share on other sites

Lines 148 - 157 in an unmodified copy of osC 2.2RC2a. It may be in a different location if you have an older version. If it's not there at all, you have a modified version of that file.

 

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 there, I installed MP 6 Classic 1,4,3, and the autoinstaller worked just fine.

 

On my product_info I now have a product with three images. The trouble is that the images are nog aligned correct. I see the three products as:

 

__ __ xx (__ means spaces)

xx xx

 

Meaning two on the lower part, the first on the higher part. Is there anything I could have missed?

 

thanks in advance.

Edited by marcelvk

Share this post


Link to post
Share on other sites

It sounds like your installation got the HTML messed up. It's hard to tell without a link.

 

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 and thanks for the quick answer. I hope I can produce this information, I am new to all of this.

 

here's how it looks:

products1.jpg

 

and I have placed your original code from the download. It looks like this

 

}

 

 

// BOF: More Pics 6

 

$mopics_image_width = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:'');

$mopics_image_height = (MOPICS_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'');

 

if (MOPICS_SHOW_ALL_ON_PRODUCT_INFO=='true') {

 

$mopics_output = '';

$mo_row = 1;

$mo_col = 1;

 

$mopics_images = array();

if (tep_not_null($product_info['products_image']) && MOPICS_GROUP_WITH_PARENT == 'false' && MOPICS_GROUP_WITH_PARENT == 'true') { $mopics_images[] = $product_info['products_image']; }

for ( $mo_item=1; $mo_item<7; $mo_item++ ) {

if (tep_not_null($product_info['products_subimage'.$mo_item])) { $mopics_images[] = $product_info['products_subimage'.$mo_item]; }

}

$mopics_count = sizeof($mopics_images);

 

if ($mopics_count > 0) {

 

$mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">';

 

for ( $mo_item=0; $mo_item<$mopics_count; $mo_item++ ) {

 

if ($mo_row<(MOPICS_NUMBER_OF_ROWS+1)) {

if ($mo_col==1) {$mopics_output.='<tr>'."\n";}

 

$mopics_output .= ' <td align="center" class="smallText"><script language="javascript"><!--

document.write(\'<a href="javascript:popupWindow(\\\''. tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\\\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>\');

//--></script><noscript>

<a href="' . tep_href_link(DIR_WS_IMAGES . $mopics_images[$mo_item]) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], $product_info['products_name'], $mopics_image_width, $mopics_image_height, 'hspace="5" vspace="5"') . '<br><img border=0 src=images/zoom.gif></a>

</noscript></td>'."\n";

 

if ($mo_col==MOPICS_NUMBER_OF_COLS) { $mo_col=1; $mo_row++; $mopics_output.='</tr>'."\n"; } else { $mo_col++; }

}

 

}

 

if ($mo_col!=1){ while (($mo_col++)<(MOPICS_NUMBER_OF_COLS+1)) { $mopics_output.='<td> </td>'; } $mopics_output.='</tr>'."\n"; }

 

$mopics_output .= '</table>'."\n";

 

}

 

}

 

// EOF: More Pics 6

 

?>

 

 

<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'])) {

?>

 

Share this post


Link to post
Share on other sites

Is there some reason you can't give me a link?

 

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

Sorry, my bad. I thought you were looking for a screenprint and the code. I have restored a backup, will re-install MorePx again (hopefully tonight), and mail you with the link when it's back up. Thanks again!

Share this post


Link to post
Share on other sites

In your admin Configuration for More Pics, do you have Group parent image with sub-images set to true? Do you have Table Alignment set to left? Do you have Table Location set to sides?

 

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

I didn't even know there was a configuration section of the module. There wasn't any mention of it in the little install-manual that I read... I will have a toy with it.

 

thanks,

Marcel.

Share this post


Link to post
Share on other sites

Well I trief to toy with the different settings now, but nothing helps/works. Actually now can only see one single image on the right, while I know that there's two more.

 

the settings I have are:

 

Show all morepics: true

Group parent: true

use small: true

restrict parent: true

table alignment: right

table location: above

number of columns: 5

number of rows: 2

 

I and have tried all the settings inbetween. I have found that the contrib 'on the fly' is used, bot from other posts here I understand that this is not causing a problem....

 

Any clues?

 

thanks in advance.

Share this post


Link to post
Share on other sites

It's possible that the code is not installed properly. Use your comparison program to compare your files to the ones included with More Pics. The fault is likely in catalog/product_info.php.

 

If the code is correct, then you just haven't got the settings correct. Try the ones I posted above. This may take some experimenting to get right.

 

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

I have changed all the settings again, but no result. The only way I can show more than one image is to set Table Location to 'below'. All other options result in just one image on the screen.

 

I have looked at the code (the original OSC, the MP code, and the way mine is now, but cannot find the solution to the problem. If anybody wants to have a look at these sources I'd be more than happy to send it by mail.

 

You can see what I mean at:

 

http://tinyurl.com/ybmgwl6

 

thanks and take care,

Marcel.

Share this post


Link to post
Share on other sites

Just a quick thing, I've installed More Pics numerous times before, but only just noticed an optional_related_products.php file. What can this be used for as it sounds interesting, but has no install instructions.

 

Thanks!

Share this post


Link to post
Share on other sites

That file allows integration with Optional Related Products Ver 4.0. Or so it claims; I haven't used it myself.

 

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

That file allows integration with Optional Related Products Ver 4.0. Or so it claims; I haven't used it myself.

 

Regards

Jim

 

Thanks for the speedy reply Jim. I will take a look at it soon.

Share this post


Link to post
Share on other sites

Hi, guys, I am using the contribution and there is one thing that I used to have with other contribution on other install (do not remember which one) which I really miss with more pics.

 

If first image is img1.jpg, then if I upload img1_1.jpg img1_2.jpg img1_3.jpg img1_4.jpg they all show up as images for the product, no need to manually add them via admin. I have large amounts of secondary images to upload and it is a pain to do it thorugh admin.

 

Is there a way to enable this for more pics?

Share this post


Link to post
Share on other sites

If you're using More Pics Classic, you can bulk upload using Easy Populate.

 

Otherwise it would take code changes to More Pics to do this. Feel free to code that if you want it.

 

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

Last post on the issue: i did a reinstall on a OSC (test) site, and the first contri I tried was MP. I Still could NOT get the pictures/images right (just one image or one top-right and two others bottom left). Using the original product_info.php from the MP-sources solved this problem. So apparently there is something wrong with the autoinstall...

 

Anyway: it works!:-)

Share this post


Link to post
Share on other sites

When listing an item and I click the manage images section it goes to another page that gives the option, new image or show all. I have never and will never use the show all part, so is there a way for it to go straight into the new images section so it's quicker for me to upload my images?

 

Thanks! :)

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

×