VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: coolmango on September 18, 2018, 06:23:00 AM

Title: Registered Shoppers and specific Shopper Groups
Post by: coolmango on September 18, 2018, 06:23:00 AM
Hi Guys

I have three shopper groups:

What I need to happen is:

Guest can buy straight away using billing/shipping details without being registered as a member. (Currently as soon as a Guest fills in Billing/Shipping info they become a registered member.)

Registered Member is registered after filling in details, is placed into the Registered Members shopper group, and can buy straight away.

Wholesaler is registered after filling in details, is placed into the Registered Members shopper group, and can buy straight away, but needs to wait for manual approval from Vendor before being given access to the Wholesalers shopper group.

My questions:

Thanks in advance for any help!
8)

---> using Joomla 3.8.12 & Virtuemart 3 <---
Title: Re: Registered Shoppers and specific Shopper Groups
Post by: AH on September 18, 2018, 10:28:54 AM
What you describe is exactly what VM supports natively

Guest shoppers are exactly that - they are guest and have not logged in
Registered are part of the - Default shoppergroup

To support wholesalers - Create a new shoppergroup/s for various wholesaler types if needed or just one for all wholesalers

Then you decide how you want to handle discounts for products
By Product - using specific price per shoppergroup
By Category - using calculation rules


Title: Re: Registered Shoppers and specific Shopper Groups
Post by: Studio 42 on September 18, 2018, 15:23:17 PM
You simply need to edit virtuemart user and change the shoppergroup. Of course as explained by AH, you have to create this shoppergroup before and add price rules for this group if needed
Title: Re: Registered Shoppers and specific Shopper Groups
Post by: coolmango on September 18, 2018, 15:24:50 PM
 ??? Not exactly...and that didn't really answer my questions. Maybe I need to try and explain this again...

1) How do I keep the Guest shopper from being a fully registered member?

The Guest shopper sees the Default shopper group. No problems there. However, as soon as the Guest shopper fills in Billing/Shipping info for a purchase, the system makes them a Registered Member. I would prefer for the Guest to remain a Guest.

2) How do I make Registered shoppers automatically fall into the Registered Members shopper group?

When a Guest chooses to become a Registered Member, they should have access to the Registered Members shopper group (not the Default shopper group), but the registration process leaves the Registered Member in the Default shopper group. Currently this has to be manually done. I am asking if there is a way to have the system do it automatically upon registration.

3) Is it possible to have additional shopper fields show only to approved Wholesalers?

Once a Registered Member is approved as a Wholesaler, they are manually moved into the Wholesale shopper group. No problems there. However, there are a few extra fields of information related to Wholesalers. Is it possible to have shopper fields that will show only in the account details for Wholesalers?



Thanks in advance  8)

Title: Re: Registered Shoppers and specific Shopper Groups
Post by: Studio 42 on September 18, 2018, 17:08:33 PM
In virtuemart oyou have 2 groups : Guest Shopper Group & Default shopper Group
Guest Shopper Group is if you are not logged in
Default shopper Group is when you are logged in only, so i really dont understand what you try to explain because you can set price rules per shopper groups ?
Title: Re: Registered Shoppers and specific Shopper Groups
Post by: GJC Web Design on September 18, 2018, 17:31:02 PM
Quoteas soon as the Guest shopper fills in Billing/Shipping info for a purchase, the system makes them a Registered Member. I would prefer for the Guest to remain a Guest.

incorrect --  select registration not required in admin

QuoteIs it possible to have shopper fields that will show only in the account details for Wholesalers?

you can do this with code in the template

if (member of Wholesalers) { show these fields}
Title: Re: Registered Shoppers and specific Shopper Groups
Post by: coolmango on September 19, 2018, 04:31:34 AM
QuoteIn virtuemart you have 2 groups : Guest Shopper Group & Default shopper Group

Studio 42, thanks, I did not realise that was how the default Guest Shopper Group & Default Shopper Group worked, and had created additional shopper groups. I'll switch to using the default settings as you've suggested.


GJC Web Design:
Quoteselect registration not required in admin

I'll check the settings!

Quoteyou can do this with code in the template

Thanks. That will work. Do you know the code for calling the shopper group into the template?

Title: Re: Registered Shoppers and specific Shopper Groups
Post by: GJC Web Design on September 19, 2018, 10:33:29 AM
$userModel = VmModel::getModel('user');
$vmuser = $userModel->getCurrentUser();
$vmgroup = $vmuser->shopper_groups;
//is an array