mhinspeya / module-checksizeapi
Integrates Magento 2 store with Modehaus.de API for real-time external stock checks and local physical store stock availability. Fully compatible with Magento 2.4.8 and PHP 8.4.
Package info
git.modehaus.de/hyvae/checksizeapi
Type:magento2-module
pkg:composer/mhinspeya/module-checksizeapi
Requires
- php: ^8.2 || ^8.3 || ^8.4
- mhinspeya/backend-mod: ^1.0
Suggests
- mhinspeya/backend-mod: Support Configuration
This package is not auto-updated.
Last update: 2026-07-02 12:37:06 UTC
README
The MHinspeya_CheckSizeAPI module integrates your Magento 2 store with the Modehaus.de API to recover lost sales from out-of-stock variations and provide local omnichannel physical store stock information.
Business-Level Overview
This module is designed to solve customer friction caused by out-of-stock sizes or colors on the storefront, driving conversion rates and offline store traffic.
External Stock Recovery (Partner Network Integration)
- When a customer views a product page where their preferred size or color is sold out, the module connects in real-time to the Modehaus.de API (using the product's EAN or SKU).
- It fetches availability from the partner network and lists alternative sizes and colors available on Modehaus.de, providing a direct link so the merchant does not lose the customer's purchase intent.
Omnichannel Store Availability (BOPIS / Click-and-Collect)
- Under the "Buy directly on site / Vor Ort direkt kaufen" accordion, the module queries local Multi-Source Inventory (MSI) database tables.
- It displays to the shopper exactly which physical retail stores/branches currently have the product in stock and in which specific sizes.
Features
- Real-time Inventory Check: Displays a list of available sizes across different physical store locations (Inventory Sources).
- Modehaus.de API Integration: Allows customers to check for missing sizes on Modehaus.de via a GraphQL API integration.
- Dynamic Icons: Fully configurable icons for "Store Availability" and "Check Size" features via the Magento Admin.
- AJAX Driven: Smooth, non-blocking user experience for checking sizes without page reloads.
- Hyvä Compatible: Built specifically for Hyvä themes using Alpine.js.
- Full Localization: Complete support for English and German locales (
de_DE,de_CH,de_AT).
Technical Architecture & PHP 8.4 / Magento 2.4.8 Compatibility
This module has been fully refactored to comply with PHP 8.4 and Magento 2.4.8:
- Engine Error Safety: Replaced legacy, generic
\Exceptioncatch statements with\Throwablecatching to ensure PHP 8.4 engine errors do not cause fatal storefront crashes. - PSR Logging: Integrated
\Psr\Log\LoggerInterfaceacross all controllers, views, and models for logging errors. - Null Safety: Implemented strict null checks and fallback methods for database connections, XML configurations, and product registry lookups.
- Graceful Degradation: If Multi-Source Inventory (MSI) is disabled or the database schema is missing stock tables, the frontend falls back gracefully to prevent breaking the product detail pages.
Installation
1. Manual Installation
- Upload the module files to
app/code/MHinspeya/CheckSizeAPI. - Ensure you have the
MHinspeya_BackendModdependency installed.
2. Enable the Module
Run the following commands in your Magento root directory:
bin/magento module:enable MHinspeya_CheckSizeAPI
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f de_DE de_CH de_AT en_US
bin/magento cache:flush
Configuration
Navigate to Stores > Settings > Configuration > Inspeya > CheckSizeAPI Configuration to manage the module settings:
General Settings
- Enable CheckOnSize in Frontend: Toggle the main feature on or off.
- Product EAN/SKU for Check: Choose whether to send the EAN or SKU to the Modehaus.de API.
- Modehaus API Authorization Key: Your unique API key for authentication.
- Modehaus API Graphql API Key: The endpoint URL for the GraphQL search.
- Modehaus API Shop URL: The base URL of the target shop.
- Check Size Icon: Upload a custom SVG/PNG icon for the size check section.
Text Style Section
- Modehaus.de Text Title: Customize the instructional text shown to users.
- Missing a Size Label: Customize the header text for the size check section.
- Buy Directly on Site Label: Customize the header text for the store availability section.
- Check Item Availability Label: Customize the sub-header text for the store availability section.
- Availability Icon: Upload a custom SVG/PNG icon for the store availability section.
Localization
Base strings are in English. Translation files are available in:
i18n/de_DE.csvi18n/de_CH.csvi18n/de_AT.csv
The translation files include all frontend-facing strings, error messages, and admin configuration labels:
"Check Size" => "Größe prüfen""Store Availability" => "Verfügbarkeit in der Filiale""Buy directly on site" => "Vor Ort direkt kaufen""Check item availability" => "Prüfe die Verfügbarkeit des Artikels"
© MHinspeya. All rights reserved.