Quick View for Magento 2
A free quick view for Magento 2. A button on category and search result cards opens the product in a modal with images, price, SKU, stock and a short description, and simple products can be added to the cart from it. It also logs product page views in an admin report.
- Free
- Themes listed: Hyvä + Luma
composer require mage2kishan/module-quickview
- Package requirementsRead the source documentation
- Developer profileView Upwork profile
- Themes listedHyvä + Luma
- PHP versions listed8.1, 8.2, 8.3, 8.4
- Installation questionsDiscuss your store setup
What it does for your store
The main features, as listed in the module documentation.
-
Quick View button
Added to product cards on category, search and advanced search result pages, on Hyvä and Luma.
-
Product data in a modal
Name, SKU, price, stock badge, a short description of up to 300 characters and an image gallery, loaded as JSON without a page reload.
-
Add to Cart for simple items
Quantity and Add to Cart for in-stock simple and virtual products; other types link to the product page to choose options.
-
Keyboard friendly
Closes with Escape or the close button, keeps Tab inside the modal and returns focus to the button that opened it.
-
View Tracker report
Logs product page views and shows totals, a 30-day trend, hourly views, most viewed products and top customers in the admin.
Installation
Example commands from the Magento root. Follow the package instructions and your staging and deployment process.
- 1Check the releaseMatch Magento, PHP, theme and dependency requirements.
- 2Install on stagingReview Composer changes and follow the package instructions.
- 3Configure and verifyUse the documented settings and test the affected features.
$ composer require mage2kishan/module-quickview $ bin/magento setup:upgrade $ bin/magento setup:di:compile $ bin/magento setup:static-content:deploy -f $ bin/magento cache:clean
Listed requirements
These are the details supplied in this listing. Confirm the selected release supports your Magento edition, PHP and storefront.
| Magento versions listed | 2.4.6, 2.4.7, 2.4.8 |
|---|---|
| PHP versions listed | 8.1, 8.2, 8.3, 8.4 |
| Themes listed | Hyvä, Luma |
| Composer package | mage2kishan/module-quickview |
Documentation
Product details and setup guidance. Check the package repository for release-specific instructions.
Overview
Quick View (Panth_QuickView) adds a Quick View button to product cards on category, search result and advanced search result pages in Magento 2. Clicking it opens a modal that loads the product's images, price, SKU, stock status and short description over AJAX, so a shopper can look at a product without leaving the listing.
It works on the storefront listing. It does not change the admin product grid; that is the Advanced Product Grid module.
This module has no product compare feature and no recently viewed widget. Magento's own compare list is not changed.
What the modal shows
- Product name, SKU, an In Stock or Out of Stock badge and the price in the store currency. The regular price is struck through when the final price is lower. Configurable and grouped products show the lowest child price and bundles the minimum price, each with "As low as".
- A plain-text short description of up to 300 characters, taken from the description when the short description is empty.
- Every gallery image, with thumbnails on screens 768 px and wider.
- For in-stock simple and virtual products: a quantity field and an Add to Cart button that posts to the standard cart action and refreshes the mini cart. Store errors, such as a quantity above the maximum, are shown in the modal.
- For configurable, bundle, grouped, downloadable and other types: a Select Options link to the product page. Options are not shown in the modal.
- A View Full Details link for every product.
Five settings control the modal: Show Product Image Gallery (thumbnails), Show Short Description, Show SKU, Show Stock Status and Show Add to Cart. The name, price and View Full Details link are always shown. The modal closes with the close button, a click outside it or Escape; it is marked up as a dialog, keeps Tab inside it and returns focus to the Quick View button.
Hyvä and Luma
On Hyvä the button is a child block of the product list item and the modal is an Alpine.js component. On Luma a vanilla JavaScript modal adds the button next to the wishlist and compare icons. The right template is chosen through the default_hyva layout handle.
View Tracker report
The module also records product detail page views (not quick view opens) and shows them in an admin View Tracker report: total, today, this week, this month and unique visitors, a 30-day trend, today's hourly views, top customers, most viewed products and recent views. For guests it stores a visitor ID made from a SHA-256 hash of the IP address and user agent; for logged-in customers it stores the customer ID. Each IP address is counted at most once per product and store view every five minutes. Tracking has no on or off setting; it runs while the module is enabled.
Requirements
- Magento Open Source or Adobe Commerce 2.4.4 to 2.4.8.
- PHP 8.1 or later, as composer.json requires.
- Panth Core, installed by Composer, and Magento_Checkout.
Free and open source under the MIT License.
Developer notes
- PHP namespace:
Panth\QuickView. Front namequickviewon both the storefront and admin routers. - Open the modal from any template:
window.dispatchEvent(new CustomEvent('open-quick-view', {detail: {productId: 123}})). On Luma, an element with adata-quickview-idattribute also opens it when clicked. The Hyvä modal is the Alpine componentquickViewModal(). - Endpoints:
quickview/product/view(GET withid, returns the modal data as JSON) andquickview/track/view(POST withproduct_idandform_key, returns JSON, HTTP 403 without a valid form key). - ACL resources:
Panth_QuickView::quickview,Panth_QuickView::view_tracker,Panth_QuickView::comparisonandPanth_QuickView::config. - Table
panth_recently_viewed:view_id,customer_id,visitor_id,product_id,store_id,viewed_at, with a cascade delete on the product. The tablepanth_product_comparisonis created, but no code in this version reads or writes it. - The module declares no plugins, preferences, observers, cron jobs, web APIs or console commands.
| Module Category | Catalog & Products |
|---|---|
| Best For | All Sizes |
Questions before you install?
Send me your composer.json and I will check for conflicts first. Free. Installation is +$45, custom work is quoted first.