From 1ce7877afa1d02aa1e3afe6de1113ef0178e3c18 Mon Sep 17 00:00:00 2001 From: kaioken Date: Mon, 23 Dec 2024 21:17:15 -0400 Subject: [PATCH] refact: slugyfi --- src/Domains/Connectors/ESim/Services/ESimProductService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Domains/Connectors/ESim/Services/ESimProductService.php b/src/Domains/Connectors/ESim/Services/ESimProductService.php index d2a0b44f7..3a235d4be 100644 --- a/src/Domains/Connectors/ESim/Services/ESimProductService.php +++ b/src/Domains/Connectors/ESim/Services/ESimProductService.php @@ -265,8 +265,9 @@ protected function mapVariant($destination, array $plans): array ]; $price = number_format($variantByPriceRange['public_price'], 2, '.', ''); - $sku = $variant['sku'] . '-' . $variantByPriceRange['days']; + $sku = Str::simpleSlug($variant['sku'] . '-' . $variantByPriceRange['days']); $sourceId = $variant['id'] . '-' . $variantByPriceRange['days']; + $productVariants[] = [ 'name' => $variantName . ' ' . $variantByPriceRange['days'], 'description' => $variantName . ' ' . $variantByPriceRange['days'],