Adds a button to the WC edit/new product page that enables generating a SKU (catalog number) in a pre-defined format and length. It is aimed for Woocommerce shop admins who manage a shop with no pre-defined catalog numbers for products.
When adding or editing a product it is common that you do not have a pre-set catalog number for the product.
This plugin enables you to generate a SKU (catalog number) for the product, with specified format and length.
It also checks that the suggested SKU does not exist in the database for any other product.
At the same time you can use it to check a SKU number you enter.
Starting on V 1.0.1 you can choose to add automatic SKU for every new product or existing product without a SKU (no need to click a button or select).
You also can select not to generate a random SKU, but write it yourself, and the plugin will check asynchronously if the SKU already exist in the database.
Tested up to Woocommerce Version 6.0.0
Important! version 1.0.2 and up works with Woocommerce 2.6.0 and up. If you have earlier version of WC please use this plugin version 1.0.1
- None intrusive. The plugin adds the SKU to the SKU field in the product edit page but it saved only by you.
- Option to add auto prefix to the generated SKU.
- Option to auto fill SKU for new product.
- 3 flexible SKU formats – between min-max numbers, string (you can select any alpha numeric combination), Incremental (auto increment next SKU)
Installing “ATR structured SKU generator for Woocommerce” can be done either by searching for “ATR structured SKU generator for Woocommerce” via the “Plugins > Add New” screen in your WordPress dashboard,
or by using the following steps:
- Upload the plugin files to the ‘/wp-content/plugins/atr-random-SKU-for-woocommerce’ directory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress
Important! You must go to plugin settings page and select the options apply to your shop.
- Use the Settings->ATR rand sku Woo screen to configure the plugin
- Select the format you require for the SKU: “Use max min” or “Use string” or “Use Incremental”
“Use max min” – you want the SKU to contain only numbers between the specified numbers.
“Use string” – you want the SKU to contain only characters you specified.
“Use Incremental” – You want to increment the SKU by 1 for next product edited/created.
- Set the relevant options for your selection.
- If you want the plugin to auto fill new products SKU for you select the option “Check this to fill auto SKU when field is empty (also for new products)”
- You can set a prefix that will be added to every newly generated SKU.
The plugin options allows you to select between numeric, alpha numeric or incremented SKU.
The random SKU format will be generated according to these selections.
Numeric string – “Use max min”
If you select a numeric string, you should set a minimum and maximum numbers.
Setting the min/max numbers will force the random SKU generated to hold only numbers between those numbers.
That way you can also define how many digits will be in the SKU.
For example, if you select min: 10000 and max: 99999 you’ll get SKU’s with 5 digits long between these two numbers.
Characters strings – “Use string”
If you select a characters string, you’ll have to define
1. The characters to be used in the string
2. The length of the string
For example, if you select “abcdefghijklmnopqrstuvwxyz123456789” for the characters and “8” for the length, the SKU string will be 8 characters long and with all the letters and numbers except 0 (zero) and capital letters.
- Start increment from number – Define the start number. Default is 1.
- The index always incremented up as long as the “Incremental” option is selected.
- If you want to skip forward or backward some numbers you can change the “Start at” option to the number you want.
Contributors & Developers
“SKU generator for Woocommerce by ATR” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Fixed install problem
- Tested for WP 5.5
- Tested for Woocommerce 4.3.2
- Added prefix option
- Added incremental SKU
- Moved the button to the inventory tab (after change in WooCommerce)
- SKU_length variable is set to have no default
- Added condition where “Use string” is selected but no string length
- Added settings option to auto fill SKU for new products or products with no SKU
- Changed name of var $random_number to $random_SKU
- Set calls to ajax function as separate functions and calls
- Initial release