The buyer collected the cart, proceeded to checkout, but saw the notification “Out of stock” or “Only 2 pcs available. out of 10". In basic OpenCart this is a dead end - the client goes to competitors.
My module seamlessly solves this problem, connects on top of the add-on Simple registration and order Simple (from deeman), offering to buy a similar product in one click, without leaving the checkout page.
[left]Demo site:https://oc23.ok-limonad.ru/ (for demonstration, add the product to your cart, go to checkout and enter a quantity greater than 500)
Smart Swap function: When you click on the “Add to cart” button of the proposed analogue, the module automatically recalculates the cart: leaves the available balance of the original (or removes the out-of-stock item) and adds the selected replacement.
Smart selection algorithm (No routine): The module itself searches for analogues based on the morphology of the name (cutting off junk words), category, brand, attribute matches and deltaprices.
Manual connections: For specific products, you can strictly set specific analogues through the admin panel - they will always be displayed first.
Built-in cart protection: If the buyer selects an analogue that has mandatory options (size, color), the module will not add it “blindly” (which would lead to a database error), but will carefully redirect the customer to the product card to select options.
Social Proof (Gamification): Optional badge output “X people chosen.” Increases conversion and trust in the analogue product. The algorithm uses pseudo-random numbers based on product ID and the number of real views(viewed) - the numbers look realistic and do not jump when the page is refreshed.
Own statistics: A statistics panel is available in the admin panel, which shows the real conversion of the module: how many analogues added and by what amount the module “saved” orders.
Technical part (HighLoad Friendly):
No N+1 queries: Search and scoring of analogues occurs at the database level (SQL math).
Caching: The results of heavy mathematical relevance calculations are cached. The base does not “lay down” even with a largeonline. The price and balances are always up to date and requested in real time.
PHP 8.x Ready: The code is written taking into account the strict typing of modern versions of PHP (there are no fatal errors when working with strings and arrays).
Security: AJAX handlers are protected from direct access and spam bots (checking REQUEST_METHOD and the presence of an active cart session).
Does not use IonCube. Open source, standard OCMOD.