Skip to content
Sarah Amft edited this page Jun 5, 2024 · 1 revision

Welcome to the schuhgroessen-umrechner wiki!

The Problem of Finding the Right Shoe Sizes

Understanding the Problem

Finding the right shoe size is a perennial problem faced by consumers worldwide. The complexities arise from the myriad of shoe sizing systems employed globally, each with its own unique methodology. The primary systems include the European (EU), United States (US), United Kingdom (UK), and others like Mondopoint, which is used in countries such as China, Japan, and Korea.

One of the core issues is that these systems do not directly correlate with one another. For example, an EU size 42 does not simply translate to a US size 9 or a UK size 8. This disparity creates confusion and inconvenience for consumers who shop internationally or use online platforms to purchase footwear.

The Role of a Shoe Size Converter

A shoe size converter or calculator is a pivotal tool designed to bridge these gaps. It translates shoe sizes from one system to another, thus helping consumers find their correct size across different regions. This conversion is based on the length of the foot, which is the most logical parameter for determining shoe size.

Steps to Solve the Problem

Data Collection

The first step in creating a shoe size converter is gathering accurate data. This involves collecting shoe size conversion tables from reliable sources. For our project, we relied on data from Blitzrechner.de and the ISO 19407:2023 standard. These sources provide comprehensive and standardized conversion tables based on foot length.

Data Structuring

The next step is structuring this data in a format that is easily accessible and interpretable by our PHP script. We chose to store the data in a CSV file (data/shoe_sizes.csv). This file includes columns for EU sizes, US sizes, UK sizes, and the corresponding foot length in centimeters.

Coding the Conversion Logic

The core of our project is the PHP script (index.php). This script reads the CSV file, processes the data, and implements the conversion logic. It uses associative arrays to map the shoe sizes and includes functions to read the CSV, find the corresponding sizes, and convert centimeters to inches for additional utility.

User Interface

The PHP script is designed to be accessed via a web browser. Users can input their EU shoe size as a query parameter in the URL, and the script outputs the equivalent US, UK, and CM sizes. An additional feature converts the CM measurement to inches, catering to users who prefer imperial units.

Error Handling and Internationalization

To make the tool more robust and user-friendly, we implemented error handling and internationalization. The script includes messages for scenarios where no matching size is found or when the user fails to provide an EU size. These messages are stored in an array for easy localization and customization.

By following these meticulous steps, we have created a reliable and user-friendly shoe size converter that addresses the fundamental problem of finding the right shoe sizes across different sizing systems.