Question: we have a multi brand shop with 60K+ of products.

Every brand has it's own way of dimensions.
Which results in an attribute list of 500+ entries.
Attribute: POS-size

Here is a screenshot of this:
[![enter image description here](https://i.stack.imgur.com/WklZK.png)](https://i.stack.imgur.com/WklZK.png)

But this list is to big to use for a filter on front-end.
Thats why we have added an extra attribute for this. To simplify all these sizes.
This attribute is: size-frontend

Here is a screenshot:
[![enter image description here](https://i.stack.imgur.com/CJO21.png)](https://i.stack.imgur.com/CJO21.png)

After I have made new products (added via a POS system) I have to manually update the simple product with the size-frontend attribute.

Some examples:
Pos-size -> size-frontend
50 -> 50
50/56 -> 50 & 56
56 -> 56
56/62 -> 56 & 62
56-62 -> 56 & 62

This costs a lot of time, and I think think this could be done automatically (through a script or an extension) after making some kind of conversion table.
And it should also be able to give an starting product-id, from where it should start.

Does anyone know how to do this? Or know an extension which can do this?

It should be done in the backend, in a special screen like this:
[![enter image description here](https://i.stack.imgur.com/6O9A3.jpg)](https://i.stack.imgur.com/6O9A3.jpg)

Now i have to filter the products on the pos-size, than update these products in bulk to the desired filterable attribute size(s)

It would be nice if i could run this by selecting the desired products and apply this action. WHich could be placed in the actions menu with the products

Answer: 
This sounds like its fairly easily solvable with a custom module, I don't think there is anything available off the shelf that will relate one set of attributes to another set.

What you could do is build a module that triggers off a product being saved and then updates the customer facing sizes based on a relationship table (maybe written in a csv to make it updatable or an admin grid ui).

That way when a product is saved those frontend sizes are (re)populated with the correct values. For simplicity you could even hardcode those relationships but it makes updating them require dev time.

It's definitely not a 5 min job but not that bad. Custom module with a plugin to trigger on the product before the save function, match the POS sizes to the related frontend sizes, apply them to the product attribute and then allow the product to save as normal.
I have updated one of my free modules to cater for your use case. The script has 3 parameters and the first 2 parameter are the attributes to sync.

The script fetches all the products for which theirs values for both attributes differ. In your case, although your catalog is big, the query may return at a time 500 products and at the very most 5k I'd imagine.

But if you have concerns with speed, you can run the scripts by chunks:

For instance, running the below 10 times will go through 100k products in no time
php bin/magento mbs:attributes:sync pos\_maat kledingmaat\_zichtbaar 1000

The module is public and is available at:
<https://bitbucket.org/magstaging/productattributeupdate/src/master/>

Sometimes, I forget to make them public but this one was used once so I believe it is already checked and is indeed public.

Please do backup your database before using the module.

I suggest to run the script on 1 or 2 products first and verify it works for you.. then only roll it out on the full catalog.

I could add an improvement whereby going forward aplugin like the answer below could kick in for every products being changed. But given the script is now optmised, it should be quite easily to just rely on a cron that you may want to setup.