Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help With Placement Of Code


gaspower

Recommended Posts

Hello,

Need some help with where to place the code I have for in stock / out stock. Normally I see it goes in product_info.php and that is fine and show when you viewing on particular product. But I would like to have it show in product listings under (Let See What We Have Here) listings. I would like it to show under each products name description.

 

Thanks JR

Link to comment
Share on other sites

Edit the includes/modules/product_listing.php file for that.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Hello,

Thank you for the response. I see it now,

 

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

}

break;

 

 

But, I am trying to add the following, but I keep breaking the page, what am I missing?

 

<?php

if ((STOCK_CHECK == 'true')&&($product_info['products_quantity'] < 1)) {

?>

<tr>

<td><span class="markProductOutOfStock"><b><?php echo TEXT_OUT_OF_STOCK; ?></b></span></td>

</tr>

<tr>

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

</tr>

<?php

} elseif ((STOCK_CHECK == 'true')&&($product_info['products_quantity'] > 0)) {

?>

<tr>

<td><span class="markProductOutOfStock"><b><?php echo TEXT_IN_STOCK; ?></b></span></td>

</tr>

<tr>

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

</tr>

<?php

}

?>

 

Thanks JR

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...