Zend certified PHP/Magento developer

Magento 2 Grouped product with additional relationship details

I’m developing a site that will sell automotive parts. We have some database with the parts (mapped to simple product) and its relationships with part groups (mapped to grouped product in Magento). Each part can be mapped to multiple part groups as it can be used for many engines but we also have some additional properties that are bound to this relationship that somehow we need to map.

  • Quantity per part-group (this is already handled in magento as default qty).
  • Number or code in the drawing/picture
  • Coordinates in the drawing/picture (to make a JS module that highlights it on hover)
  • Installer notes

So basically, all this information belongs to the grouped products, or even better to the grouped product – simple product relationship.

Ideas that I’ve thought:

  • Extend the relationship to include this extra parameters (I’ve got no idea how to start with it and if there any any consequences)
  • Add the extra attributes and bind the information in JSON or any custom format and include it on the template (it works but the first option seems cleaner).

Note: all articles, guides, tutorials show how to include additional parameters that the simple product has, but in this situation the simple product has different parameters depending on which grouped product it belongs to. So none of these solutions are valid, for example in GP-1 it can be in the image 10 and require 3 units and on the GP-2 it can be on the image 4 and require 3 units.

Thanks!