Skip to content

Commit

Permalink
Merge pull request #1960 in NEXT/platform from ntr/fix-customer-gener…
Browse files Browse the repository at this point in the history
…ator to master

* commit '8a3511c6ec2aab41d52977981b5e36c77967cd2b':
  NTR - Fix customer generator
  • Loading branch information
OliverSkroblin committed Apr 8, 2019
2 parents d81ef9a + 2ccdc8e commit 23932fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Framework/Demodata/Generator/CustomerGenerator.php
Expand Up @@ -97,6 +97,9 @@ private function createDefaultCustomer(Context $context): void
$shippingAddressId = Uuid::randomHex();
$billingAddressId = Uuid::randomHex();
$salutationId = Uuid::fromBytesToHex($this->getRandomSalutationId());
$countries = $this->connection
->executeQuery('SELECT id FROM country WHERE active = 1')
->fetchAll(FetchMode::COLUMN);

$customer = [
'id' => $id,
Expand All @@ -115,7 +118,7 @@ private function createDefaultCustomer(Context $context): void
[
'id' => $shippingAddressId,
'customerId' => $id,
'countryId' => 'ffe61e1c99154f9597014a310ab5482d',
'countryId' => Uuid::fromBytesToHex($countries[array_rand($countries)]),
'salutationId' => $salutationId,
'firstName' => 'Max',
'lastName' => 'Mustermann',
Expand All @@ -126,7 +129,7 @@ private function createDefaultCustomer(Context $context): void
[
'id' => $billingAddressId,
'customerId' => $id,
'countryId' => 'ffe61e1c99154f9597014a310ab5482d',
'countryId' => Uuid::fromBytesToHex($countries[array_rand($countries)]),
'salutationId' => $salutationId,
'firstName' => 'Max',
'lastName' => 'Mustermann',
Expand Down

0 comments on commit 23932fe

Please sign in to comment.