Automate "Generate Variants" via Plugin Command?

Hello There

I’m migrating from Prestashop to Shopware. Now i’ve created exporters and a shopware plugin to accomplish that. after data is imported i can run a cli command that adds product variant data to product configurator.
Then in the backend I’d have to go through all the prodcuts to realize those variants using the „Generate Variants“ button.
Then i have another command that adjusts the product variants fields like prices, weights, etc.

Now, is there any way to automate the manual step I take in the backend > having to click „Gernerate Variants“ button to „realize“ these variant products? I can’t understand why this is so awefully done. Who wants to click on each and every product just to click on generate variants button.

Thanks for any advice… Any searches including AI have been unsuccessful so far.

All the best,
Oli

There is absolutely no need to execute the „Generate Variants“ method if products and the variants are created/imported the right way. Since I cannot tell what you did so far…

In your current setup you could use the Shopware Admin-API to call that method for every product in a loop in your browser. That should not be that complicated.