#Extending a product

1 messages · Page 1 of 1 (latest)

charred horizon
#

I want to create a new product type which needs many new fields some, example: an object is grouped like {code, description, value}
I've read this page - https://docs.medusajs.com/development/entities/extend-entity
According to it, one would have to make 3 new columns while extending Product
After this, one would have to extend the validator so api's to it don't fail, create a migration to add them to db, extend the admin UI to show those fields, extend the repository to be able to get/post the custom product
Right?

Learn how to extend a core entity in Medusa to add custom attributes.

mossy pebble
#

You can use metadata field if you want to store data too, but if it's not the right case for you, yes :

  • Extend entity/model
  • Create migration
  • Extend repo
  • Extend service
  • Extend validators with loaders