Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I need some help with this please


joemurray

Recommended Posts

What do I need to insert here to make the description show up in the product listing?

 

 $info_box_contents = array();
if ($listing_split->number_of_rows > 0) {
  $row = 0;
  $col = 0;
  $listing_query = tep_db_query($listing_split->sql_query);
  while ($listing = tep_db_fetch_array($listing_query)) {
	$listing['products_name'] = tep_get_products_name($listing['products_id']);

	if (PRODUCT_LIST_IMAGE > 0) {
	  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
	}

	if (PRODUCT_LIST_NAME > 0) {
	  $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
	}

	if (PRODUCT_LIST_MODEL > 0) {
	  $lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
	}

	if (PRODUCT_LIST_MANUFACTURER > 0) {
	  $lc_text .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
	}

	if (PRODUCT_LIST_PRICE > 0) {
	  if (tep_not_null($listing['specials_new_products_price'])) {
		$lc_text .= '<s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
	  } else {
		$lc_text .= ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
	  }
	if (PRODUCT_LIST_BUY_NOW) {
	  $lc_text .= '<br><br><br><br><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . '</a>';   	  
	}

	$info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"',
											'text' => $lc_text);

	$col ++;
	if ($col > PRODUCT_LIST_COL_NUM-1) {
	  $col = 0;
	  $row ++;
	}
  }

 

This is from product_listing.php. I'm trying to do a column display that includes the description. Thank you.

Link to comment
Share on other sites

There is a contribution called "Short Descriptions" that mighthelp you without messing with your code.

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

Thanks for the tip but I have already installed a contribution for product listings and I don't want a new one conflicting with it. I just want to have it insert the full description on the product list. It has to be amazingly simple but I'm just not sure what to put in there because I'm pretty new to PHP. Anyone?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...