atrr option translation

This commit is contained in:
merdan 2022-05-14 19:57:59 +05:00
parent c30ef712d3
commit 2081122fd0
1 changed files with 1 additions and 1 deletions

View File

@ -953,7 +953,7 @@ class ProductRepository extends WProductRepository
$option = $this->optionRepository->findOneWhere(['attribute_id'=>$attribute_id,'admin_name'=>$value]);
if(! $option){
$option =$this->optionRepository->create(['attribute_id'=>$attribute_id,'admin_name'=>$value]);
$option =$this->optionRepository->create(['attribute_id'=>$attribute_id,'admin_name'=>$value,'sort_order'=>1000]);
$this->optionTranslationRepository->create(['attribute_option_id'=>$option->id,'label'=>$value,'locale'=>'tm']);
}