Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Commerce AutoSKU

Security covered Under active development 2,542 sites

Part of the Commerce ecosystem · 487 projects

This module automatically generates SKUs for Drupal Commerce products. You can configure patterns using tokens to create SKUs based on product fields, such as title or custom fields.

Commerce AutoSKU allows administrators to generate SKU's for Drupal Commerce products automatically. Using tokens, the SKU can be generated based on the value of arbitrary product fields such as title, author, or any custom fields you have added. Additional sitewide tokens are available when the Token module is enabled.

Use Cases:

  • You don't use the SKU field for anything important, and would prefer not to be required to fill it in each time you create a product.
  • You want the SKU field to follow a rigid predefined structure. An example would be SKUs like "LARGE-RED-TEE" which would be generated from a pattern such as
    [commerce-product:field_size]-[commerce-product:field_color]-[commerce-product:title]

Configuration/Setup

Once the module is enabled, you can configure the SKU pattern used for each of your product types on the main product type edit form (admin/commerce/products/types/product, for the basic "product" type). It is reccomended that you use the Token module to help with token entry, but it is not strictly required.

If you decide to use the [product:product-id] token, you should be aware that this will cause any new products to be saved twice. This shouldn't be an issue for most people, but if you have rules in place for when a product is saved, you may not want to use this token.

This module was featured on Commerce Module Tuesday. Check out this screencast to see a demonstration on how to set it up.

Drupal 10–11

Ask your assistant about Commerce AutoSKU

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Oct 2023
Latest release
2 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.1 Stable 10–11 Jul 28, 2026
3.0.0 Stable 10–11 Jun 26, 2026
3.0.x-dev Dev 10–11 Jun 26, 2026
3.0.0-rc1 Pre-release 10–11 Jun 3, 2026
8.x-2.1 Stable 8–10 Oct 12, 2023