Jump to content

How to bulk update customers groups?


tomlyon

Recommended Posts

I mean for example. Say I have 100 customers and I add a customer group called 'Customer Group 1'. I now want 50 of these customers to have Customer Group 1 ticked but i'd have to go in to each customer and tick the group access. I'd like to be able to bulk update the group access.

 

 

Screenshot 2023-09-29 122650.png

Link to comment
Share on other sites

We will be adding this feature in our QuickUpdate Bulk Commander module, but it is not ready yet.

Updating this directly with SQL would not be advisable unless you (or someone who posts the code) know for sure all the tables that need to be updated for this action, otherwise it might damage you store setup.

 

Later edit: This functionality has been implemented in QuickUpdate, details in last post.

Edited by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

9 hours ago, tomlyon said:

Can you explain how to do this?

Thanks

 

In your module:

OLD ID group = 3

NEW ID GROUP = 4

TOP 50 CUSTOMERS

$db = Db::getInstance();
$getTopCustomers = $db->executeS('SELECT id_customer FROM '._DB_PREFIX_.'customer WHERE id_default_group = 3 ORDER BY id_customer ASC LIMIT 50');

foreach ($getTopCustomers as $c) {
    $customer = new Customer((int) $c['id_customer']);
    $customer->id_default_group = 4;
    $customer->addGroups(array(4));
    $customer->update();
}

Maybe today I'll find a moment and make a free module and put here.

It is a job for a maximum of 30 minutes 🙂

obrazek.thumb.png.acdea5a3e537031bfcddb093fe27bb47.png

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

Editing and moving customer groups FREE module for @tomlyon

Supported PS 1.6.1.14 > 8.x

 

The module settings are clear, there is no need to explain anything 😉

Module deleted !!

Because he didn't help the interviewer.

Please read carefully the readme.txt located in the module folder.

Edited by ps8moduly.cz (see edit history)
  • Thanks 1
Link to comment
Share on other sites

Thanks for making the module but this isn't actually what I was after.

I'd like to be able to add a customer to multiple access groups at once whilst still leaving the original access group (not changing from an old to new one).

For example if I create a new customer access group, i'd like to be able to add that group to selected customers on top of what they already have access to.

Does this make sense?

Thanks

Link to comment
Share on other sites

6 hours ago, tomlyon said:

Thanks for making the module but this isn't actually what I was after.

I'd like to be able to add a customer to multiple access groups at once whilst still leaving the original access group (not changing from an old to new one).

For example if I create a new customer access group, i'd like to be able to add that group to selected customers on top of what they already have access to.

Does this make sense?

Thanks

Hi.

I modified the module for your needs as you wrote.
The previous version of the module needs to be uninstalled and removed.
You have the modified version in the message.

Link to comment
Share on other sites

Hi there, thanks a lot for creating the module, however it doesn't serve the purpose required unfortunately.

I'd like to be able to select the customers and then add group access to the selected customers without removing any customer access groups. I'd like to select the customers in a list like the screenshot below. I'd then like to tick the customer access group to add to them. Does this make sense?

The module currently only allows me to select an old customer group and a new customer group.

Thanks

Tom

Screenshot 2023-10-05 143946.png

Link to comment
Share on other sites

3 hours ago, tomlyon said:

Hi there, thanks a lot for creating the module, however it doesn't serve the purpose required unfortunately.

I'd like to be able to select the customers and then add group access to the selected customers without removing any customer access groups. I'd like to select the customers in a list like the screenshot below. I'd then like to tick the customer access group to add to them. Does this make sense?

The module currently only allows me to select an old customer group and a new customer group.

Thanks

Tom

Screenshot 2023-10-05 143946.png

Hi.

The module filters the first 50 customers who are registered, active and in the old group.

It will add a new group to these selected customers.

The module does exactly what you wanted in the first post.

If you need something special, there is a Job forum.

https://www.prestashop.com/forums/forum/235-job-offers/

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

18 hours ago, QuickUpdate.net said:

@tomlyon Doesn't this example fit the use case you are looking for?

"Customers 1,2,3 already have access in Group 1 and Group 2. You want to create Group 3 and give Customers 1,2,3 access also to Group 3, correct?"

Exactly yes, but I'd like to be able to select each customer i want to add this group to.

Link to comment
Share on other sites

  • 2 weeks later...

I apologize for my pride and not sharing all the possibilities. You need to follow the Prestashop documentation. Although documentation is available for developers, it is insufficient. What I have learned for more than 10 years needs to be put to good use. I am not an employee of Prestashop and I am happy to help out of good will and without coercion, without claiming any creation of my own, if it is not related to the topic. I don't work for anyone for free.

