Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Activate or inactivate category of catalog

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
Bug fixed for compatiblity with MySQL 4. If you are using a version of MySQL prior to version 5 you need this correction since in SQL queries version 4 processes NOT before IN rather than IN before NOT as in version 5 under which this contribution was tested. The solution is simply to put parenthesis around the IN operators wherever used in a query to make sure they are processed first regardless of the version of MySQL.

Complete corrected instructions attached. If you've already installed version 1.3 the only changes are that the SQL queries are changed from

and (not p2c.categories_id in (" . implode(',', $hiddencats) . "))

to

and (not (p2c.categories_id in (" . implode(',', $hiddencats) . ")))

in eleven files (one place each in ten files and twice in index.php).
I missed a function in catalog/includes/general.php that needs to be updated to correctly count products in a category and only its active sub-categories. Complete instructions are attached but only one has been added:


Find around line 383 in the function tep_count_products_in_category the line that sets $child_categories_query and add the "and status_categ = 1" to it so the line will now read:

$child_categories_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$category_id . "' and status_categ = 1");
The basic contribution as orginally written worked fine to hide categories and their sub-categories in the catalog but it seemed to me like the idea would be hide the products contained in those categories as well. At this the original contribution failed miserably because there are many ways to list a product in osCommerce besides the category listing. Listing by manufacturer or by newest products or performing a search could find products in hidden categories and info boxes like specials, whats_new and reviews can also randomly display such products.

The updated instructions attached use a new configuration variable to determine whether or not products that exist only in hidden categories may be viewed or not. I've also updated the admin side to allow turning the category on or off while creating or editing a category as well as by clicking on the status buttons. The admin category information box will also show whether or not the category will be displayed in the catalog since a category might be set to display but won't because the parent category is hidden.

Instructions for updating a couple of contributions to work properly with this contribution are included at the bottom of the file.
If you are using "Main categories as thubnails on index"
http://addons.oscommerce.com/info/5119

There is a change to do,If you don't and disable a whole categorie "Main categories as thubnails on index" will still show the thumbnail of disabled categorie on your

main page.

To fix it go to catalog/includes/modules/main_cats.php

FIND:

$result = tep_db_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.parent_id = '0' AND c.categories_id =

cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' ORDER BY sort_order ");

REMPLACE WITH

$result = tep_db_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.parent_id = '0' AND c.status_categ = '1' AND

c.categories_id = cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' ORDER BY sort_order ");

You are done, if you disable a whole categorie thubnail will also dispear from main page.
This contributions allows you to display or hide any category or subcategory.

The install is very easy and take a 1 or 2 min.
   Posted on: 01/02/2009     See contribution details Request Installation with Paid service