product update finish for tesrt

This commit is contained in:
merdan 2022-04-13 17:04:02 +05:00
parent 0d7f2d13f3
commit 7ec10efb86
1 changed files with 12 additions and 6 deletions

View File

@ -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);
}
}