The product-categories component (Vvveb\Component\Product\Categories) lists categories-type taxonomy items for the product post type (shop category trees, filters, sidebars).
Activate the component by adding:
data-v-component-product-categories
Component Options
Add options as HTML attributes using the data-v-* syntax.
| Option | Attribute | Description | Default |
|---|---|---|---|
| start | data-v-start |
Starting offset | 0 |
| limit | data-v-limit |
Number of categories | 7 |
| site_id | data-v-site_id |
Site ID | Current site |
| language_id | data-v-language_id |
Language ID | Current language |
| order | data-v-order |
Sorting rules, overridable from URL | url fallback price asc |
| taxonomy_id | data-v-taxonomy_id |
Filter by taxonomy ID | null |
| product_id | data-v-product_id |
Show only categories assigned to a product | null |
| parent_id | data-v-parent_id |
Filter by parent (0 = top-level) |
null |
| search | data-v-search |
Filter by text | null |
| type | data-v-type |
Taxonomy type | categories |
| post_type | data-v-post_type |
Post type | product |
| parents_only | data-v-parents_only |
Only parent categories | false |
| parents_children_only | data-v-parents_children_only |
Only parents that have children | false |
| parents_without_children | data-v-parents_without_children |
Only parents without children | false |
Component Properties
Same shape as the categories component: data-v-cats container with data-v-cat repeatables (name, slug, url, image, count, children).
HTML Example
<div data-v-component-product-categories data-v-parent_id="0">
<div data-v-cats>
<div data-v-cat>
<a href="" data-v-cat-url><span data-v-cat-name></span></a>
</div>
</div>
</div>