This is a discussion on Better Product Display with Admin within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; There was an error in the code in file "new_products.php". I made some changes and now it works perfect! FIND ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| I made some changes and now it works perfect! FIND AT THE BIGGINING ------------------------- if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $sql = "select distinct p.products_id, p.products_quantity, p.products_image, p.products_model, p.products_tax_class_id, p.products_weight, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating from " . TABLE_PRODUCTS . " p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id left join ".TABLE_MANUFACTURERS." mnf on p.manufacturers_id = mnf.manufacturers_id left join ".TABLE_REVIEWS." rvw on p.products_id = rvw.products_id where p.products_image !='' and p.products_status = '1' order by RAND() limit ".MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } else { $sql = "select distinct p.products_id, p.products_quantity, p.products_image, p.products_model, p.products_tax_class_id, p.products_weight, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating 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_MANUFACTURERS." mnf on p.manufacturers_id = mnf.manufacturers_id left join ".TABLE_REVIEWS." rvw on p.products_id = rvw.products_id where p.products_image !='' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } AND CHANGE WITH ============= if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $sql = "select distinct p.products_id, p.products_quantity, p.products_image, p.products_model, p.products_tax_class_id, p.products_weight, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating from " . TABLE_PRODUCTS . " p left join ".TABLE_SPECIALS." s on p.products_id = s.products_id left join ".TABLE_MANUFACTURERS." mnf on p.manufacturers_id = mnf.manufacturers_id left join ".TABLE_REVIEWS." rvw on p.products_id = rvw.products_id where p.products_image !='' and p.products_status = '1' order by RAND() limit ".MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } else { $sql = " select distinct p.products_id, p.products_quantity, p.products_image, p.products_model, p.products_tax_class_id, p.products_weight, if(s.status, s.specials_new_products_price, p.products_price) as products_price, mnf.manufacturers_name, rvw.reviews_rating from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join ".TABLE_MANUFACTURERS." mnf on p.manufacturers_id = mnf.manufacturers_id left join ".TABLE_REVIEWS." rvw on p.products_id = rvw.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_image !='' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query($sql); } THAT' S ALL!!!! More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Admin Page - Product Edit Image Display size? | xpman | osCMax v2 Customization/Mods | 9 | 06-04-2008 10:46 AM |
| Display Product link on Admin orders page | michael_s | New osCommerce Contributions | 0 | 01-29-2008 04:11 AM |
| Better Product Display with Admin | michael_s | New osCommerce Contributions | 0 | 02-06-2007 08:53 AM |
| display shipping total in Admin/orders | JohnW | osCMax v2 Customization/Mods | 1 | 06-26-2006 03:04 PM |
| Need Images to Display in Secure Admin | Walter | osCommerce 2.2 Modification Help | 0 | 11-09-2003 04:53 PM |