Contributions

Credit Modules (Category Index)
Search: 

Better Product Display with Admin

UPDATED: FULL INSTALL FILES

This modification combines Better Product Display v 0.0.3 and Short Description In Products contributions.

It also adds admin support to enable and disable various bits of product info within the boxes. Also the display has been cleaned up a bit..

Go into new_products.php to edit the settings that cut the title and description lengths if you want, they're hard-coded...

I also cleaned up the queries a bit, still selects products randomly.

You do NOT need individual shipping for this version

NOTE: If needed, please change the configuration_group_id and configuration_id the to new and unique value before you run the SQL file.. So that it doesnt conflict with any data you currently have!

Screenshots are included of the admin and catalog pages

FULL PACKAGE

Expand All / Collapse All

Error correction in sql string yadis 25 Aug 2008

There was an error in the code in file "new_products.php".
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!!!!

Better Product Display with Admin scottman 6 Feb 2007

Note: Contributions are used at own risk.