umc icon indicating copy to clipboard operation
umc copied to clipboard

Allow core entities in relations

Open simonrl opened this issue 5 years ago • 2 comments

Feature-idea:

Allow core entities in relations.

For example: I'd like to create a custom entity that has one-to-one relationship with a customer.

Ideally, this would also add a preference in the module.xml file.

I'd be happy to work on this, however, I think I don't understand where to begin. Do you have a documentation or some guideline on how to extend UMC?

simonrl avatar Aug 12 '20 20:08 simonrl

I just noticed that it did not have the feature to create entity to product relationships. This would be very useful.

carlos-reynosa avatar Aug 13 '20 00:08 carlos-reynosa

@simonrl @carlos-reynosa These are good ideas. The product relationship is definitely a must have. The customer relationship looks more like a nice to have. In my past experience, I had way fewer cases when I needed to link something to a customer compared to linking things to products or categories. But it's a good idea.

As for how the UMC works... I don't have a documentation but I can sum it up in a few words:

  • in order to add fields in the UI you can do it from the one of the files located in /Resources/config/form. In the CoreBundle if it's a general field that can be applied to all supported platforms or in the MagentoBundle if it applies only to magento. Each file in that folder corresponds to an entity (module, entity, attribute, relation, option)
  • the module files are generated based on twig templates located in Umc/MagentoBundle/Resources/views/source Each template will generate one module file. template files match the result file.
  • in order for a template to be picked up you need to declared it in src/Umc/MagentoBundle/Resources/config/source (again this folder contains multiple files based on their scope)

UltimateModuleCreator avatar Aug 13 '20 10:08 UltimateModuleCreator