eric_jbdotcom Posted December 23, 2003 Share Posted December 23, 2003 Let's See What We Have Here 1064 - You have an error in your SQL syntax near '.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(' at line 1 select p.products_image, pd.products_name 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 = '21' order by pd.products_name limit 0, 20 [TEP STOP] This is the error I recieved when trying to look at my CATEGORIES! anyone have a clue? http://just-blaze.com/shop Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 heres the link to the contribution http://www.oscommerce.com/community/contributions,1210 its called product_description 1.2c Link to comment Share on other sites More sharing options...
geenygreat Posted December 23, 2003 Share Posted December 23, 2003 select p.products_image, pd.products_name 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 = '21' order by pd.products_name limit 0, 20 There is a comma missing between pd.products_name and p.products_id Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 i know that, where would i change it? this is the new .sql file i uploaded to the database # Insert configuration items into the configuration table.INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, date_added ) VALUES ( 'Display Product Description', 'PRODUCT_LIST_DESCRIPTION', 1, 'Include product description in the product listing. The product description will be included under the product name. So, the product name has to be printed in the product listing', 8, now() ); # Insert configuration items into the configuration table. INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, date_added ) VALUES ( 'Product Description', 'PRODUCT_LIST_DESCRIPTION_MAX_LENGTH', 200, 'Maximum number of caracters when displaying the product description in the product listing', 3, now() ); Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 and i still recieve that msg, how would i delete the old entries and add this one so i dont recieve this error anymore? Link to comment Share on other sites More sharing options...
geenygreat Posted December 23, 2003 Share Posted December 23, 2003 There si some syntax error in making sql statements in index.php. Can you post the code after this line in your file: // create column list Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 ok its fixed! thank you very much! Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 I now get this error Fatal error: Call to undefined function: tep_flatten_product_description() in /home/jbadmin/public_html/shop/includes/modules/product_listing.php on line 118 here is the code its talking about: if (PRODUCT_LIST_DESCRIPTION && $listing['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH) $lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc">' . tep_flatten_product_description($listing['products_description'], '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . TEXT_MORE . '</a>') . '</td></tr></table>'; Link to comment Share on other sites More sharing options...
geenygreat Posted December 23, 2003 Share Posted December 23, 2003 Add the following function in /catalog/includes/functions/general.php function tep_flatten_product_description($description, $link){ $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; } Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 Warning: wordwrap() expects parameter 2 to be long, string given in /home/jbadmin/public_html/shop/includes/functions/general.php on line 1270 now recieving this warning http://just-blaze.com/shop/index.php?cPath=23 Link to comment Share on other sites More sharing options...
geenygreat Posted December 23, 2003 Share Posted December 23, 2003 You may try increasing the "Maximum number of caracters when displaying the product description in the product listing" through: Admin -> Configurations -> Maximum Values Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 whoa. thats not in my admin Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 im so close yet so far. anyone? Link to comment Share on other sites More sharing options...
geenygreat Posted December 23, 2003 Share Posted December 23, 2003 hmm.... You said you have executed the sql statement in your database. Can you see 'Display Product Description' option in Admin -> configuration -> Product listing -> 'Display Product Description' Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 yes now i can Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 fixed Link to comment Share on other sites More sharing options...
eric_jbdotcom Posted December 23, 2003 Author Share Posted December 23, 2003 I just updated the code for the product installation and submitted it as a new CONTRIBUTION Heres the link if you would like to download it: http://www.oscommerce.com/community/contributions,1743 Credit goes to GeenyGreat and the original author(s). Eric Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2003 Share Posted December 23, 2003 Did this problem stem from a contribution? If so, it should be in the Contribution Support. Link to comment Share on other sites More sharing options...
manix Posted January 15, 2004 Share Posted January 15, 2004 Hi and thanks for the contrib :-) I have a little problem with installing it, h?be you can help me. I get the following error: Fatal error: Cannot redeclare tep_flatten_product_description() (previously declared in c:\programmer\apache\apache\htdocs\dvdjay\includes\functions\general.php:1255) in c:\programmer\apache\apache\htdocs\dvdjay\includes\modules\product_listing.php on line 18 what do I do wrong?? Please help me :-) Thanks again John Where is the anykey?? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.