dfbundlevisual — Frequently Bought Together
Install and configure the Frequently Bought Together block: manual bundles, bundle discount and automatic co-purchase suggestions.
Overview
dfbundlevisual displays an Amazon-style Frequently Bought Together block on the product page: checkable product cards separated by plus signs, a live-updating total price and a single button to add the selection to the cart. A bundle discount (percentage or fixed amount tax incl.) is applied automatically when the full bundle is in the cart. When no manual bundle exists, the module can suggest the products genuinely purchased together based on your order history.
Installation
- In the back office, open Modules > Module Manager > Upload a module.
- Upload the
dfbundlevisual.zipfile and click Install. - The module creates its tables, its Catalog > Visual bundles tab and registers the required hooks.
Compatible with PrestaShop 8.0 to 9.x, single store and multistore. Zero dependency: no Composer, no framework, no jQuery.
Configuration
Open the module configuration page (Modules > Module Manager > dfbundlevisual > Configure):
- Enable module: global switch for the front-office block.
- Display hook:
displayFooterProduct(product footer, recommended) ordisplayProductAdditionalInfo(below the buy button, depending on the theme). - Block title: customizable per language. Defaults to “Frequently bought together” in English.
- Enable automatic suggestions: shows co-purchase suggestions when no manual bundle exists for the viewed product.
- Max automatic suggestions: number of complementary products displayed (2 by default).
- Minimum co-purchases: minimum number of orders containing both products for a suggestion to appear (2 by default).
- Order history window (days): period analysed for co-occurrence (365 by default).
Creating a bundle
- Open Catalog > Visual bundles and click Add.
- Bundle name: internal name, also used as the discount label in the cart.
- Main product: search by name, reference or ID. The block will be displayed on this product’s page.
- Bundled products: add one or more complementary products using the autocomplete search.
- Discount type and value: no discount, percentage (max 100) or fixed amount tax incl.
- Activate the bundle and save.
One bundle per main product per store: the block stays readable with a single commercial message. In multistore mode, each store can have its own bundle for the same product.
How the discount works
The discount is applied through a dynamic cart rule created on the fly for each cart (code DFBV-{bundle_id}-{cart_id}) and restricted to the bundle products only:
- It is only created when the full bundle is present in the cart — checked server-side.
- A percentage discount applies only to the bundle products, never to the rest of the cart.
- If the customer removes a bundle product, the discount is deleted automatically.
- On order validation, the rule is deactivated so it cannot be reused.
- On module uninstall, all generated rules are purged.
A percentage discount stacks on top of any specific prices: the calculation starts from the price displayed to the customer. Check your margins if you combine catalog promotions with a bundle discount.
Automatic suggestions
When no active manual bundle exists for the viewed product and the option is enabled, the module analyses product co-occurrence in your valid orders over the configured window, then displays the most frequent combinations that meet the co-purchase threshold. Out-of-stock products are excluded. The result is cached to preserve performance. No discount is applied on automatic suggestions: discounts are reserved for manual bundles.
Statistics
The Catalog > Visual bundles list shows, for each bundle, its views (block displays) and conversions (full additions to the cart). Automatic suggestions are counted globally. Use these figures to fine-tune compositions and discounts.
Troubleshooting
- The block does not appear: check the module is enabled, an active bundle exists for the product (or automatic suggestions are enabled with enough history), and the chosen hook is present in your theme.
- The discount does not show: it is only created when all bundle products are in the cart. Also check the discount type is not “No discount”.
- No automatic suggestions: lower the minimum co-purchase threshold or widen the history window; valid orders containing the products together are required.
- Products with combinations: the default combination is used when adding to the cart, with stock checks.