How to build a product finder quiz in PrestaShop with real catalogue data
People looking for a gift do not know which filter to use: they know who it is for and how much they want to spend. A guide with a few visual questions takes them to the products that fit. The hard part is making those questions come from the catalogue itself and making the results behave like any other category in the store. That is how The Perfect Gift was born.
Why it is not trivial in PrestaShop
- Questions must match real data. If an answer leads to no products, the guide loses the customer's trust.
- The catalogue changes every day: new products, combinations, prices and stock.
- Filtering by attributes, features, category, brand and price at once can be slow if the catalogue is queried directly on every page.
- Results must look like the rest of the store, with the theme's listing, sorting and pagination, and without relying on faceted search.
- It has to work on 1.6 and on 9, whose listing controllers are very different.
The approach: the catalogue decides
Each guide first defines its product selection (categories, brands, price, stock, inclusions and exclusions) without touching the catalogue. The possible answers to each question are the values those products really have, with the number of products behind each one. The module can even suggest the questions, with price ranges calculated by quartiles.
Technical decisions
Its own index
Instead of querying the catalogue on every visit, the module keeps an index with each product's values and final price. It is updated when a guide is saved, when a product or combination is created, changed or deleted, and by a scheduled task. Product status and customer group access are checked live.
Results with the theme's listing
The results page extends PrestaShop's product listing controller with its own search provider that filters, sorts and paginates in the database over that index. Customers see the same listing as in any category, with its sorting and pagination, and the store does not need faceted search.
Never empty
Answers to the same question are combined with OR and answers to different questions with AND. If a combination ends up empty, the guide can relax the last answer and show it struck through, instead of a blank page.
Built for search engines and for everyone
Each guide has its own friendly URL and metadata, and results pages carry noindex so the index does not fill up with combinations. The step-by-step guide runs on dependency-free JavaScript and, without JavaScript, shows every question with a single button.
Upgrades that respect what exists
The module has gone through major structural changes between versions. Each upgrade migrates existing guides so they keep working the same way.
What we learned
A good interactive shopping experience depends on a solid data model underneath. Indexing, integrating with native listings and staying consistent with the catalogue is the same work that product configurators, specialised search or custom recommendation engines require.
What this development demonstrates
- Integration with PrestaShop's native listing controllers
- Custom indexes kept up to date through product and combination hooks
- Combined search by attributes, features, category, brand and price
- Dependency-free interactive interfaces that also work without JavaScript
- Technical SEO: own URLs, metadata and noindex where appropriate
- Data migrations between module versions