Skip to content

Commerce Foundations is our pre-built Craft Commerce store. See what it includes

Craft CMS plugins

Variant Manager

A Craft CMS plugin that imports and exports Craft Commerce product variants from CSV files.

Console commands

Commands exposed by Variant Manager. Run from your project root.

variant-manager/activities/clear#

Delete activity log entries.

./craft variant-manager/activities/clear

Deletes entries older than the activityLogRetention setting (default: 30 days).

./craft variant-manager/activities/clear 1

Wipes every activity log entry regardless of age. The 1 is a positional argument, not an option.

Cleared entries are gone permanently; there is no trash to restore from.

See activity log for the dashboard equivalent.

variant-manager/attributes/backfill#

Register an attribute and option for every name and value already stored on a variant.

./craft variant-manager/attributes/backfill

Reads every variant in batches. Anything already registered is skipped, so the command is safe to re-run. New attributes and options appear in the activity log.

Option Default Description
--batchSize 500 Variants read per batch.

The Utilities -> Variant Attributes utility runs the same work in the queue.

variant-manager/attributes/orphans#

List attributes and options whose name or value is no longer stored on any variant.

./craft variant-manager/attributes/orphans

Reads every variant, then compares against the registry. Prints one line per orphan and deletes nothing.

./craft variant-manager/attributes/orphans --prune

Deletes them. Anything a variant has started using since the scan is skipped. An attribute takes its display type and field layouts with it, unless allowAdminChanges is off, where the rows are deleted but their project config stays. This is permanent, and any custom field values on the deleted rows are lost.

Option Default Description
--prune false Delete the orphans instead of only listing them.
--batchSize 500 Variants read per batch.

See variant attributes.

We can take it from here.

We take on the Craft and Craft Commerce sites you built, so you can get back to building. Introduce a client who signs a management contract and you get a $3,000 partnership fee.

How the Dev Partnership Program works
See if we’re a fit