This is a discussion on Featured Products within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; if you get this error 1054 - Unknown column 'p.products_id' in 'on clause' do this in /includes/modules/featured.php find this $featured_products_query ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| 1054 - Unknown column 'p.products_id' in 'on clause' do this in /includes/modules/featured.php find this $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); and change into... $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from ((" . TABLE_PRODUCTS . " p) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c )left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Featured Products | michael_s | New osCommerce Contributions | 0 | 08-22-2008 05:13 PM |
| Featured Products | michael_s | New osCommerce Contributions | 1 | 03-29-2008 11:44 AM |
| Featured Products | michael_s | New osCommerce Contributions | 0 | 03-05-2008 08:22 PM |
| Featured Products HELP Please. | lil-raskals | osCommerce 2.2 Modification Help | 0 | 10-07-2004 06:51 AM |
| Featured Products | Stu | osCMax v1.7 Discussion | 3 | 09-13-2004 07:42 PM |