Issues setting the product image sort_order during import


Hi all you guys!

I’m currently working on a customisation of the DataImport module, more specifically on the data:import:product-image command for being able to set the sort_order for every image so I can define which is the primary image of a product. Since the sort_order is already defined by Spryker it self, I just had to modify the ProductImageWriterStep for setting the sort_order of the $productImageSetToProductImageEntity.

Until here everything seems to work properly since the sort_order is being persisted in the DB and within the backend I can see the changes were applied. The problem is that changes are not being applied somehow to the frontend, so the first image in the product list and product detail page is still outdated, when e.g. changing the main image using the import. I guess it should be related to some issue with events which doesn’t communicate that that view storage should be refreshed wherever stored is, not sure if ES or Redis.

Does anyone has an Idea which may be the issue?

The project is based on the suite 1.1.