This is a Virtuemart 2 plugin that can automatically add your products to the parent categories of their own categories, or remove them from all but the lowest categories in the category hierachy. For child products, it can also assign them to the parent product's categories, or remove all categories.
Virtuemart 2 displays products only in the exact categories they are assigned to. In many cases, however, you want your customers to see also all products in the child categories of the current category. This plugin, which can be configured to run automatically in the Backend, can be configured to add each product also to all parent categories, so it will appear also in the parent category listing. The reverse is also possible: Automatically remove each product from all parent categories and display it only in the very last category (leaf category). For child products, the plugins additionally allows the shop owner to automatically remove all categories or explicitly copy all categories from the parent product. This allows you to globally modify all child products to either not appear at all in the VirtueMart categories view in the frontend (because e.g. you display the child products on the parent product's page) or to show all child products automatically in the same categories as the parent products.
Whenever the plugin is triggered in the Joomla/VirtueMart administration area (see the configuration setting below), it simply loads all products and all child products, checks their categories and automatically modifies the categories according to you settings. Potential triggers for running the plugin are when you view the VirtueMart configuration page or the VirtueMart products list in the administration area. All changes by the plugin are then done automatically and in the background, only a short message is printed, informing you about how many products were modified.
This plugin only modifies the categories assigned to products, no other settings.
After installation, you need to enable and configure the plugin. By default, the plugin does not modify any categories automatically! You have to manually configure the plugin in the Joomla plugin manager (NOT inside VirtueMart!) first:
WARNING: Before enabling the plugin, please make sure you have a backup of your data, as the plugin WILL modify your assigned categories. I recommend Akeeba Backup to backup the whole joomla site, so you can easily restore all your data if you don't like the results of the plugin.
This plugin is licenced unter the GNU GPLv3. It is also free to download, and you automatically obtain all the rights and duties that the GPL gives you, without any payment. If you find the plugin useful, it would still be nice if you could donate a certain amount.
No, currently, I have only implemented two very simple triggers. I don't know any way to run it e.g. when an administrator logs in, or only when a product is actually changed.
No, the plugin will currently check all products. You can only distinguish top-level products and child products.
I'm open for suggestions, and if time allows, I will implement good new features. Notice, however, that my time is very scarce. Here is a list of things that are already on my list:
2013-02-27: Version 1.2 (Support for Joomla 1.5, straighten out language files)
2013-02-24: Version 1.1 (Bugfix for more than 15 categories)
2012-12-18: Version 1.0 (First working version)