PS PrestaShop Beginner

Quick View Module for PrestaShop 1.7.8 to 9 — Documentation

Install, configure and troubleshoot DF Quick View 2.0.0 on PrestaShop 1.7.8 to 9.x, Classic and Hummingbird themes.

Updated Module version 2.0.0

Overview

DF Quick View adds a quick view to your product lists: a window that opens over the list with the product gallery, its combinations, its price, its volume discounts, its availability and an add to cart button. The customer stays on the list and can move to the previous or next product without closing the window.

Prices, discounts, taxes, availability and the permission to add to cart come from PrestaShop itself, with the same code as the product page: the quick view always shows the price the visitor would see on the product page, for their customer group, currency and country.

Hummingbird category list: “Quick view” button on mouse over a product miniature
Hummingbird category list: “Quick view” button on mouse over a product miniature

Requirements

  • PrestaShop 1.7.8 to 9.x (tested on 1.7.8.11, 8.2.1 and 9.1.5)
  • PHP 7.1 or higher (tested with PHP 7.4, 8.1 and 8.5)
  • Classic or Hummingbird theme, or a theme using the PrestaShop product miniature markup (a CSS selector setting covers other themes)

Installation and update

  1. Download dfquickview-2.0.0.zip from your DataFirefly account.
  2. In the back office, open Modules > Module Manager, click Upload a module and drop the archive.
  3. Click Configure: the default settings work with Classic and Hummingbird.

Update from 1.0.0: upload the 2.0.0 archive over the installed module. Every setting is kept. The former trigger mode is converted: “Intercept” becomes “Theme button”, “Inject” and “Both” become “DF button” (the theme button is then hidden, so there is only one button per product). “Load on all pages” becomes the list of pages. The update is written to the PrestaShop logs.

The module creates one small table, dfquickview_rate, used by the request limiter. Uninstalling removes it with every setting.

Back office

The settings page starts with a diagnosis of your shop: theme, presence of a theme quick view, stock settings, catalog mode, modules whose products must be set up on their product page. A live preview on the right follows every change, on a computer or on a phone.

Back office: shop diagnostics, button settings and live preview
Back office: shop diagnostics, button settings and live preview

1. Button on the product lists

  • Which button opens the quick view? “DF button” (recommended) adds the module button and hides the theme quick view button with a stylesheet: there is never a second button. “Theme button” keeps the button of your theme, which then opens the DF window instead of the theme window. The theme files are never modified: disabling the module brings the theme quick view back.
  • Position on the product image: bottom, centre, top right, top left. On Classic, the button stays above the colour links.
  • Style: icon and text, icon only, text only. On touch screens, the button is always a round icon that never hides the product name.
  • Icon: eye, magnifier, plus, bag.
  • Visible on mouse over (and keyboard focus) or always.

2. Content of the quick view

Layout on computers: two columns (large gallery on the left) or compact (smaller window). Each element can be shown or hidden: brand, reference, short description, availability, volume discounts, pack contents, image thumbnails, image zoom, previous / next product, link to the full product page.

Back office: quick view content, add to cart and live preview on mobile
Back office: quick view content, add to cart and live preview on mobile

3. Add to cart

  • Quantity selector, starting at the minimum quantity of the product or combination.
  • After the product is added: confirmation in the quick view (cart summary, the header cart is updated), theme confirmation (the quick view closes and the usual cart window of your theme opens), or the cart page.

The cart rules of PrestaShop apply: minimum quantity, stock, orders when out of stock, security token. Errors returned by the shop are shown under the button.

4. Lists with a quick view

Home page, categories (faceted search and infinite scroll included), search results, brands, suppliers, prices drop, new products, best sales, lists of the product page (accessories, same category, cross-selling), cross-selling of the cart page, and every other page with product lists. Lists loaded later are covered automatically.

5. Phones

Bottom sheet (slides up from the bottom, swipe down to close), full screen, or off on phones (below 768 pixels wide, the theme behaviour is kept).

6. Speed and look

  • Preload on mouse over: the data of a product is fetched when the mouse rests on it for the chosen delay (120 ms by default). Nothing is loaded before that. The window script itself is loaded at the first intent only.
  • Browser cache: 300 seconds by default, separated by language, currency, shop, customer group, customer and country.
  • Requests per minute and visitor: 120 by default, 0 turns the limit off. Over the limit the shop answers “too many requests” for a few seconds. Visitors are counted with a salted hash: no IP address is stored.
  • Accent colour of the buttons and selections. The page warns you when white text on the colour is hard to read (contrast below 3:1).

7. Advanced: custom theme

CSS selector of a product miniature, .product-miniature, .js-product-miniature by default. Change it only if your theme does not use the PrestaShop markup.

Error messages

When a value is not accepted, nothing is saved: the errors are listed at the top with a link to each field, and a message under the field says what to enter.

Back office: precise error messages under each field, nothing is saved until they are fixed
Back office: precise error messages under each field, nothing is saved until they are fixed

In the shop

The window shows every image of the product, with thumbnails, arrows, swipe on touch screens and zoom. When a combination is chosen, the price, crossed-out price, discount, reference, availability, minimum quantity and images follow. Combinations that do not exist are shown with a dashed outline; out of stock ones are crossed out. Clicking a value that does not exist with the current choice selects the closest existing combination.

