Swisstopo eCommerce
Case summary
Revamping of swisstopo's online store using Drupal Commerce, featuring a custom interactive map viewer.
Case description
Swisstopo, the Swiss Federal Office of Topography, needed a complete technical overhaul of its online store based on an Open Source e-commerce solution. The challenge included developing a content management system (CMS) to manage the site's structure, proposing a new content architecture, developing an interactive map viewer, improving user experience, and integrating the official Swiss Federal authentication system eIAM. Other features developed were a bespoke VAT and delivery cost management system and a custom discount code management system.A significant achievement was creating an interactive map, which allows users to find products and visualize their perimeters. With the integration of Drupal and Drupal Commerce, we could quickly meet one of the project's main objectives: using a single tool to manage Pages, Products, and Orders. The new swisstopo online store offers over 778 products in four languages, with a page creation tool that allows custom product inclusion on a case-by-case basis.
Case goals and results
The key goal was to revamp the swisstopo online store using a robust and reliable e-commerce solution that would enable efficient management of Pages, Products, and Orders while providing a seamless user experience. This goal was met by leveraging the features of Drupal Commerce.Challenges
Two primary technical challenges faced were the integration with the eIAM authentication system using the SAML 2.0 protocol, and the development of the Map Viewer. Thanks to the Drupal expertise of Antistatique and SAML protocol knowledge, they even contributed to the SamlAuth project by adding HTTP-POST Binding support, not available in any existing Drupal SAML modules.Community contributions
We significantly improved the SAML Authentication module to ensure compatibility with the Post Biding specification, hence making it usable with the confederation's authentication system (https://www.drupal.org/project/samlauth/issues/2854751).We further enhanced the SAML Authentication module for better attribute management (https://www.drupal.org/project/samlauth/issues/3252457).
Our primary contribution to the Drupal Core was the addition of a new granularity for permissions per block type (https://www.drupal.org/project/drupal/issues/2809291).
We also contributed to improving the DX in the Drupal Core with "UniqueFieldValueValidator lowercasing Label of field on violation message" (https://www.drupal.org/project/drupal/issues/3029782).
Additionally, we created the module 'Homepage Redirect by Language' to redirect visitors landing on the homepage to their preferred language, based on previous browsing sessions, offering their native content as default.
We wrote an article on creating a custom Commerce Order total Range condition (https://antistatique.net/en/blog/how-to-setup-a-drupal-commerce-order-total-range-condition).
Another key contribution to the Drupal ecosystem was our addition of a new rule that makes the latest versions of php-cs-fixer (widely used in the Symfony community) compatible with the Drupal Code Style (https://github.com/drupol/phpcsfixer-configs-drupal/pull/9).
We created the Image Styles Builder module to improve the bulk declaration of Image Styles by frontend teams.
Finally, we developed an open-source PHP library for converting World Coordinates to Swiss Coordinates, and vice versa.
Hosting
Amazon S3