Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

product description on category page


Recommended Posts

looking for a way to get my product description onto my index.php page as part of the product listing. i dont wanna remove it from the product_info.php .


right now i have my product listings as image / item name / add to cart / price / quantity


i'd like to get the description to go underneath product name.. .


any help would be greatly appreciated..

Link to comment
Share on other sites

There is a contribution for this - search contributions, I think its called "Description in Product Listing" :D


It displays a truncated products description (you can set the length)





Link to comment
Share on other sites

alright.. i went and downloaded... 14 Jun 2003 - Description_in_Product_Listing_v41.zip


uploaded the files.. 5 of them.


ran the sql additions..


INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Display Product Description', 'PRODUCT_LIST_DESCRIPTION', '99', 'Set to 0 to disable, set to 99 to enable.', '8', '11', '', '', NULL, NULL);


INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Length of Truncated Product Description', 'PRODUCT_LIST_DESCRIPTION_LENGTH', '350', 'How many characters would you like to display? ', '8', '12', '2002-03-16 18:51:26', '2002-03-16 18:51:26', NULL, NULL);


now when i go to my site and try going through catagories.. this is the error message i get..


Warning: Division by zero in /home/murderth/public_html/distro/includes/classes/split_page_results.php on line 59

Displaying 0 to 0 (of 70 products) Result Pages:  -9  -8  -7  -6  -5  -4  -3  -2  -1  0 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' p.products_id, p.manufacturers_id, p.products_price, p.produc


select pd.products_name, p.products_image, p.products_quantity, pd.products_description, , p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '24' order by pd.products_name




I went on my webhost and checked their server info on what i am using..


PHP version 4.3.9

MySQL version 4.0.22-standard


right now i reuploaded my original files, but the sql is stil in my database, i can remove this easily..


anyone able to help??

Link to comment
Share on other sites

That version is a bit dated if it was me I would use the newer version from this year.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

here we go, round 2



11 Dec 2004 - Product_Description_1.3 osc2ms2.2


all files manually edited per install.txt *i hate doing this, fear of extra spaces and junk, will it mess me up?* sql file ran and accepted by database..


Fatal error: Cannot redeclare tep_flatten_product_description() (previously declared in /home/*******/public_html/distro/includes/functions/general.php:1254) in /home/********/public_html/distro/includes/modules/product_listing.php on line 17
Link to comment
Share on other sites

You have two instances of the same function 'tep_flatten_product_description', one in general.php and the other in product_listing.php - remove one of them :D



Link to comment
Share on other sites

You have two instances of the same function 'tep_flatten_product_description', one in general.php and the other in product_listing.php - remove one of them  :D




matti - i went and did what ya said by keeping one of the functions out.. i wasnt sure what part to keep out....


either the function tep_flatten_product_description($description, $link)


by itself, or along with


 $description = ereg_replace('<[^>]*>', '', $description);
 if (strlen($description) > PRODUCT_LIST_DESCRIPTION_MAX_LENGTH){
   $sub_description = wordwrap($description, PRODUCT_LIST_DESCRIPTION_MAX_LENGTH,'$@$');
       $sub_des = explode('$@$',$sub_description);
       $description = $sub_des[0];
       $description .= "...".$link;
 return $description;


i did it just as the second half first. it was given a fatal error. so i added the first line *giving me two full functions*, and refreshed my browser and it works.. so tomorrow morning *10hrs from now*, i'll check all the code and see what it fits in comparrison to the install.txt..


much thanks.. site looks great now.. very pleased..

Link to comment
Share on other sites


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

  • Create New...