Nested MIGXdb setting correct relation when adding items

I am stuck at a simple task. Maybe someone can give me a hint :pray:

Parent MIGXdb config: products
Nested MIGXdb config: product_images

When I add images inside the nested grid I want to automatically set the product_id field to the id of the parent product. How can I accomplish this? Right now product_id is always 0, so the relation is not set. Do I need to use a Hook Snippet (Example:{“aftersave”:“myaftersave_snippet”})?

Thanks in advance!

In the config for the nested grid, in the tab “MIGXdb-Settings”, make sure that “Check Resource” is set to “yes”. Set “Join Alias” to the alias value of the relationship (from the “product_images” class to the “products” class). And set “Has Extra Connection table” to “no”.


There is an example of a nested grid in this Youtube video.

1 Like

Highly appreciate it! Thanks!!