Hi there,
I'm not sure if this is the right place to ask this question, but if not sorry! Please let me explain what I want to do:
I've got products with subproducts that I want to show on my website (mark; showing, not selling!). For example I've got an product that has multiple options, like different diameters, weights, lengths and so on.
So I have got: Product A
Variations available:
Weight: 1kg, Length 100cm, Diameter 5cm
Weight: 2kg, Length 100cm, Diameter 5cm
Weight: 3kg, Length 100cm, Diameter 5cm
At the same time I've got Product B
Variations available
Weight: 1kg, Color: blue, Width: 15cm
Weight: 1kg, Color: red, Width: 15cm
Weight: 1kg, Color: yellow, Width: 15cm
My products have got an template called: 'Product' but I want to create dynamic columns in MIGX and reload them into an new MIGX field that enable me to fill in the specified information. So for "product A" I want to create the columns: "Weight, Length, Diameter" and for "Product B" I want to create the columns: "Weight, Color, Width". For each option I'll create an new document that needs to load the columns from the parent product. My tree looks like:
- Products
- Product A
- Subproduct 1
- Subproduct 2
- Subproduct 3
Product B
- Subproduct 1
- Subproduct 2
- Subproduct 3
For now I've created an MIGX configuration that ables me to create the column names:
[{"caption":"Info", "fields": [{"field":"column_name","caption":"Columnname"}] }]
But I'm not as strong with MIGX to have the solution to read the columns from the parent 'product'. Can anyone please help me out here? Please let me know if something isn't clear.
does this setup help a bit?
this is the configuration for the columnscreator:
https://github.com/Bruno17/migxCustomColumns/blob/master/core/components/migxcustomcolumns/migxconfigs/migxcustomcolumns.config.js
this is the configuration for the MIGX-grid with the created columns:
https://github.com/Bruno17/migxCustomColumns/blob/master/core/components/migxcustomcolumns/migxconfigs/migxcustomcolumnsgrid.config.js
and this is the php-file, which generates the fields and columns
https://github.com/Bruno17/migxCustomColumns/blob/master/core/components/migxcustomcolumns/migxconfigs/migxcustomcolumnsgrid.config.inc.php
be sure the php-file has the same name as the config for that grid
So if you MIGX-config for your TV has the name 'migxcustomcolumnsgrid'
then the php-file needs to have the name migxcustomcolumnsgrid.config.inc.php
this is using a MIGX-TV from the same resource and needs to be modified to get the columns from your parent-resource
Is this something, you can work with?
Unfortunately it hasn't worked quite the way I wanted it to (couldn't get it to work at all :-|)
I've send Bruno an PM but had no reply still. So if anyone has got an solution for me to help me out, please let me know...