If you're using the featured products list box on the home page, you can limit it to 1 category by adding this:
AND p.master_categories_id = 89
to
tpl_modules_products_featured_list_box.php
Change 89 to your master category number.
Find this
Code:
$featured_products_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id
FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " .
TABLE_PRODUCTS_DESCRIPTION . " pd
LEFT JOIN " . TABLE_FEATURED . " f on pd.products_id = f.products_id )
WHERE p.products_status = 1 and p.products_id = f.products_id and f.status = 1
AND p.products_id = pd.products_id and pd.language_id = :languagesID
ORDER by f.featured_date_available";
Change to this:
Code:
$featured_products_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id
FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " .
TABLE_PRODUCTS_DESCRIPTION . " pd
LEFT JOIN " . TABLE_FEATURED . " f on pd.products_id = f.products_id )
WHERE p.products_status = 1 and p.products_id = f.products_id and f.status = 1
AND p.master_categories_id = 89
AND p.products_id = pd.products_id and pd.language_id = :languagesID
ORDER by f.featured_date_available";
Keep in mind, this will NOT change the featured_products page but WILL change anywhere in the site that uses the featured box.
Another way would be, Since the default is to order them by fettered date, to limit the amount of items that the featured list box shows in the admin, and then set the available dates accordingly to sort them a specific way.
Lets say you have 5 items in that category you want to show, then set the limit to 5 and use the available dates to sort the 5 top the top.
Bookmarks