From 2006da4a962a6ced4030f7b9561cc7f9c2a87338 Mon Sep 17 00:00:00 2001 From: Diatrex Date: Thu, 12 Nov 2020 17:19:10 +0300 Subject: [PATCH] =?UTF-8?q?#2647=20emlak24=20yap=C4=B1lacaklar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/config/settings/sections.php | 1 + .../resources/config/settings/settings.php | 7 +++++++ .../advs-module/resources/lang/en/setting.php | 3 +++ .../resources/views/list/partials/ads.twig | 12 +++++++----- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php index c53abdfbd..75de1d0be 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -23,6 +23,7 @@ return [ 'latest-limit', 'popular_ads_limit', 'default_view_type', + 'hide_listing_standard_price', 'hide_zero_price', 'auto_approve', 'estimated_pending_time', diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php index a4a114634..7ef868ffe 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -146,6 +146,13 @@ return [ 'mode' => 'checkbox' ] ], + 'hide_listing_standard_price' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + 'mode' => 'checkbox' + ] + ], 'enabled_currencies' => [ 'bind' => 'streams::currencies.enabled', 'env' => 'ADV_ENABLED_CURRENCIES', diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index 42f7059d0..56e9cf779 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -111,6 +111,9 @@ return [ 'name' => 'Make Map Required', 'instructions' => 'Require the user to place a pin on the map when creating an ad', ], + 'hide_listing_standard_price' => [ + 'name' => 'Hide Listing Standard Price', + ], 'enabled_currencies' => [ 'name' => 'Enabled Currencies', ], diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig index 0025fb8f8..4c2b43593 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig @@ -21,11 +21,13 @@
-

- {{ adv.standard_price != adv.price and adv.standard_price != '0' - ? adv.standard_price.currency() - : '' }} -

+ {% if not setting_value('visiosoft.module.advs::hide_listing_standard_price') %} +

+ {{ adv.standard_price != adv.price and adv.standard_price != '0' + ? adv.standard_price.currency() + : '' }} +

+ {% endif %} {{ adv.price != '0' ? adv.price.currency() : trans('visiosoft.module.advs::field.free') }}