The OpenCart extension "Purchase Once" allows you to limit repeat purchases of the product by the customer. It is also possible to limit the quantity of each product in the cart to one copy (works when using a default shopping cart system).
The extension can be useful when selling digital products, when only one copy of the product is provided to one customer. Or in other cases when you need to make a one-time purchase of a product in the OpenCart system.
If the customer tries to buy again, the product will not be added to the cart and an error message will be displayed: "You have already purchased this product! Your order #1". Button "Add to cart" will be hidden on the pages of products that have already been purchased.
Module installation instructions:
Upload the module in the admin panel in the "Extensions" : "Install".
Go to the "Modifications" section and update the cache.
Go to the "Dashboard" section and update the template cache.
How to build a variable name or array key in Twig: attribute(context, 'var'~id), square brackets, the .() operator from Twig 3.15, interpolation, and OpenCart compatibility.
An analysis of OpenCart 4.2.x.x development plans: the switch to jQuery 4.0.0, changes to `oc_product_code`, a 15–20 MB reduction in the distribution size, and the module adaptation process.
Daniel Kerr has announced the static OpenCart 5 and the opencart.js project. We analyze the advantages and limitations of this concept, as well as the development of PHP branches 3.0, 4.1, and 4.2.