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.
- 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
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.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 14,321 sites currently report using this module. View usage statistics.
- Downloads: 56,098
- Automated tests: Enabled
- Last modified: December 2, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.