VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Ben_ce on June 15, 2018, 11:30:56 AM

Title: Only allow a product to be purchased once by each user
Post by: Ben_ce on June 15, 2018, 11:30:56 AM
I was wondering is it possible to make it so each product can only be purchased once by each user, and the product page wouldn't have the 'Add to Cart' option after the product was purchesd by them?

Title: Re: Only allow a product to be purchased once by each user
Post by: GJC Web Design on June 15, 2018, 14:27:44 PM
For a start u would need to make your links (add to cart) for registered users only

then once they are logged in a script to check if they have a confirmed order for this product .. if so don't show the add to cart
Title: Re: Only allow a product to be purchased once by each user
Post by: Ben_ce on June 15, 2018, 14:35:40 PM
So I assume Virtuemart doesn't have an option for this?
Title: Re: Only allow a product to be purchased once by each user
Post by: Jörgen on June 15, 2018, 14:58:10 PM
No this needs custom code.
Regards
Jörgen  @ Kreativ Fotografi
Title: Re: Only allow a product to be purchased once by each user
Post by: Ben_ce on June 15, 2018, 15:45:16 PM
Well I thoguht this is a basic enough option to come with Virtuemart.

Thanks both of you for the answers!
Title: Re: Only allow a product to be purchased once by each user
Post by: jenkinhill on June 15, 2018, 16:59:35 PM
This is most certainly not a basic option! 
Title: Re: Only allow a product to be purchased once by each user
Post by: Studio 42 on June 15, 2018, 21:18:11 PM
This need to be implemented by a filter,option or customfield, because this can be for the whole shop or only 1 product, some categories or manufacturer, can be for a period, only for some shopper groups or only for discounted product....
So this is not a so "basic" option but it's easy to do this with a customfield plugin if this is per product.