Two-column quick view: gallery, brand, price, combinations, stock and add to cart
Two-column quick view: gallery, brand, price, combinations, stock and add to cart
Combination change: discounted price, crossed-out price, reference and colour images updated
Combination change: discounted price, crossed-out price, reference and colour images updated
Out of stock combination: size crossed out and add to cart button disabled
Out of stock combination: size crossed out and add to cart button disabled

Prices and volume discounts

The table of volume discounts is the same as on the product page. The row of the chosen quantity is highlighted, and clicking a row sets the quantity.

Discount and volume discounts: tier table with the row of the chosen quantity highlighted
Discount and volume discounts: tier table with the row of the chosen quantity highlighted

Add to cart

Add to cart confirmed in the quick view, with the number of items and the cart total
Add to cart confirmed in the quick view, with the number of items and the cart total

The header cart is updated without reloading the page: the module sends the standard updateCart event of PrestaShop.

Shop header: mini cart counter updated without reloading the page
Shop header: mini cart counter updated without reloading the page

Products set up on their product page

Products with required customization fields, and products of the DataFirefly configurator, textile print designer and refurbished modules, show a “Customize” or “Configure” button that opens their product page instead of a direct add to cart. When printing is optional (textile print designer), the add to cart stays available with a link to personalize.

Product to customize: “Customize this product” button to the product page instead of a direct add to cart
Product to customize: “Customize this product” button to the product page instead of a direct add to cart

Packs

Pack: list of the products it contains with their quantities and combinations
Pack: list of the products it contains with their quantities and combinations

Previous and next product, keyboard

The arrows at the top of the window, and the left and right arrow keys, move to the previous or next product of the same list. Escape closes the window (or leaves the zoom first). The focus stays in the window while it is open and comes back to the miniature of the last product shown.

Keyboard navigation between the products of the list: product 2 of 10, previous and next buttons
Keyboard navigation between the products of the list: product 2 of 10, previous and next buttons
Zoom on the product image in the quick view, the enlarged area follows the mouse
Zoom on the product image in the quick view, the enlarged area follows the mouse
Compact layout for simple products, with unit price and minimum purchase
Compact layout for simple products, with unit price and minimum purchase

Phones

On mobile: round quick view button always visible on the miniatures
On mobile: round quick view button always visible on the miniatures
On mobile: bottom sheet quick view with handle, swipeable gallery and sticky buy button
On mobile: bottom sheet quick view with handle, swipeable gallery and sticky buy button
On mobile: full screen quick view, with volume discounts and sticky buy button
On mobile: full screen quick view, with volume discounts and sticky buy button

Classic theme

Classic theme: quick view of the mug with discount and volume discounts
Classic theme: quick view of the mug with discount and volume discounts
Classic theme: quick view button above the colours of the miniature, the native theme button is hidden
Classic theme: quick view button above the colours of the miniature, the native theme button is hidden

Data and security

  • The quick view only answers for products that the visitor could see in the list: active, in the current shop, visibility “everywhere” or “catalog” (or “search” in search results), category open to the customer group.
  • Every refusal gets the same answer, so the address cannot be used to find hidden products.
  • No internal data is sent: no wholesale price, supplier, location or codes. The exact stock is only sent when your shop displays quantities.
  • Catalog mode and customer groups without prices are respected: no price and no add to cart button.
  • The address used by the window is not indexed by search engines (X-Robots-Tag: noindex) and is never stored by shared caches. The page address does not change when the window opens.
  • Descriptions are rebuilt from a list of allowed tags: no script, no event attribute, no javascript: link.

For developers

  • Events on document: dfquickview:open, dfquickview:render (product data and window), dfquickview:added (product, combination, quantity, cart), dfquickview:close.
  • window.DfQuickView.open(idProduct, idProductAttribute) opens the window; window.DfQuickView.refresh() adds the buttons to miniatures inserted by your own scripts.
  • Hook actionDfQuickViewProductPageRequired (id_product, id_shop, &required): set required to true to send a product to its product page.
  • A list container can be marked with data-dfqv-list to define the products browsed with previous / next.

Troubleshooting

No button on the miniatures

Check that the list is ticked in “Lists with a quick view”, then that the miniature selector matches your theme (section 7). With “Theme button”, the module adds no button.

Two buttons on a miniature

Your theme uses a quick view button with a markup the module does not know. Choose “Theme button”, or hide the theme button in your own stylesheet.

The price differs from the list

The quick view shows the price of the product page. If your theme or a module changes the price shown in the lists only, the two can differ. Set the browser cache to 0 for a test.

“Too many requests”

Raise the number of requests per minute, or set it to 0, for example if many visitors share the same address (company network).

Changes are not visible

PrestaShop rebuilds its CSS and JavaScript cache by itself after you save. If a full page cache is used, empty it.

Uninstalling

From the Module Manager, choose Uninstall: every setting and the request limiter table are removed. No product, cart or order is affected, and the theme quick view comes back.

Was this page helpful?

Still stuck? Contact support