Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products description in product listing


Guest

Recommended Posts

Posted

I would like to include the first characters of the products description in the product listing, just under the products name, but can't really figure out how to do it..

 

I have found this code-string in new_products.php (not original version) that should do the trick:

 

<tr><td>'.preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 80)).'</td></tr>

 

But I am having problems figuring out how to implement it to the product listing, I assume it should be anywere around here:

 

// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
					 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
										   'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
					 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
					 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);
asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
  if ($value > 0) $column_list[] = $key;
}

 

in index.php - or am I totally wrong?

 

Anyone who's able to help me through?

 

Thank you

Posted

Dear Bill,

 

Thank you - the contribution helped me out

Archived

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

×
×
  • Create New...