=== ATR random sku for Woocommerce === Contributors: yehudaT Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T6VTA75GTS3YA Tags: woocommerce, sku Requires at least: 4.0 Tested up to: 4.6-RC1-38177 Stable tag: 1.0.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Adds a button to the WC product edit page that enables generating random SKU (catalog number) in a pre-defined format and length. It is aimed to Woocommerce shop admins who manage a shop with no pre-defined catalog number for the products. == Description == Important! version 1.0.2 works with Woocommerce 2.6.0 and up. If you have earlier version of WC please use this plugin version 1.0.1 When adding or editing a product it is common that you do not have a pre-set catalog number for the product. The ATR random sku button enables you to generate a random SKU (catalog number) to the product, with specified format and length. It also checks that the suggested SKU does not exist in the product list at your Woocommerce shop. 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. == Installation == Installing "ATR random sku for Woocommerce" can be done either by searching for "ATR random sku for Woocommerce" via the "Plugins > Add New" screen in your WordPress dashboard, or by using the following steps: 1. 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. 2. 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. = Settings = 1. Use the Settings->ATR All Menu Settings screen to configure the plugin 2. Select the format you require for the sku: "Use max min" or "Use string" "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. 3. Set the relevant options for your selection. 4. 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)" The plugin options allows you to select between numeric and alpha numeric strings. 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. == Screenshots == 1. The edit product screen with the Auto SKU button 2. Setting for the Auto SKU format 3. The Auto SKU button and options explained == Changelog == = 1.0.2 = * 2016-8-3 * 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 = 1.0.1 = * 2016-1-23 * 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 = 1.0 = * 2015-12-28 * Initial release == Upgrade Notice == = 1.0 = * 2015-12-28 * Initial release