- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017
07:06 AM
10-17-2017
07:06 AM
Auto-SKU
Looking for a Magento 2 extension that enables the SKU field to auto populate with a unique value. For example first product starting with an SKU of 100001 and each time a new product is created it moves on one (100002, 100003, 100004).
Labels:
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017
03:07 PM
10-17-2017
03:07 PM
Re: Auto-SKU
Hi @jasonatextra,
That functionality isn't part of Magento and I guess there isn't a module for that yet.
Probably you could use an observer or maybe a plugin to handle the save process and then change the SKU.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2017
02:54 AM
10-23-2017
02:54 AM
Re: Auto-SKU
I managed to get it working for existing products by using the before product save observer. This doesn't work for new products as it tries to change the sku value for a product that hasn't been created yet.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2017
02:54 PM
10-23-2017
02:54 PM
Re: Auto-SKU
Maybe you can try with the after_save event?