Merge pull request #1184 from openclassify/vedat

fix currency converter exception
This commit is contained in:
Fatih Alp 2021-10-04 12:18:29 +03:00 committed by GitHub
commit bc4bb2b34f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -33,4 +33,5 @@ return [
'status_change' => "Your Ad's Status Has Been Set to :status!",
'disabled_detailed_options_for_admin_role' => "Detailed product options are disabled.",
'permission_error' => 'You do not have permission for this action',
'currency_converter_not_available' => 'The currency converter is not available.',
];

View File

@ -33,4 +33,5 @@ return [
'status_change' => "İlanın durumu Ayarland :status !",
'disabled_detailed_options_for_admin_role' => "Ayrıntılı ürün seçenekleri devre dışı bırakıldı.",
'permission_error' => 'Bu işlem için yetkiniz bulunmamaktadır',
'currency_converter_not_available' => 'Para birimi çevirici kullanılamıyor.',
];

View File

@ -919,7 +919,11 @@ class AdvsController extends PublicController
if ($is_new_create) {
event(new CreatedAd($adv));
} else {
$this->adv_model->foreignCurrency($this->request->currency, $this->request->price, $this->request->update_id, $this->settings_repository, false);
try {
$this->adv_model->foreignCurrency($this->request->currency, $this->request->price, $this->request->update_id, $this->settings_repository, false);
} catch (\Exception $exception) {
$this->messages->error(trans('visiosoft.module.advs::message.currency_converter_not_available'));
}
event(new EditedAd($before_editing, $adv));
}
@ -1007,7 +1011,7 @@ class AdvsController extends PublicController
return $this->view->make(
'visiosoft.module.advs::new-ad/new-create',
compact('id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options', 'hidePrice','is_options', 'configurations')
compact('id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options', 'hidePrice', 'is_options', 'configurations')
);
}