diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index dc8a452f8..5d06c53b3 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -8,6 +8,7 @@ use Illuminate\Support\Facades\DB; use Intervention\Image\Facades\Image; use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface; use Anomaly\Streams\Platform\Entry\EntryRepository; +use Visiosoft\AdvsModule\Support\Command\Currency; use Visiosoft\CatsModule\Category\CategoryModel; use Visiosoft\LocationModule\City\CityModel; use Visiosoft\LocationModule\Country\CountryModel; @@ -419,6 +420,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface foreach ($ads as $index => $ad) { $ads[$index]->detail_url = $this->model->getAdvDetailLinkByModel($ad, 'list'); + $ads[$index]->currency_price = app(Currency::class)->format($ad->price,$ad->currency); $ads[$index] = $this->model->AddAdsDefaultCoverImage($ad); } diff --git a/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php b/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php index c66b4ace5..c6ac433b9 100644 --- a/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php +++ b/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php @@ -1,12 +1,16 @@ call(AdvsModuleNotificationsTemplateSeeder::class); + $this->call(StatusSeeder::class); } } \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/src/Notifications/AdvsModuleNotificationsTemplateSeeder.php b/addons/default/visiosoft/advs-module/src/Notifications/AdvsModuleNotificationsTemplateSeeder.php new file mode 100644 index 000000000..cea3385f8 --- /dev/null +++ b/addons/default/visiosoft/advs-module/src/Notifications/AdvsModuleNotificationsTemplateSeeder.php @@ -0,0 +1,76 @@ + [ + 'message' => '
Your post {name} has been created successfully.
', + 'name' => 'Created Ad', + 'greeting' => 'Hi', + 'subject' => 'Created Ad' + ], + 'stream' => 'advs', + 'slug' => Str::slug('Created Ad', '_') + ], + [ + 'en' => [ + 'message' => 'Your ad for{name}has been approved.
', + 'name' => 'Approved Ad', + 'greeting' => 'Hi', + 'subject' => 'Approved Ad' + ], + 'stream' => 'advs', + 'slug' => Str::slug('Approved Ad', '_') + ], + [ + 'en' => [ + 'message' => 'Your {name}ad was rejected because it does not comply with the posting rules.
', + 'name' => 'Declined Ad', + 'greeting' => 'Hi', + 'subject' => 'Declined Ad' + ], + 'stream' => 'advs', + 'slug' => Str::slug('Declined Ad', '_') + ], + [ + 'en' => [ + 'message' => 'You must confirm your {name}posting to be published.
', + 'name' => 'Pending User Ad', + 'greeting' => 'Hi', + 'subject' => 'Pending User Ad' + ], + 'stream' => 'advs', + 'slug' => Str::slug('Pending User Ad', '_') + ], + [ + 'en' => [ + 'message' => 'Your {name} post is checked by our editors.
', + 'name' => 'Pending Ad', + 'greeting' => 'Hi', + 'subject' => 'Pending Ad' + ], + 'stream' => 'advs', + 'slug' => Str::slug('Pending Ad', '_') + ] + ]; + + foreach ($templates as $template) { + $this->dispatchNow(new CreateTemplate($template)); + } + + } + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/en/message.php b/addons/default/visiosoft/base-theme/resources/lang/en/message.php index 23a331087..189d050b1 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/en/message.php +++ b/addons/default/visiosoft/base-theme/resources/lang/en/message.php @@ -3,4 +3,5 @@ return [ 'send_forgot_sms' => 'SMS sent to your registered phone. Please check.', 'found_phone' => 'The phone number registered in the system was not found.', + 'error_mail' => 'Your transaction was completed successfully, but the notification e-mail could not be sent.', ]; diff --git a/addons/default/visiosoft/base-theme/resources/lang/tr/message.php b/addons/default/visiosoft/base-theme/resources/lang/tr/message.php index 85c2610f5..5dc404af4 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/tr/message.php +++ b/addons/default/visiosoft/base-theme/resources/lang/tr/message.php @@ -3,4 +3,5 @@ return [ 'send_forgot_sms' => 'Kayıtlı telefonunuza SMS gönderildi. Lütfen kontrol edin.', 'found_phone' => 'Sistemde kayıtlı olan telefon numarası bulunamadı.', + 'error_mail' => 'İşleminiz başarıyla gerçekleştirildi.Ancak bilgilendirme maili gönderilemedi.', ]; diff --git a/addons/default/visiosoft/profile-module/src/Notifications/ProfileModuleNotificationsTemplateSeeder.php b/addons/default/visiosoft/profile-module/src/Notifications/ProfileModuleNotificationsTemplateSeeder.php new file mode 100644 index 000000000..d96e191d7 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Notifications/ProfileModuleNotificationsTemplateSeeder.php @@ -0,0 +1,158 @@ + [ + 'message' => 'Your membership is activated.
Email:{email}
+
|
+
+
|
+
Your password has been changed
', + 'name' => 'Password Changed', + 'greeting' => 'Hi', + 'subject' => 'Password changed' + ], + 'stream' => 'users', + 'slug' => 'password_changed' + ], + + ]; + + foreach ($templates as $template) { + $this->dispatchNow(new CreateTemplate($template)); + } + } + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php b/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php index 5cf9c9fed..ed838d67f 100644 --- a/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php +++ b/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php @@ -2,12 +2,16 @@ use Anomaly\Streams\Platform\Database\Seeder\Seeder; use Visiosoft\ProfileModule\Education\EducationSeeder; +use Visiosoft\ProfileModule\Notifications\ProfileModuleNotificationsTemplateSeeder; use Visiosoft\ProfileModule\Seed\UsersFieldsSeeder; class ProfileModuleSeeder extends Seeder { public function run() { + //Notifications Template Seeder + $this->call(ProfileModuleNotificationsTemplateSeeder::class); + // Users Fields Seeder $this->call(UsersFieldsSeeder::class); diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index 55f172d0f..ecd41f005 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -9,6 +9,7 @@ use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; +use Swift_TransportException; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Throwable; @@ -86,7 +87,6 @@ class ExceptionHandler extends Handler public function report(Exception $e) { - if (app()->bound('sentry') && $this->shouldReport($e) && env('SENTRY_LARAVEL_DSN')) { @@ -95,6 +95,10 @@ class ExceptionHandler extends Handler } } + if ($e instanceof Swift_TransportException) { + die(trans('visiosoft.theme.base::message.error_mail')); + } + parent::report($e); }