At our agency, we use a Smartfit size calculator for a project that can calculate the size of the desired item based on several parameters. The problem here is that the part of the product detail page that contains the calculator is re-rendered via AJAX after a variant is selected, and the size calculator is then not re-populated and no longer works.
However, all we need to do is reinitialize the size calculator when the product detail section is reloaded via AJAX using the onlineSizerInit() function. To do this, we subscribe to the plugin/swAjaxVariant/onRequestData event and then add the following code to our JavaScript file:
$.subscribe('plugin/swAjaxVariant/onRequestData', function(me, response, values, location) {
onlineSizerInit();
});
This makes the size calculator appear again after selecting a variant. Seen at our web agency in an online shop with Shopware CE 5.6.4.
