darfil Posted February 16, 2010 Share Posted February 16, 2010 hi,I need to costumize prestashop for downloadable products. After the customer click "add to cart", this button must be disabled, because the customer can't buy the same product 2 times.Can you help me? Link to comment Share on other sites More sharing options...
darfil Posted February 17, 2010 Author Share Posted February 17, 2010 any ideas? Link to comment Share on other sites More sharing options...
rocky Posted February 18, 2010 Share Posted February 18, 2010 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. 1 Link to comment Share on other sites More sharing options...
BlooMort Posted February 19, 2012 Share Posted February 19, 2012 This works thanks. Link to comment Share on other sites More sharing options...
Kerm Posted February 19, 2012 Share Posted February 19, 2012 But other customer can't buy same product too.. Link to comment Share on other sites More sharing options...
Recommended Posts