In Cartthrob I would like to only allow the user to purchase one product on checkout. If a new product is added to the cart it replaces the one already in the cart. Any suggestions?
(I work at Vector Media Group; we make CartThrob).
Depending on your site and product setup, you may be able to do this by using a
clear_cart tag followed by an
add_to_cart tag. These may be able to be on the same template, which you send a person to to add to your cart, or have the empty redirect to the add. This method won't work for products where you need to pass around options and such though.
The more reliable method that would let you handle more complexity is a simple extension that fires on
add_to_cart. It can remove the old product when the new one is added. Feel free to contact us if you need help making that!