Jump to content

disable "add to cart" if product is in the cart


Recommended Posts

I suggest setting the quantity of the downloadable products to 1 and then {* commenting out *} everything but the return true; in the updateQuantity function in classes/Product.php. Make sure that under Preferences > Products, you have "Allow ordering of out-of-stock products" set to "No". This will make it so that the customer can only add the product once since there is only one item in stock, and the quantity is not deducted when the downloadable product is purchased. This won't work if you are selling non-downloadable products too though. In that case, you'll need to modify the updateQuantity function to check whether the product is virtual before decided to not subtract the quantity.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...