Magento 2 AI Product Compare extension user guide¶

Introduction¶
Magento 2 AI Product Compare adds an AI-generated summary to the native "Compare Products" page. When a customer compares products, the extension sends the product data to OpenAI and shows a short structured review: similarities, differences, prices and a recommendation. The standard comparison table stays available in its own tab.
Main features:
- AI comparison tab on the "Compare Products" page, next to the standard comparison table.
- Structured answer: Similarities, Differences, Pricing and Recommendations.
- Answers in the store view language: the AI answers in the locale of the current store view.
- Stored responses: each answer is saved and reused for the same set of products, so the same comparison is not paid for twice.
- Daily request limit per store view to keep the OpenAI costs under control.
- Admin grid of stored responses: you can review and edit any AI answer.
Requirements and Installation¶
AI Product Compare supports Open source (Community), Commerce (Enterprise) editions and Commerce cloud. The current version of the Magento installed on your website can be found in the lower right corner of any backend page.
The extension uses the OpenAI API, so you need an OpenAI account and an API key.
AI Product Compare has 3 separate ways of installation:
1) Copy the code (ready-to-paste package);
2) Use MageWorx Repository;
3) Use local Composer.
Configuration¶
OpenAI API key¶
The extension sends requests to OpenAI with the key saved in the common MageWorx AI settings. Go to STORES ⟶ Configuration ⟶ MageWorx tab ⟶ AI Integration Settings ⟶ Settings:
- OpenAI API KEY - your OpenAI API key. You can get it in your account on the OpenAI portal. Click Validate to check the key.
The Cron group on the same page is used by other MageWorx AI extensions for background generation. AI Product Compare does not use it: comparisons are generated when a customer opens the "Compare Products" page.
AI Product Compare settings¶
Log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MageWorx tab ⟶ AI Product Compare ⟶ General Settings. All settings can be set per website and per store view.
- Enabled - enables or disables the AI comparison. Default: Yes.
- Select Model - the OpenAI model that writes the comparison. Default: Gpt 5 Nano.
- Daily API request limit - the number of new comparison requests to OpenAI allowed per day. It helps prevent misuse of the feature and limits your OpenAI costs. The limit applies to each store view separately, not to the whole store. Default: 50.
Only new requests to OpenAI count toward the limit. When a stored answer for the same products is shown again, no request is sent and the counter does not change. The counter starts over every day. When the limit is reached, customers see the message "AI comparison is unavailable at the moment. Please try later." in the AI tab until the next day; answers that are already stored are still shown.
What data is sent to the AI¶
For each compared product, the extension sends to OpenAI:
- name, SKU and final price;
- description, if the product has one;
- the value of the
brandattribute, if the product has one; - the rating and the number of reviews, if the product has reviews;
- the values of all attributes with Comparable on Storefront = Yes (STORES ⟶ Attributes ⟶ Product ⟶ attribute ⟶ Storefront Properties).
The more comparable attributes your products have, the more detailed the AI comparison is. These are the same attributes Magento shows in the standard comparison table.
When the AI comparison is shown¶
The AI generates a comparison only if:
- the extension is enabled for the store view;
- the customer compares at least 2 products;
- all compared products use the same attribute set.
If any of these conditions is not met, or OpenAI returns an error, the AI tab shows the message "AI comparison is unavailable at the moment. Please try later." The standard comparison tab works as usual.
The two tabs are added to the "Compare Products" page even when Enabled is set to No. In this case the AI tab shows the "unavailable" message.
Stored responses¶
Every AI answer is saved. When a customer compares the same products in the same store view and language again, the saved answer is shown at once, without a new request to OpenAI.
A new answer is generated when:
- the set of compared products changes;
- the name, SKU or final price of a compared product changes;
- a compared product is saved in the admin: all stored answers that include this product are deleted, and the next visit to the comparison page generates a fresh one.
To view stored answers, go to CONTENT ⟶ AI Compare Responses. The page is titled "AI Compare Cached Responses".
The grid has the following columns:
- ID - the ID of the stored answer.
- Store ID - the ID of the store view the answer was generated for.
- Product Hash - the internal key of the compared product set.
- Request Meta - the locale and the compared products (name, SKU, price).
- Stored Response - the AI answer as it was received.
- Created At / Updated At - when the answer was generated and last changed.
You can filter the grid by ID, Store ID, Product Hash and dates.
Click Edit in the last column to open the answer. The Stored Response field contains the AI answer in JSON format. Correct the text if needed and click Save Response. Customers will see the edited text the next time they compare these products.
Keep the JSON structure intact when you edit an answer: change only the text inside the quotes. If the JSON becomes invalid, the AI tab shows "AI comparison is unavailable at the moment. Please try later." for these products.
Your edits are lost when the answer is regenerated, for example after one of the compared products is saved in the admin.
Access to the grid is controlled by the AI Compare Responses permission in user roles.
Front-end¶
The extension changes the "Compare Products" page. It gets two tabs:
- AI comparison - open by default;
- Standard comparison - the native Magento comparison table.
The page opens right away, and the AI tab loads its content in the background. While the AI is working, the tab shows the message "AI is comparing selected products. This may take a few moments." It can take some seconds when the comparison is generated for the first time; stored answers appear almost at once.
The AI comparison has a title and the following cards:
- Similarities - what the products have in common.
- Differences - the key differences between the products.
- Pricing - each product with its price, in the store currency.
- Recommendations - a short advice on which product to choose; this card is highlighted.
The AI writes the answer in the language of the current store view.
Got Questions?¶
Need help with the extensions? Feel free submit a ticket from our Support page.
MageWorx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.