DataFirefly Size Guide — Documentation
Modular size guide, interactive fit calculator, dedicated SEO page and post-purchase customer feedback for PrestaShop 8 and 9.
Overview
DataFirefly Size Guide adds a complete size-guide system to your PrestaShop store, with charts that can be assigned per category, manufacturer or product, EU/US/UK/FR/JP conversion tables, an interactive fit calculator, an indexable SEO landing page per category, and a post-purchase feedback widget with aggregated bias score.
The module targets apparel and footwear stores where more than 20% of returns are due to sizing issues. It turns this friction into a reassuring buying journey: the customer automatically sees the correct chart, can enter their measurements to get a personalized recommendation, and you collect qualified feedback that helps detect badly graded products.
Compatibility
- PrestaShop 8.0.x, 8.1.x, 8.2.x, 9.0.x
- PHP 8.1, 8.2, 8.3
- Multi-shop (all assignments are scoped by
id_shop) - Polylang FR/EN/ES/DE ready out of the box
- Classic and hummingbird themes, plus custom themes (7 different positions available)
Installation
- Upload the
dfsizeguide.zipZIP from Modules → Module Manager → Upload a module. - Click Install. The 4 preset charts (women apparel, men apparel, women shoes, men shoes) are automatically created in 4 languages, and a default assignment is created on the women apparel chart.
- Right after installation, the “Size guide” tab appears on all your product pages with no additional configuration.
- Go to Modules → DataFirefly Size Guide → Configure to adjust positions, the default unit, and enabled features.
Key concepts
The 4-tier chart resolver
When a customer lands on a product page, the module looks up which chart to display by following a strict priority:
- Product — if you have explicitly assigned a chart to this specific product, it wins.
- Manufacturer — otherwise, the chart assigned to the product’s brand.
- Category — otherwise, the first category of the product that has a chart, starting from the deepest one (specificity wins).
- Default — otherwise, the chart marked as the global fallback.
This hierarchy lets you maintain a single chart per brand or per department without touching individual product pages, while still allowing surgical overrides.
Column types
Each chart is made of typed columns:
- “Size” column — a single text value per row (S, M, 38, XL). Used for international correspondences (EU, US, UK, FR, JP).
- “Measurement” column — a numeric min/max range per row (e.g. chest 88–92 cm). Used to indicate the body measurements matching each size.
The interactive calculator only uses “measurement” columns to determine the recommended size.
Configuration
Positions on the product page
The module exposes 7 individually toggleable positions in Configure → Product page positions:
- Product tab (enabled by default, recommended) —
displayProductExtraContenthook, adds a clean tab next to “Description” and “Details”. Works on virtually all PS 1.7+ themes. - Under price —
displayProductPriceBlockhook (typeafter_price), renders a compact link right under the price. - Near the “Add to cart” button —
displayProductActionshook, renders a compact button. - Under product info —
displayProductAdditionalInfohook, renders a prominent button. - In the reassurance block —
displayReassurancehook, blends visually with your other trust arguments (delivery, returns). - After product images —
displayAfterProductThumbshook, renders a compact button just below the gallery. - Product page footer —
displayFooterProducthook, renders a prominent button at the bottom of the page.
You can enable several positions in parallel: the guide modal is instantiated only once in the DOM (anti-duplicate), and the extra buttons all open the same modal.
The product tab is the only position that renders the table inline. The other 6 positions render a button that opens the modal.
General settings
- Default unit — cm or inches. The customer can toggle on the fly, and their preference is preserved in the calculation.
- Interactive calculator — enables measurement input and size recommendation (enabled by default).
- Post-purchase customer feedback — enables the widget that asks the customer whether the size was right (enabled by default).
- JSON-LD structured data — enables Schema.org markup injection for improved SEO (enabled by default).
- SEO page slug — URL prefix of the dedicated SEO pages (defaults to
size-guide).
Create and edit a chart
Menu Modules → Size guides → Charts. Click “Add” to create a new chart, or the pencil icon to edit an existing one.
Chart fields
- Internal code — unique technical identifier (e.g.
women-dresses-2026). Used in SEO URLs and logs. - Type — apparel top, apparel bottom, dress, shoes, or custom.
- Name — multilingual label shown to customers (tab title, modal title, SEO page h1).
- Introduction (HTML) — multilingual content shown above the table.
- Measurement instructions (HTML) — collapsible section that explains how to take each measurement.
- Footer (HTML) — multilingual content shown below the table (disclaimer, link to returns policy, etc.).
- Meta title / Meta description — for the dedicated SEO page.
- Active — on/off switch. An inactive chart is never served even if it’s assigned.
Edit the table
Below the chart form, a visual editor lets you build the table:
- Click Size column to add a text column. Enter the code (e.g.
eu,intl) and the multilingual label. - Click Measurement column to add a numeric column. Enter the code (e.g.
chest_cm) and the unit (cm, inch, mm). - Click Row to add a row. Fill the cells: plain text for “size” columns, min/max values for “measurement” columns.
- Click Save. The save runs in an atomic SQL transaction — either everything is saved, or nothing is.
Assign a chart
Menu Modules → Size guides → Assignments.
- Pick the chart to assign from the list.
- Pick the target type: Default (global fallback), Category, Manufacturer or Product.
- Depending on the type, a second field appears to pick the category (in an indented tree), the brand (dropdown) or the product ID (direct input).
- Click Add / Update. If an assignment already exists for this target, it is overwritten (upsert).
All assignments are scoped by shop in multi-shop mode. You can have a different chart for the same category on two shops in the same group.
The size calculator
The calculator appears below the table, only if the chart has at least one “measurement” column.
Scoring algorithm
The customer enters their measurements (one field per “measurement” column). On submission:
- Values are normalized to centimeters (automatic conversion if the user picked inches: ×2.54).
- For each row, the module computes a score: +2 points if the customer’s measurement falls within the cell’s min/max range, +1 point if it’s close (within ±5% of the range), 0 points otherwise.
- The row with the highest score wins.
- Ties are broken by picking the row whose ranges are most centered on the customer’s values.
- The recommended size is extracted in priority from the
eucolumn, thenfr,intl,uk,us,jp.
User feedback
The calculator displays the recommended size with a confidence score as a percentage, the top 3 candidates each with their score, a highlight of the recommended row in the table above, and the list of measurements that don’t match any row (with a warning).
Post-purchase customer feedback
A widget “Did the size fit?” appears at the bottom of the product page with 5 options: too small, a bit small, perfect, a bit large, too large. It is only rendered when:
- The customer is logged in (active session).
- The customer actually bought this product (join with
ordersandorder_detail, valid status). - The customer has not already given feedback on this product.
The gating is entirely server-side, with no risk of bypass.
Feedback dashboard
Menu Modules → Size guides → Customer feedback. A summary above the table shows the count for each of the 5 fit levels. Below, the full list of feedback per product with customer ID, purchased size and date.
Bias score
For every product with at least 3 pieces of feedback, a bias score is computed:
score = ((too_large × 2 + slightly_large) − (too_small × 2 + slightly_small)) / total
A positive score means the product consistently runs large (should be re-graded one notch down). A negative score means it runs small (should be re-graded one notch up). A score close to zero means a well-graded product.
Dedicated SEO page
The module exposes a public route per category: /{slug}/{category-link-rewrite}, where {slug} is the configured prefix (defaults to size-guide).
Example: https://yourshop.com/size-guide/women-dresses
The page contains a breadcrumb, the h1 title of the chart, the introduction, measurement instructions and full table, the calculator (if enabled), the chart’s HTML footer, and a Schema.org JSON-LD WebPage markup that helps Google understand the page is a practical guide.
Meta title and meta description tags come from the SEO fields of the chart. Configure them correctly to capture long-tail searches like “women dress size guide”.
Multi-language and multi-shop
The module is multilingual at the chart level (name, intro, instructions, footer, meta), at the column-label level, and at the Polylang label level for URLs.
In multi-shop mode, every assignment (guide → target) is scoped by id_shop. You can therefore display chart A for the “Shoes” category on the French shop, and chart B for the same category on the German shop.
Technical structure
Database
7 tables prefixed dfsg_: dfsg_guide, dfsg_guide_lang, dfsg_column, dfsg_column_lang, dfsg_row, dfsg_cell, dfsg_assignment, dfsg_feedback. All tables are cleanly dropped on uninstall.
Hooks used
actionFrontControllerSetMedia— front CSS/JS injectiondisplayBackOfficeHeader— back-office CSS/JS injectiondisplayProductExtraContent— product tab (recommended)displayProductPriceBlock,displayProductActions,displayProductAdditionalInfo,displayReassurance,displayAfterProductThumbs,displayFooterProduct— alternative positionsdisplayHeader— JSON-LD injection on product pagesactionValidateOrder— trigger for future reminders (v2)moduleRoutes— dedicated SEO page
FAQ
The guide doesn’t show on my product page, what should I do?
First check in Configure → Product page positions that at least one position is enabled (Product tab by default). If your custom theme doesn’t render PrestaShop’s native hooks, enable several positions in parallel: at least one of the 7 should work. Also make sure there is at least one active chart and a default assignment in Size guides → Assignments.
Can I import charts from a CSV?
Not in version 1.0. The visual editor lets you build charts on the fly. CSV import is planned for version 1.1.
Does the calculator work without JavaScript?
No, the calculator is interactive and requires JavaScript to make the AJAX call to the server. However, the static table renders perfectly without JS, preserving accessibility and SEO.
Is there a risk of duplicate JSON-LD markup?
No. The displayHeader hook emits a single JSON-LD script per product page, and the dedicated SEO page has its own distinct WebPage markup. Google’s Schema.org validator reports no duplication.
Compatible with the PrestaShop 8 to 9 migration?
Yes. The module declares ps_versions_compliancy from 8.0.0 to 9.99.99, uses ObjectModel and HelperForm classes still supported in PS 9, and uses no deprecated API.
How do I purge all the module’s data?
Uninstalling via the Module Manager drops all dfsg_* tables and all DFSG_* configurations. No trace remains in the database.
Support
Email: support@datafirefly.com. Response within 5 business days in French or English.