문제

I want to create an custom SKU pattern that is somthing like this:

{attribute set id}{auto number} 

and I want it to be at least 5 numbers long.

For example: 05004 where the 05 is for the attribute set and the 004 for the product. Is this possible with Magento (I don't think so)? Is there a good module for this kind of problem.

도움이 되었습니까?

해결책

I think, Module is not available for your requirements but you can do this by overwriting product save controller.

vendor/magento/module-catalog/Controller/Adminhtml/Product

Overwrite this controller and change SKU as per your requirement before save.

you can also do it via observer with this event catalog_product_save_commit_after

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top