News:

Support the VirtueMart project and become a member

Main Menu

Category custom plugins

Started by Stephen Roberts, November 25, 2011, 18:20:47 PM

Previous topic - Next topic

Stephen Roberts

In release M I noticed some code that might indicate having custom plugins for categories just like products. Is this something on the radar of the development team? I'm building a vmextendedplugin right now that would be much better suited as a vmcustom plugin for categories.
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com

PRO

stephen,

what are you trying to make a plugin for? what does it do?


Stephen Roberts

The plugin allows products to be categorized automatically by rules, and it takes advantage of a custom metadata system I built via a vmextendedplugin. For example, let's say we have a category called "Music CDs". Instead of manually categorizing 1000 CDs into this category, I could define some rules for the category:

1. Get all products that are classified as "Music"
2. Get all products that are classified as "CDs"

Now all products that meet both rules will be automatically added to this category. As new products are added to the store, they are automatically categorized by the rules as well. That's the goal at least. I'm pretty close to finishing my vmextendedplugin for it. Suggestions?
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com

PRO


Stephen Roberts

The metadata isn't the question here. You'd have to see what I've got to understand why it's necessary to have a custom metadata system. I use some custom fields as well for things like the UPC, Duration, Artist, etc.

Products types can't be used to automatically categorize products, correct?
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com

PRO

product types can be linked to via a url


Stephen Roberts

So I'm guessing that means that there isn't anything built-in that auto categorize products according to rules right?

I've written a very similar custom product plugin that acts as "Related Items" but uses rules to define these related items. For example, I could pull all products with the same price as the current product, or all products with the same name, products in the same category, etc. etc. and it's done automatically per product.

I've attached a screenshot as an example. This shows what I call "Expert Mode" where you see the actual database tables and fields instead of a more user-friendly "Standard Mode" which would have limited options. These particular rules will pull all products that contain the name of the current product and have the same price.

[attachment cleanup by admin]
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com