I understand that you would need a functional solution, but as I wrote, I don't know how to solve your problem.

I'm not writing anything bad to your address, I'm just pointing out that it was only targeted p9moc for a specific user.

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

It's quite fair to apologize for the roughness towards me, and understand you can't help me about that case, but it could have been encountered by others as well and as a forum it means sharing and discussing first of all. If anyone is in that case, I could have some answers anyway.

Link to comment
Share on other sites

@Olivier33000 & @tomlyon

Hi - as mentioned previously on this thread we have integrated bulk updating of "Customer Groups" into our QuickUpdate suite (named QuickUpdate eCommerce Manager)

You can use this functionality (and many more) free for a limited amount of operations  - available at www.quickupdate.net, you need to download the connector module and set the api key and you are good to go and update your customer groups for free.

If you have questions let us know.

Link to comment
Share on other sites

@QuickUpdate.net

Thank you. I did a sql request to modify over 10 thousands of customers to change their default group (ps_customer), but I can't change the ID of group in ps_customer_group as it contains primary keys (receive a sql error). I think it could be feasible with a foreach loop instead. Does your module is able to make any change in ps_customer_group (not only changing default_group ID), and not duplicating customers as that module done (new customer) ? Also does it save and restore the old group, smart functionality by the way ?

Appreciate any help,

Thanks again

Link to comment
Share on other sites

QuickUpdate allows you to add customers to one or multiple groups as you need, you can change them whenever you want, the same with the default group.

Essentially you select the customers you want to modify and then select the groups you want to "add" to those customers, then you can modify the default group to any of the groups for those customers.

Attached is how the interface looks:

The first screenshot, selected customers on  the left and their groups on the right; select the group to add and click "+"  (Add) and the group in the dropdown is added to the selected customers - you can filter the customers by any field like: name, email, default group etc.

The second screen shows bulk updating of the default group for the selected customers.

Screenshot 2023-10-23 115608.png

Screenshot 2023-10-23 115942.png

Link to comment
Share on other sites

Thanks again, but I wanted to know if it was also possible to remove customers from an assigned group. As it is pretty simple (as I wrote) to mass change customers from default_group, but not mass change their group from ps_customer_group (UPDATE `ps_customer_group` SET `id_group`=X WHERE `id_group`=Y;).

Link to comment
Share on other sites

Yes - in QuickUpdate you can do all the operations eg. add/remove customers in groups  - in the first screenshot, instead of adding groups by clicking "+", you can select groups from the right side and click delete ("trash" icon) and those groups will be removed from the respective customers (or vice-versa depending how you see it).

Btw you are struggling to solve your issue with queries because of the falsely promoted idea that "you can solve it with a query" - the whole point of having modules is to facilitate a specific functionality that can be performed repeatedly.

Edited by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

  • 9 months later...

Hello everyone,

I need exactly this module that allows me to massively modify/update the group to which several customer accounts belong. Can you kindly give me the link of the module so I can download/buy it?

Thank you!

Link to comment
Share on other sites

Thanks for the quick reply, but I don't need a mass modifier of products (I already use a performing one), but a module that only deals with modifying the group of belonging of customers massively. I hope it is available, otherwise amen

Link to comment
Share on other sites

No worries, we have a huge number of very satisfied customers using our extremely performant module who achieved enormous time and cost savings with their stores - they are constantly increasing and you may also become one of them.

The QuickUpdate module is compatible with PS > v1.6x and if you have issues we offer support for fixing incompatibilities with your setup in case they are "caused" by the module.

Edited by QuickUpdate.net (see edit history)
Link to comment
Share on other sites

https://docs.prestashop-project.org/v.8-documentation/user-guide/configuring-shop/advanced-parameters/import

customers_import.csv

1.thumb.png.df485269346c8d5a5c8df772e78295e6.png

The built-in CSV import of customer information in the PrestaShop backend can support your needs. You only need to edit the CSV table according to the requirements of PrestaShop.
If you think editing the CSV table is a waste of time, you can also choose the module to export customer information, and then use the built-in CSV import of customer information in the PrestaShop backend to perfectly meet your needs.

 

https://addons.prestashop.com/en/data-import-export/49857-product-catalog-combination-customer-address-csv-export.html

[PrestaShop Modules] - Advanced CSV Export For 9-in-1(Product-Catalog-Combination-Customer-Address-Brand-Supplier-Aliases-Contact)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...