I want to generate the name of product based by sku.

For example : when i enter 10014000 for the sku, the name of product will be Bovin phenelop 16/18 blanc 100. This information is coming from segmenting the sku and doing some request to some tables to recuperate this name, but i can't find any phtml file for adding product, so i used the event and observer.

But, the problem is, i still need to fill the product name input because it's required field, so how to make the product name to not required and is it safe to do that? Or instead, is there a best solution to use ajax? And when creating a product, if i enter sku, the name will be generated in same time before saving the product?

Please help me find a way to put some ajax and which file is a form to adding new product?

  • can you please rephrase? it's quite hard to understand what you want to do May 6, 2019 at 7:39
  • ok and thanks for your replay May 6, 2019 at 7:46
  • did you change the product name with observer before? May 6, 2019 at 7:50
  • yes but i should always put some name and not leave the name empty and it's not a sol May 6, 2019 at 7:52

1 Answer 1


This can be possible by backend

You can change require option value from the attributes. Go to Store->attributes->product search code "name" and set Values Required to NO

  • so there is no way to use ajax and is'it safe to change the name of product to not required May 6, 2019 at 8:01
  • 1
    Yes it is safe. May 6, 2019 at 9:02
  • thanks for your replay :) May 6, 2019 at 9:12
  • Yes , Thank you.. It's Working..
    – Bhavesh
    Jun 25, 2020 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.