Product categories

The standard way to use categories is for the logical grouping of similar products within your online store.

Shoppers can browse your shops product range by the categories you have created.

Because products may belong to one or more logical groups (categories), VirtueMart products can belong to multiple categories.

Categories are often structured (hierarchically) to help guide your customers to the appropriate areas of interest:-

Category Level 1Category Level 2Category Level 3 etc…
Male Clothes Trousers
  Shoes Trainers
Winter Clothing Winter Hats Winter Shoes

In the example above, if you want an item to show when browsing the Clothes category AND the Shorts category it should be assigned to BOTH categories at a product level.

The rationale for this approach is to help reduce the page response timings by only searching the specified category and not all subordinate categories. Additionally, the display of all products lower in the hierarchy is often undesirable as it can negatively impact the shoppers browsing experience.

To help assign products to categories, there is a bulk associate categories feature:-Note it does not add, or subtract products for the selected categories, it just sets the selected categories.

When a category is unpublished products assigned to the category are not automatically unpublished. This is a product feature that prevents a product that is associated to multiple categories from accidentally being unpublished.

If you want to unpublish products, you can do this using the Product List in the Admin section, it is then easy to select a category to list the products, use the "select all" checkbox to mark the products required and click the toolbar "unpublish" icon. It helps to use the sorting for published products.

Canonical category setting in product

You do not need to set this if the item is in only one category and you are not using the full category tree for product links (VM-SEO configuration).

If this applies to your products you can force a canonical category for the product. The product must be in the selected category and the category must be published.  If nothing is set, the product link canonical category will automatically be the first category in the assigned categories list sorted by lowest category_id first (Which may not be the one you want or expect).

Control categories (Dummy categories)

It is possible to control different automatic behaviours of VirtueMart using Dummy categories.

When using Dummy categories for control they should be set as Unpublished

These categories will not be visible to shoppers and are completely ignored for URL/SEO purposes.

Product can be assigned to these Dummy categories to control such things as:-

  • Taxes
  • Promotional Discounts
  • Shipment method eligibility (using the standard shipment plugin provided with VirtueMart.)
  • Payment method elgibility (using the standard payment plugin provided with VirtueMart.)

Dummy category example

You want some of your products to have a promotional discount of 10% and these products are in different categories

  1. Create a Dummy discount category, you can call it "10% Discount sale"
  2. Create a new Tax and calculation rule of Type "Price modifier before tax", Math Operation -10%.
    In the "Product Category" option, select the new Dummy category "10% Discount sale"
  3. Add this Dummy category to the Products and a 10% discount will be applied.(Make sure they stay in their existing Categories as well or they will not be visible to any shoppers!)
  4. To stop the discount for a product, just edit the product and remove the Dummy category from it

You can have lots of discounts and Dummy categories setup at the same time, allowing you to proactively manage your business.

Simple product category list

categories category list screen