Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add other small produk images below the info page


rocdy

Recommended Posts

Hai, i want to add several other small produk images below the info page, because i want use it to recommendation for my costumer. Any idea about that??

 

Any help will be very very very appreciated. Thank. :blink:

Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

Link to comment
Share on other sites

Hai, i want to add several other small produk images below the info page, because i want use it to recommendation for my costumer. Any idea about that??

 

Any help will be very very very appreciated. Thank. :blink:

 

 

finally i can puts some small random images into below my product_info page.

 

I just add this code in catalog/product_info.php file.

 

 

After:

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

write this code :

 

<!-- BOF_Recommendations //-->

<tr><td>

<?php

 

$new_products_query = tep_db_query("select 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_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

?>

 

 

<?php

 

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);

 

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));

 

$info_box_contents = array();

 

$row = 0;

$col = 0;

$info_box_contents = array();

 

while ($new_products = tep_db_fetch_array($new_products_query))

{

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

$info_box_contents[$row][$col] = array('align' => 'center',

'params' => 'class="smallText" width="33%" valign="top"',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

 

$col ++;

if ($col > 2)

{

break;

}

}

 

new contentBox($info_box_contents);

?>

</td>

</tr>

<!-- EOF_Recommendations //-->

Rocdy

 

Beginner in php programming and still learning from this forums.

Special thanks for Oscommerce Community Forums that help me a lot. :-)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...