Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Prevent a main category from showing on "latest/specials" on main page ?

Prevent a main category from showing on "latest/specials" on main page ?

Locked

Started by nullmind on 18 Sep 2007, 7:51 PM · Views: 1,664

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
18 Sep 2007, 7:51 PM
#1
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Post #1 by nullmind

As the topic says, is there a way I can prevent one of my main categories (and it's subcategories) from showing on the specials and latest products in the main page ?

Carlos

21 Sep 2007, 8:15 PM
#2
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Post #2 by nullmind

my knowledge of PHP is poor, but do I assume correctly that is a metter of putting a call here to ignore certain categories ? (modules/specials_index.php)

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
  $specials_index_query = "select p.products_id, p.products_image, pd.products_name
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                           where p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' and s.status = 1 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
} else {
  $specials_index_query = "select distinct p.products_id, p.products_image, pd.products_name
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id ), " .
  TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
  TABLE_CATEGORIES . " c
                           where 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_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' and s.status = '1' and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";

}

or is it here to affect ALL "specials" enties, such as the box on the main page also

functions/specials.php