fix bug with fetching ru,en product names
This commit is contained in:
parent
2efb58738c
commit
291a1a23ed
|
|
@ -71,10 +71,12 @@ class OfferForm extends ComponentBase
|
|||
|
||||
$product_en = DB::table('rainlab_translate_attributes')
|
||||
->where('model_id',$product->id)
|
||||
->where('model_type', 'TPS\Birzha\Models\Product')
|
||||
->where('locale','en')->first();
|
||||
|
||||
$product_ru = DB::table('rainlab_translate_attributes')
|
||||
->where('model_id',$product->id)
|
||||
->where('model_type', 'TPS\Birzha\Models\Product')
|
||||
->where('locale','ru')->first();
|
||||
|
||||
|
||||
|
|
@ -170,7 +172,7 @@ class OfferForm extends ComponentBase
|
|||
];
|
||||
$this->validateFileType($data, $rules);
|
||||
|
||||
// seaparate validation for image size
|
||||
// separate validation for image size
|
||||
$rules = [
|
||||
'new_img.*' => 'max:1024'
|
||||
];
|
||||
|
|
@ -218,7 +220,7 @@ class OfferForm extends ComponentBase
|
|||
DB::table('system_files')->insert($insertionArray);
|
||||
}
|
||||
else { //completely new product
|
||||
// seaprate validation for image requirement
|
||||
// separate validation for image requirement
|
||||
$rules = [
|
||||
'new_img' => 'required'
|
||||
];
|
||||
|
|
@ -231,6 +233,8 @@ class OfferForm extends ComponentBase
|
|||
}
|
||||
}
|
||||
|
||||
// $this->page['draft_offers'] = \Auth::user()->offers()->where('status','draft')->get();
|
||||
|
||||
return [
|
||||
'#form-steps' => $this->renderPartial('@basket')
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue