Hotfix: Correctly parsing shopify's url handle
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "boboko/core",
|
"name": "boboko/core",
|
||||||
"description": "Core module — authentication and shared panel behaviour",
|
"description": "Core module — authentication and shared panel behaviour",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Modules\\Core\\": "src/"
|
"Modules\\Core\\": "src/"
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ use Illuminate\Support\Facades\Log;
|
|||||||
use Lunar\Models\Collection;
|
use Lunar\Models\Collection;
|
||||||
use Lunar\Models\CollectionGroup;
|
use Lunar\Models\CollectionGroup;
|
||||||
use Lunar\Models\Currency;
|
use Lunar\Models\Currency;
|
||||||
|
use Lunar\Models\Language;
|
||||||
use Lunar\Models\Product;
|
use Lunar\Models\Product;
|
||||||
use Lunar\Models\ProductVariant;
|
use Lunar\Models\ProductVariant;
|
||||||
|
use Lunar\Models\Url;
|
||||||
use Modules\Core\MigrateImport\ImportSpec;
|
use Modules\Core\MigrateImport\ImportSpec;
|
||||||
use Modules\Core\MigrateImport\Importer;
|
use Modules\Core\MigrateImport\Importer;
|
||||||
use Modules\Core\MigrateImport\Models\ImportMapping;
|
use Modules\Core\MigrateImport\Models\ImportMapping;
|
||||||
@@ -91,6 +93,18 @@ class ShopifyExportImporter implements Importer
|
|||||||
|
|
||||||
ImportMapping::record(self::SOURCE, 'product', $group->handle, $product);
|
ImportMapping::record(self::SOURCE, 'product', $group->handle, $product);
|
||||||
|
|
||||||
|
Url::updateOrCreate(
|
||||||
|
[
|
||||||
|
'element_type' => $product->getMorphClass(),
|
||||||
|
'element_id' => $product->id,
|
||||||
|
'language_id' => Language::getDefault()->id,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'slug' => $group->handle,
|
||||||
|
'default' => true,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
$this->tagResolver->resolve($product, $row['Tags'] ?? null);
|
$this->tagResolver->resolve($product, $row['Tags'] ?? null);
|
||||||
$this->collectionResolver->resolve($product, $collectionGroup, $row['Product Category'] ?? null);
|
$this->collectionResolver->resolve($product, $collectionGroup, $row['Product Category'] ?? null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user