I'd have to sit down and write it more than likely ...![]()
You have to decide if:
1 product does not show once ordered (harder to do)
2 product is blocked from being added to the cart and message given saying failed
3 product just gives message No way ... No Checkout until you put it back
There are a lot of ways to do this ... I don't know what level of coding you can do ...
You might look at how the call for price is done and just switch the add to cart button ... but that does slow things down on a per product check for a previous order ...
You can look at the minimum/maximum/unit check is done and do a look up similar to that before adding to the cart ...
You need something to identify what the product(s) is/are that cannot be purchased more than once ...
You need something to check the orders_products table for products in orders for the customer to see what's been added ...
You need to decide what to do for customers not logged in ... as in what if they add 1 to cart that already is purchased then login?
So ... there are a lot of tests to be done here ... but you only want to test the specific products and not all products as that takes time on lists etc.
This is not to discourage you but to help you break down all the things you need to take into account to test can the customer buy the product ... and then decide how do you want to handle that ...



