Hi,
The code you're pointing out is indeed there to force the synchronization.
However, it does it only in a specific case: when the products listing module is displayed on a products or categories listing page and only when the HTML of the module is inside the main area of the template (where HikaShop displays the main products / categories listing on the page).
This was added to fix issues with Falang messing with the settings of the modules in some cases.
Also, normally you should not have a products listing module displayed inside the main area of the page. When you configure a module via the Joomla modules manager, the module is set to a position of your template and thus not the main area. There is also no setting anymore in HikaShop to have a module displayed by the main area on a listing page (there is still such a setting for the product details page with the "modules under the product page" setting of the HikaShop configuration, but that's irrelevant here).
So normally, this code should not be an issue for you since when you display a module in a position of the template, the code
hikaInput::get()->getVar('hikashop_front_end_main',0)
should return false and thus you should not go in the if and override the value of the synchronization.
So the problem you're describing is either caused:
- by the hikashop_front_end_main not with the correct value even though the module is displayed outside of the main area (I don't see why that would be the case)
- the way you add the module to the page. For example, if you add it by adding a tag with the extension module anywhere inside the view file displaying the main listing, it would generate that problem. The solution in that case is to change the way the module is displayed to use a more conventional method: display it in a position of the module and configure the module to only display on the pages you want with the normal settings.