VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Guntchaa on September 20, 2021, 08:33:52 AM

Title: Mandatory VM3 registration only for certain products (or vice versa)
Post by: Guntchaa on September 20, 2021, 08:33:52 AM
Hi, in VM there is an option (configuration -> checkout) "Only registered users can checkout".
How to create a solution to make registration mandatory only for certain products?
Or vice versa (registration is not mandatory only for certain products)?
Why? Personalized LMS courses, unpersonalized gift cards.
I will also consider a custom development option.
(VM-3.8.8, J-3.9.28, VP-OPC-7.3, PHP-7.3)
Title: Re: Mandatory VM3 registration only for certain products (or vice versa)
Post by: GJC Web Design on September 20, 2021, 10:03:50 AM
make the courses only available to a shopper group that requires registration?
Title: Re: Mandatory VM3 registration only for certain products (or vice versa)
Post by: Studio 42 on September 20, 2021, 10:08:40 AM
You should allow all users, but restrict or allow checkout access for certain products with your own plugin
I never had this request, but it should be possible with a vmuserfied plugin or a Joomla system plugin
Title: Re: Mandatory VM3 registration only for certain products (or vice versa)
Post by: Guntchaa on December 11, 2021, 12:35:50 PM
Quote from: Studio 42 on September 20, 2021, 10:08:40 AM
You should allow all users, but restrict or allow checkout access for certain products with your own plugin
I never had this request, but it should be possible with a vmuserfied plugin or a Joomla system plugin
First of all, selling of gift cisards w/o user registration is priority, because any registered user takes up one LMS license also.
As I see this (as a customisation):
1) VM3 config values "On checkout, ask for registration" and "Only registered users can checkout" is checked in by default
2) every product should have custom field "only for registered users" (YES/NO);
3) somewhere we should add code "foreach product in cart check customfield"
4) If all products in cart do not have customfield/value "only for registered users=YES", VM3 config values "On checkout, ask for registration" and "Only registered users can checkout" can be rewrited / checked out for the current session and there is possibility to buy these products w/o registration.
Maybe there is someone here who can implement this project for a reasonable fee?