Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I integrate this part of the contrib?


Jodoi

Recommended Posts

Hi,

 

I am trying to install the Attribute Copier V6 contribution. I am having problems integrating the following part of the contribution because I already have a contribution called More Pics installed there.. This is a screenshot from Beyond Compare:

 

 

The left hand pane shows the contribution product_info.php, the right pane shows my current product_info.php with the more pics contribution installed.

 

Every other part of this installation has been straightforward but I am really stuck here because I don't know a great deal of PHP.

 

Please Help all you experts!

 

Thanks,

Brent.

Link to comment
Share on other sites

Thanks for the quick reply matrix2223,

 

So, just to make sure I understood you right, I would have the following:

 

 

// 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 == '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 (tep_not_null($product_info['products_image'])) { $mopics_output .= '<table border="0" cellspacing="0" cellpadding="6" align="'.MOPICS_TABLE_ALIGNMENT.'">'."\n"; }

 

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

 

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

document.write(\'<a href="java script: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>' . TEXT_CLICK_TO_ENLARGE . '</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>' . TEXT_CLICK_TO_ENLARGE . '</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>'."\n"; } }

 

if (tep_not_null($product_info['products_image'])) { $mopics_output .= '</table>'."\n"; }

 

}

 

// EOF: More Pics 6

 

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

// BOF: WebMakers.com Added: Show Category and Image

if (SHOW_CATEGORIES=='1') {

?>

<tr><td colspan="2"><table align="right">

<tr>

<td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . tep_get_categories_image(tep_get_products_catagory_id($product_info_values['products_id']))); ?></td>

</tr>

<tr>

<td class="main" align="center"><?php echo tep_get_categories_name(tep_get_products_catagory_id($product_info_values['products_id'])); ?></td>

</tr>

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

<?php

}

// EOF: WebMakers.com Added: Show Category and Image

?>/

 

 

 

Thanks,

Brent.

Link to comment
Share on other sites

This is correct

 

just rememeber to take out / on the last ?> it will cause problems.

 

 

That worked great!

 

Thanks a lot for yor help matrix!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...