Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

:'( HELP! Cany display Products description.


mass696

Recommended Posts

:'(

hi all...

im trying for several hours to figure this problem...

i have this code that supposed to show a part of the description...

this is the code:

while ($new_products = tep_db_fetch_array($new_products_query)) {
  $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
  $product_query = tep_db_query("select products_description  from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)1 . "'");
  $product = tep_db_fetch_array($product_query);
  $new_products['products_description'] = $product['products_description'];
  echo '



<table cellspacing=0 cellpadding=0 width=200 align=center>
			<tr><td width=90 align=center valign=top><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, 'vspace=0') . '</a></td>
			<td valign=top>
			  <table cellspacing=0 cellpadding=0>
			   <tr><td><a height=35 valign=middle class=ch9 href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></td></tr>

			   <tr><td class=ch10 height=35 valign=middle>'.preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 25)).' ...</td></tr>
			   <tr><td height=0></td></tr>
			  </table>

 

now...for some reason i cant see the description...i see only this 3 dots ... <-( see in the buttom of code)

 

can anyone help me?

i tried to put echo but it's says unexpected T_echo...dont know what is it...

plz plz plz...help me :'(

how can i fix this code?

Link to comment
Share on other sites

delete the three dots

 

hey m8

i didnt ask to remove the 3 dots.. :S

i ask to know how to display the description script...

i guess you didnt understand it...

the 3 dots are showing that there is more description in the Product_info.php

 

so please...f anyone know how to fix this code..thanks.

:'(

Link to comment
Share on other sites

Does the code work without the dots?

 

Rob

Rob Bell - Inspired Graphix

Customising osCommerce in Australia, and the world!

View my profile for web and email links.

 

I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture.

However viewing my profile may provide links to my website or something like that which you may find useful.

Link to comment
Share on other sites

  • 2 years later...
Judging by the site you found a solution :)

 

Would you mind sharing with us how you did it, or anyone else for that matter as unfortunately I seem to have the same problem.

 

Thanks

 

Just in case anyone finds this a latter date I have solved the problem......

 

MAX_DESCR_1 needs to be defined in /includes/modules/application_top.php

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...