News:

Support the VirtueMart project and become a member

Main Menu

Only allow a product to be purchased once by each user

Started by Ben_ce, June 15, 2018, 11:30:56 AM

Previous topic - Next topic

Ben_ce

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?


GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Ben_ce

So I assume Virtuemart doesn't have an option for this?

Jörgen

No this needs custom code.
Regards
Jörgen  @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Ben_ce

Well I thoguht this is a basic enough option to come with Virtuemart.

Thanks both of you for the answers!

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

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.