diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index c3d5d3886..c74685f36 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -704,14 +704,20 @@ class ProductRepository extends WProductRepository $attr['channel'] = config('app.channel'); } - if ($attribute->value_per_locale){ - foreach (core()->getAllLocales() as $locale){ - $attr['locale'] = $locale->code; + try { + if ($attribute->value_per_locale){ + foreach (core()->getAllLocales() as $locale){ + $attr['locale'] = $locale->code; + $this->attributeValueRepository->create($attr); + } + + }else{ $this->attributeValueRepository->create($attr); } - - }else{ - $this->attributeValueRepository->create($attr); + } + catch(\Exception $ex){ + Log::info($attr); + Log::info($attribute); } }