Also Purchased Turbo - support thread
Also Purchased Turbo is a new encapsulated plugin that replaces the stock "Customers who bought this product also purchased" engine with a precomputed product-pair table.
The stock module runs an orders_products self-join on every product page view. The cost grows with order history and product popularity, and on large stores it's often the most expensive query in the slow-query log. This plugin does that work once - a checkout observer keeps a small pair table current in real time, and product pages read it with an indexed primary-key lookup instead.
In testing, the also-purchased query ran roughly 260x faster (96 ms down to under 1 ms on the store's most popular product), and the gain grows with store size. As a bonus, recommendations are ranked by real purchase affinity - the products most often actually bought together - with Recency and Random modes available.
Highlights:
- No core file changes, no template changes - your existing also-purchased presentation is preserved
- Installs via Plugin Manager; a chunked, resumable seeding tool builds the pair table from your existing order history
- Honors the standard display settings (min/max/columns)
- Customized template modules are detected and never overwritten - the readme covers a one-click takeover or a small integration edit that keeps your custom rendering
- Admin pages under Configuration and Tools (status, seeding, maintenance, debug log)
Requires Zen Cart 2.2.2 or later.
Download and source: https://github.com/CcMarc/AlsoPurchasedTurbo
(Plugin library listing pending approval.)
Credit where due: the idea came out of balihr's "also purchased - optimization idea" thread in General Questions.
Feedback welcome - especially from larger stores. If you try it, before/after numbers from your slow-query log would be great to see in this thread.
marcopolo
Zen Cart 2.2.2 | PHP 8.5.8 | MariaDB 10.11.14