vwebworld Posted July 23, 2006 Posted July 23, 2006 I think this code (in index.php) enables the catagory items appear: $current_category_id = 59; $listing_sql = "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 = '".$current_category_id."' order by p.products_date_added DESC limit 3"; $new_products_query = tep_db_query($listing_sql); How do I change it to show subcatagory itmes? I tried changing $current_category_id = 59; to = 59_70 (a sub-catagory) but that produces an error. Thanks, Roland
♥Monika in Germany Posted July 23, 2006 Posted July 23, 2006 please do not tell me you have hardcoded category links ... anyway, only the last value of a cPath is the "current_category_id" that is needed for the query ... :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
vwebworld Posted July 23, 2006 Author Posted July 23, 2006 please do not tell me you have hardcoded category links ... anyway, only the last value of a cPath is the "current_category_id" that is needed for the query ... Thanks. The catagory # is specified so that the itmes from certain specific catagories appear on the home page. ~Roland
jasonabc Posted July 23, 2006 Posted July 23, 2006 Use Featured Products to do this instead Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Recommended Posts
Archived
This topic is now archived and is closed to further replies.