Jump to content

Edit History

ps8modules

ps8modules

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

ps8modules

ps8modules

8 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 it in the Free modules section.

It is a job for a maximum of 30 minutes 🙂

obrazek.thumb.png.acdea5a3e537031bfcddb093fe27bb47.png

ps8modules

ps8modules

7 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 it in the Free modules section.

It is a job for a maximum of 30 minutes 🙂

 

×
×
  • Create New...