News:

Support the VirtueMart project and become a member

Main Menu

Change Shopper Group for a population of users

Started by Philippe MARTY, May 27, 2020, 15:45:00 PM

Previous topic - Next topic

Philippe MARTY

Hello,
I have about 200 customers in a shop.
About 50 are in shopper group A and 75 others in group B
I need to move users from group B to group A
How can I do the job?
There is no batch tools in VM3 :(

I tried through phpmyadmin to do the move but I receive a 1062 error...

Here's the move I tried (group A is id=2 and group B id=5)
UPDATE XXXX_virtuemart_vmuser_shoppergroups
SET virtuemart_shoppergroup_id = 2
WHERE virtuemart_shoppergroup_id = 5


Here' the answer from server:
#1062 - Duplicate entry '769-2' for key 'virtuemart_user_id'

(some users belong to several groups)
Thanks for your help
Working with Joomla and making business with VirtueMart :)
http://www.atelier51.com

GJC Web Design

so some u tried to change must already be in SG 5

export all the users ids of  SG 2 and add a where NOT IN (## the ids ##)
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