From b17573e25784c81a0a4b3aaabf137142fffa9b43 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Thu, 15 Apr 2021 14:50:30 +0300 Subject: [PATCH] cloudinary refactored --- .../advs-module/resources/views/new-ad/new-create.twig | 2 +- .../advs-module/src/Http/Controller/AdvsController.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig index dd6532f7f..d203ab172 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig @@ -208,7 +208,7 @@ - {% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields}) %} + {% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields,'id':id}) %} {% if other_fields or (custom_fields and count(custom_fields)) %}
{{ trans('visiosoft.module.advs::field.additional_fields') }} diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php index b93f7472c..94ba5af57 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php @@ -536,6 +536,9 @@ class AdvsController extends PublicController } $adv->video_url = null; + if ($this->adv_model->is_enabled('cloudinary')) { + $adv->video_url = app('Visiosoft\CloudinaryModule\Http\Controller\VideoController')->getVideoUrl($adv->id); + } $options = $this->optionRepository->findAllBy('adv_id', $id); @@ -846,7 +849,7 @@ class AdvsController extends PublicController $this->event->dispatch(new PriceChange($post)); //Cover Image URL - if ($this->request->url == "") { + if ($this->request->video_url == "") { $this->adv_repository->cover_image_update($adv); }