From 805ae4a49f1bff150ddba8e91b9d9f3ee2d6c3ed Mon Sep 17 00:00:00 2001 From: Diatrex Date: Tue, 15 Jun 2021 13:39:05 +0300 Subject: [PATCH 01/11] #4148 telescope saves every view --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6ea064e89..cd33fbb01 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,6 @@ "anomaly/settings-module": "~2.4.0", "anomaly/blocks-module": "~1.3.0", "anomaly/search-module": "~3.0.0", - "anomaly/system-module": "~1.1.0", "anomaly/users-module": "~2.5.0", "anomaly/pages-module": "~2.6.0", "anomaly/posts-module": "~2.6.0", @@ -74,6 +73,7 @@ "visiosoft/decimal-field_type": "~2.1.0", "visiosoft/integer-field_type": "~2.1.0", "visiosoft/list-field_type": "*", + "visiosoft/system-module": "~1.1.0", "wirelab/language_switcher-plugin": "^1.3", "visiosoft/addblock-extension": "^1.1", "maatwebsite/excel": "*", From 8c666fd49205e872f7159594f0c197875d96f9b8 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 15 Jun 2021 14:23:07 +0300 Subject: [PATCH 02/11] initial --- app/Exceptions/ExceptionHandler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index 9f3f95065..898f1e84b 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -2,6 +2,7 @@ namespace App\Exceptions; +use Anomaly\Streams\Platform\Exception\ExceptionIdentifier; use Swift_TransportException; use Throwable; use Illuminate\Support\Facades\Auth; From 88342891f61594a2ea82283e365a379dad9bc15e Mon Sep 17 00:00:00 2001 From: vedatakd Date: Wed, 16 Jun 2021 18:44:17 +0300 Subject: [PATCH 03/11] change stream name --- resources/streams/config/translate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/streams/config/translate.php b/resources/streams/config/translate.php index 41135f165..b5b671eec 100644 --- a/resources/streams/config/translate.php +++ b/resources/streams/config/translate.php @@ -3,5 +3,7 @@ return [ 'override' => [ 'Sümüklüböcek:Benzersiz İsim', + 'Blocks:Advertising Spaces', + 'Bloklar:Reklam Alanları', ], ]; \ No newline at end of file From 9c5c9d269be2e6da09a113427080cb9f60ec9823 Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Thu, 17 Jun 2021 12:54:31 +0300 Subject: [PATCH 04/11] #4177 --- addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index 967f96c48..9adb892c3 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -58,7 +58,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface $delimiter = '_'; $keyword = str_slug($param['keyword'], $delimiter); $query = $query->where(function ($query) use ($keyword) { - $query->where('advs_advs_translations.advs_desc', 'like', '%' . $keyword . '%') + $query->where('advs_advs_translations.advs_desc', 'like', $keyword) ->orWhere('slug', 'like', '%' . $keyword . '%') ->orWhere('advs_advs_translations.name', 'like', '%' . $keyword . '%'); }); From c5fd81b09fa318783ed96efba56e39dd8bf10484 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Fri, 18 Jun 2021 15:41:01 +0300 Subject: [PATCH 05/11] #4197 [advs-module] Categories breadcrumb not working --- .../advs-module/resources/views/list/partials/breadcrumb.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/breadcrumb.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/breadcrumb.twig index 3b54c0db7..141ae835f 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/breadcrumb.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/breadcrumb.twig @@ -7,7 +7,7 @@ - {{ addBlock('ads-list/partials/breadcrumb', {'mainCats': mainCats, 'category': categoryId})|raw }} + {{ addBlock('ads-list/partials/breadcrumb', {'mainCats': mainCats, 'category': category})|raw }} From bcf326c7671282bf3d5f009addfa697b79f047c8 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Fri, 18 Jun 2021 17:33:32 +0300 Subject: [PATCH 06/11] added attributes --- .../advs-module/src/Adv/AdvModel.php | 46 +++++++++++++++++-- .../advs-module/src/Adv/AdvRepository.php | 5 -- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php index b7227eda5..189e30026 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php @@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Visiosoft\AdvsModule\Adv\Contract\AdvInterface; use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel; +use Visiosoft\AdvsModule\Support\Command\Currency; use Visiosoft\LocationModule\City\CityModel; use Visiosoft\LocationModule\Country\CountryModel; use Visiosoft\CartsModule\Cart\Command\GetCart; @@ -17,6 +18,45 @@ use Visiosoft\LocationModule\Village\Contract\VillageRepositoryInterface; class AdvModel extends AdvsAdvsEntryModel implements AdvInterface { + protected $appends = [ + 'detail_url', + 'currency_price', + 'cat1_name', + 'cat2_name', + 'thumbnail', + ]; + + public function getDetailUrlAttribute() + { + return $this->getAdvDetailLinkByModel($this, 'list'); + } + + public function getCurrencyPriceAttribute() + { + return app(Currency::class)->format($this->price, $this->currency); + } + + public function getCat1NameAttribute() + { + return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first()->name; + + } + + public function getCat2NameAttribute() + { + return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first()->name; + + } + + public function getThumbnailAttribute() + { + if ($this->cover_photo == null) { + return $this->dispatch(new MakeImageInstance('visiosoft.theme.base::images/no-image.png', 'img'))->url(); + } else { + return url($this->cover_photo); + } + } + public function getTransNameAttribute() { if (is_null($this->name)) { @@ -278,12 +318,10 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface public function stockControl($id, $quantity) { - if($adv = $this->getAdv($id)) - { + if ($adv = $this->getAdv($id)) { $stock = $adv->stock; - if($stock and $stock >= $quantity) - { + if ($stock and $stock >= $quantity) { return 1; } } diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index 967f96c48..6ef80db7d 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -389,11 +389,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface $ads = $this->model->getLocationNames($latest_advs); - foreach ($ads as $index => $ad) { - $ads[$index]->detail_url = $this->model->getAdvDetailLinkByModel($ad, 'list'); - $ads[$index] = $this->model->AddAdsDefaultCoverImage($ad); - } - return $ads; } From 7b13d8f4fc6c3ff0b5ca816be7db85645525da0c Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Mon, 21 Jun 2021 09:52:33 +0300 Subject: [PATCH 07/11] =?UTF-8?q?#4230=20[sahibinden-theme]=20register=20b?= =?UTF-8?q?utton=20is=20not=20working=20=C4=B1n=20dutch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visiosoft/profile-module/resources/lang/nl/field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/default/visiosoft/profile-module/resources/lang/nl/field.php b/addons/default/visiosoft/profile-module/resources/lang/nl/field.php index c99219b3d..ac73ab874 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/nl/field.php +++ b/addons/default/visiosoft/profile-module/resources/lang/nl/field.php @@ -2,7 +2,7 @@ return [ 'file' => [ - 'name' => 'foto\\'s' + 'name' => 'foto\'s' ], 'first_name' => [ 'name' => 'Voornaam' From 160861329c7b945319d9bb9a9469fa2b5df03cb7 Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Mon, 21 Jun 2021 09:53:19 +0300 Subject: [PATCH 08/11] =?UTF-8?q?#4230=20[sahibinden-theme]=20register=20b?= =?UTF-8?q?utton=20is=20not=20working=20=C4=B1n=20dutch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2d6098803..6ea064e89 100644 --- a/composer.json +++ b/composer.json @@ -92,7 +92,8 @@ "filp/whoops": "~2.0", "fzaninotto/faker": "~1.4", "symfony/css-selector": "3.1.*", - "symfony/dom-crawler": "3.1.*" + "symfony/dom-crawler": "3.1.*", + "anomaly/installer-module": "~2.4.0" }, "repositories": [ { From 5adf53606ec607f88681384096c5def9db8e0867 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Mon, 21 Jun 2021 12:24:45 +0300 Subject: [PATCH 09/11] #3862 CSV ad import - Celep --- ...soft.module.advs__create_config_fields.php | 25 +++++++++++++++++++ .../resources/views/layouts/default.twig | 1 + 2 files changed, 26 insertions(+) create mode 100644 addons/default/visiosoft/advs-module/migrations/2021_06_21_114752_visiosoft.module.advs__create_config_fields.php diff --git a/addons/default/visiosoft/advs-module/migrations/2021_06_21_114752_visiosoft.module.advs__create_config_fields.php b/addons/default/visiosoft/advs-module/migrations/2021_06_21_114752_visiosoft.module.advs__create_config_fields.php new file mode 100644 index 000000000..02493c6c2 --- /dev/null +++ b/addons/default/visiosoft/advs-module/migrations/2021_06_21_114752_visiosoft.module.advs__create_config_fields.php @@ -0,0 +1,25 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('point', 'string'); + } + + protected $stream = [ + 'slug' => 'advs', + ]; + + protected $fields = [ + 'config' => 'visiosoft.field_type.json', + ]; + + protected $assignments = [ + 'config' + ]; +} diff --git a/addons/default/visiosoft/defaultadmin-theme/resources/views/layouts/default.twig b/addons/default/visiosoft/defaultadmin-theme/resources/views/layouts/default.twig index 4c0dbe7bb..e43e088b3 100644 --- a/addons/default/visiosoft/defaultadmin-theme/resources/views/layouts/default.twig +++ b/addons/default/visiosoft/defaultadmin-theme/resources/views/layouts/default.twig @@ -4,6 +4,7 @@ {% include "theme::partials/metadata" %} + {% block styles %}{% endblock %} Date: Mon, 21 Jun 2021 12:30:09 +0300 Subject: [PATCH 10/11] category relation --- .../visiosoft/advs-module/src/Adv/AdvModel.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php index 189e30026..8fd62f983 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php @@ -21,8 +21,8 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface protected $appends = [ 'detail_url', 'currency_price', - 'cat1_name', - 'cat2_name', + 'category1', + 'category2', 'thumbnail', ]; @@ -36,15 +36,15 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface return app(Currency::class)->format($this->price, $this->currency); } - public function getCat1NameAttribute() + public function getCategory1Attribute() { - return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first()->name; + return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first(); } - public function getCat2NameAttribute() + public function getCategory2Attribute() { - return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first()->name; + return $this->hasMany('Visiosoft\CatsModule\Category\CategoryModel', 'id', 'cat1')->first(); } From 1ce71411e1affe3c56ba6644715795fabbdff41a Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Tue, 22 Jun 2021 09:24:00 +0300 Subject: [PATCH 11/11] #4177 --- addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index 9adb892c3..2161d1fe6 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -58,8 +58,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface $delimiter = '_'; $keyword = str_slug($param['keyword'], $delimiter); $query = $query->where(function ($query) use ($keyword) { - $query->where('advs_advs_translations.advs_desc', 'like', $keyword) - ->orWhere('slug', 'like', '%' . $keyword . '%') + $query->where('slug', 'like', '%' . $keyword . '%') ->orWhere('advs_advs_translations.name', 'like', '%' . $keyword . '%'); }); }