Cost transparency extension for Shopware 6
Ingo Steinke, web developer
Posted on May 2, 2024
Sustainable shop owners might want to inform customers where their money goes. For example, 50% goes to manufacturers, 20% is for transport, storage, and infrastructure, and another 20% goes to marketing, so there is about a 10% margin left for the merchant to earn money.
Cost transparency bar chart
My Cost Transparency extension for Shopware adds an optional bar chart to indicate the fractions of a product price paid for the material, manufacturers, marketing, distribution, etc. This can be a first step for merchants to inform customers about their supply chains. They will eventually be obliged to do so when the European Act on Supply Chain Due Diligence (Lieferkettengesetz) is ratified. But even without mandatory legislation, customers might prefer merchants who can tell where their money goes.
As a front-end developer, I didn't find it hard to make the chart responsive, especially since I had already developed something similar for a WooCommerce shop.
Shopware's off-canvas implementation changes
The hardest part was finding out about the mobile off-canvas functionality when Shopware made two breaking changes, one of them so subtle that it was hard to notice (adding a mandatory hyphen to a data attribute), and another one announced for Shopware 6.7 but seemingly already effective in the 6.6.0 release. Validating the code and understanding how merchants are supposed to describe their plugins and format their metadata has not been easy either. I will spare us more details this time, but if you have read my series about learning in public, you know what I mean.
Finally: solved, approved, and released
The cost transparency extension has been approved and released in the Shopware store, and I am featured as an official extension partner again.
https://store.shopware.com/en/ingos57544164693f/cost-transparency.html
My extension code is also 100% public open-source on GitHub:
Posted on May 2, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.