Skip to content

Commit

Permalink
Merge branch 'feature/fix-saleschannelgroup-demo-data' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
24198 committed Dec 21, 2017
2 parents e8cc265 + cb3077a commit 6933cc1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadSalesChannelGroupData extends AbstractFixture implements DependentFixt
'channels' => [
'sales_channel_us_webshop'
]
],
]
];

/**
Expand Down Expand Up @@ -67,14 +67,14 @@ protected function loadSalesChannelGroups()
->setDescription(sprintf('%s for %s organization', $values['description'], $organization->getName()))
->setSystem($values['system'])
->setOrganization($organization);
$this->addSalesChannels($group, $values['channels']);

$this->setReference($values['name'], $group);
$this->manager->persist($group);

$this->addSalesChannels($group, $values['channels']);
$this->createWarehouseChannelGroupLink($group);
$this->setReference($values['name'], $group);
}

$this->manager->flush();

}

/**
Expand Down Expand Up @@ -115,6 +115,7 @@ private function addSalesChannels(SalesChannelGroup $group, $channelCodes)
/** @var SalesChannel $channel */
$group->addSalesChannel($channel);
}
$this->manager->flush();
}

/**
Expand Down

0 comments on commit 6933cc1

Please sign in to comment.