TomCavendish Posted August 18, 2006 Share Posted August 18, 2006 Using the short description contribution here: http://www.oscommerce.com/community/contributions,4452 When a product has no description, the word "Array" is displayed as the short description rather than nothing. Anyone able to solve it? Quote Link to comment Share on other sites More sharing options...
Manolo Posted August 19, 2006 Share Posted August 19, 2006 well, 2 hours ago I had the same problem, couldn't find a solution and just replaced it with this contribution: http://www.oscommerce.com/community/contributions,1743 A few lines more to add, but works great. N8 Quote Link to comment Share on other sites More sharing options...
nicko107 Posted August 22, 2006 Share Posted August 22, 2006 (edited) Using the short description contribution here: http://www.oscommerce.com/community/contributions,4452 When a product has no description, the word "Array" is displayed as the short description rather than nothing. Anyone able to solve it? Hello The only solution I can find is this: for example for new_products: catalog/includes/modules/new_products.php FIND this (the code of contribution of query): $sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id; $description_query = tep_db_query($sql); $description = mysql_fetch_array($description_query, MYSQL_ASSOC); $description['products_description'] = substr($description['products_description'], 0, 100); $desc_len = strlen($description['products_description']); $description['products_description'][$desc_len-1] = '.'; $description['products_description'][$desc_len-2] = '.'; $description['products_description'][$desc_len-3] = '.'; ADD AFTER, this: $description['products_description'] = ereg_replace("(Array)", "", $description['products_description']); (this replace "Array" by "": no appear description, but then need change "read more" by "more info" or similar) edit file: catalog/includes/languages/english.php define('DESCR_READ_MORE', '<FONT color=blue>read more</FONT>'); // ... read more. REPLACE by: define('DESCR_READ_MORE', '<FONT color=blue>more info +</FONT>'); // ... read more. and for other lenguage: espanol: leer más. Replace by: más info Then in all modificated files that add short description ADD AFTER query: $description['products_description'] = ereg_replace("(Array)", "", $description['products_description']); This "delete" the Array word for products without description but I think other can do better to resolve it Edited August 22, 2006 by nicko107 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.