File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ public function __construct(
84
84
public function import (array $ data )
85
85
{
86
86
$ actions = [
87
- ProcessorFactory::TYPE_DELETE ,
88
87
ProcessorFactory::TYPE_CREATE ,
88
+ ProcessorFactory::TYPE_DELETE ,
89
89
ProcessorFactory::TYPE_UPDATE
90
90
];
91
91
$ messages = ['Stores were processed ' ];
Original file line number Diff line number Diff line change @@ -125,15 +125,20 @@ public function run(array $data)
125
125
private function createWebsites (array $ items , array $ data )
126
126
{
127
127
foreach ($ items as $ websiteData ) {
128
- unset($ websiteData ['website_id ' ]);
128
+ $ groupId = $ websiteData ['default_group_id ' ];
129
+
130
+ unset(
131
+ $ websiteData ['website_id ' ],
132
+ $ websiteData ['default_group_id ' ]
133
+ );
129
134
130
135
$ website = $ this ->websiteFactory ->create ();
131
136
$ website ->setData ($ websiteData );
132
137
$ website ->getResource ()->save ($ website );
133
138
134
- $ website ->getResource ()->addCommitCallback (function () use ($ website , $ data ) {
139
+ $ website ->getResource ()->addCommitCallback (function () use ($ website , $ data, $ groupId ) {
135
140
$ website ->setDefaultGroupId (
136
- $ this ->detectGroupById ($ data , $ website -> getDefaultGroupId () )->getId ()
141
+ $ this ->detectGroupById ($ data , $ groupId )->getId ()
137
142
);
138
143
$ website ->getResource ()->save ($ website );
139
144
});
Original file line number Diff line number Diff line change 346
346
</argument >
347
347
</arguments >
348
348
</virtualType >
349
- <virtualType name =" scopesConfigInitialDataProvider" type =" Magento\Framework \App\Config\InitialConfigSource" >
349
+ <virtualType name =" scopesConfigInitialDataProvider" type =" Magento\Store \App\Config\InitialConfigSource" >
350
350
<arguments >
351
351
<argument name =" reader" xsi : type =" object" >Magento\Framework\App\DeploymentConfig\Reader</argument >
352
352
<argument name =" configType" xsi : type =" const" >Magento\Store\App\Config\Type\Scopes::CONFIG_TYPE</argument >
353
- <argument name =" fileKey" xsi : type =" const" >Magento\Framework\Config\File\ConfigFilePool::APP_CONFIG</argument >
354
353
</arguments >
355
354
</virtualType >
356
355
<type name =" Magento\Deploy\Console\Command\App\ApplicationDumpCommand" >
You can’t perform that action at this time.
0 commit comments