diff --git a/addons/default/visiosoft/advs-module/migrations/2018_11_09_100715_visiosoft.module.advs__create_custom_fields_stream.php b/addons/default/visiosoft/advs-module/migrations/2018_11_09_100715_visiosoft.module.advs__create_custom_fields_stream.php
deleted file mode 100644
index edfc7e82e..000000000
--- a/addons/default/visiosoft/advs-module/migrations/2018_11_09_100715_visiosoft.module.advs__create_custom_fields_stream.php
+++ /dev/null
@@ -1,42 +0,0 @@
- 'custom_fields',
- 'title_column' => 'name',
- 'translatable' => true,
- 'trashable' => false,
- 'searchable' => false,
- 'sortable' => false,
- ];
-
- /**
- * The stream assignments.
- *
- * @var array
- */
- protected $assignments = [
- 'parent_category',
- 'type',
- 'name' => [
- 'translatable' => true,
- 'required' => true,
- ],
- 'slug' => [
- 'unique' => true,
- 'required' => true,
- ],
- 'custom_field_select_options',
- 'description',
- ];
-
-}
diff --git a/addons/default/visiosoft/advs-module/migrations/2018_11_09_102550_visiosoft.module.advs__create_custom_field_advs_stream.php b/addons/default/visiosoft/advs-module/migrations/2018_11_09_102550_visiosoft.module.advs__create_custom_field_advs_stream.php
deleted file mode 100644
index c894ef8c6..000000000
--- a/addons/default/visiosoft/advs-module/migrations/2018_11_09_102550_visiosoft.module.advs__create_custom_field_advs_stream.php
+++ /dev/null
@@ -1,33 +0,0 @@
- 'custom_field_advs',
- 'translatable' => true,
- 'trashable' => false,
- 'searchable' => false,
- 'sortable' => false,
- ];
-
- /**
- * The stream assignments.
- *
- * @var array
- */
- protected $assignments = [
- 'parent_adv',
- 'custom_field_category',
- 'custom_field_value',
- 'custom_field_type'
- ];
-
-}
diff --git a/addons/default/visiosoft/advs-module/migrations/2018_12_24_094131_visiosoft.module.advs__create_cf_values_stream.php b/addons/default/visiosoft/advs-module/migrations/2018_12_24_094131_visiosoft.module.advs__create_cf_values_stream.php
deleted file mode 100644
index fafbdab3c..000000000
--- a/addons/default/visiosoft/advs-module/migrations/2018_12_24_094131_visiosoft.module.advs__create_cf_values_stream.php
+++ /dev/null
@@ -1,34 +0,0 @@
- 'cf_values',
- 'title_column' => 'value',
- 'translatable' => true,
- 'versionable' => false,
- 'trashable' => false,
- 'searchable' => false,
- 'sortable' => false,
- ];
-
- /**
- * The stream assignments.
- *
- * @var array
- */
- protected $assignments = [
- 'custom_field',
- 'value' => [
- 'translatable' => true
- ]
- ];
-}
diff --git a/addons/default/visiosoft/advs-module/resources/config/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings.php
index 7e530aa34..81c97ae19 100644
--- a/addons/default/visiosoft/advs-module/resources/config/settings.php
+++ b/addons/default/visiosoft/advs-module/resources/config/settings.php
@@ -7,61 +7,68 @@ use Visiosoft\LocationModule\Country\CountryModel;
return [
'site_address' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.site_address',
- 'env' => 'ADV_SITE_ADDRESS',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.site_address',
+ 'env' => 'ADV_SITE_ADDRESS',
'config' => [
'default_value' => 'visiosoft.com.tr',
'disabled' => true,
],
],
+ "favicon" => [
+ "type" => "anomaly.field_type.file",
+ "config" => [
+ "folders" => ['favicon'],
+ "mode" => "upload",
+ ]
+ ],
'auto_approve' => [
- 'type' => 'anomaly.field_type.boolean',
- 'bind' => 'adv.auto_approve',
- 'env' => 'ADV_AUTO_APPROVE',
+ 'type' => 'anomaly.field_type.boolean',
+ 'bind' => 'adv.auto_approve',
+ 'env' => 'ADV_AUTO_APPROVE',
'config' => [
'default_value' => true,
],
],
'default_published_time' => [
- 'type' => 'anomaly.field_type.integer',
- 'bind' => 'adv.default_published_time',
- 'env' => 'ADV_PUBLISH_TIME',
+ 'type' => 'anomaly.field_type.integer',
+ 'bind' => 'adv.default_published_time',
+ 'env' => 'ADV_PUBLISH_TIME',
'required' => true,
- 'config' => [
+ 'config' => [
'default_value' => 10,
],
],
'default_adv_limit' => [
- 'type' => 'anomaly.field_type.integer',
- 'bind' => 'adv.default_adv_limit',
- 'env' => 'ADV_LIMIT',
+ 'type' => 'anomaly.field_type.integer',
+ 'bind' => 'adv.default_adv_limit',
+ 'env' => 'ADV_LIMIT',
'required' => true,
- 'config' => [
+ 'config' => [
'default_value' => 15,
],
],
'address' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.address',
- 'env' => 'ADV_ADDRESS',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.address',
+ 'env' => 'ADV_ADDRESS',
'config' => [
'default_value' => 'Basaksehir Istanbul',
],
],
'phone' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.phone',
- 'env' => 'ADV_PHONE',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.phone',
+ 'env' => 'ADV_PHONE',
'config' => [
'default_value' => '212 555 55 55',
],
],
'iban_numbers' => [
- 'type' => 'anomaly.field_type.wysiwyg',
- 'bind' => 'adv.iban',
- 'env' => 'ADV_IBAN',
+ 'type' => 'anomaly.field_type.wysiwyg',
+ 'bind' => 'adv.iban',
+ 'env' => 'ADV_IBAN',
'config' => [
'default_value' => '
TR00 0000 0000 0000 0000 0000 00 ',
],
@@ -69,8 +76,8 @@ return [
'default_country' => [
'type' => 'anomaly.field_type.relationship',
- 'bind' => 'adv.default_country',
- 'env' => 'ADV_COUNTRY',
+ 'bind' => 'adv.default_country',
+ 'env' => 'ADV_COUNTRY',
'config' => [
'related' => CountryModel::class,
"default_value" => 212,
@@ -78,8 +85,8 @@ return [
],
'default_city' => [
'type' => 'anomaly.field_type.relationship',
- 'bind' => 'adv.default_city',
- 'env' => 'ADV_CITY',
+ 'bind' => 'adv.default_city',
+ 'env' => 'ADV_CITY',
'config' => [
'related' => LocationCitiesEntryModel::class,
"default_value" => 34,
@@ -87,8 +94,8 @@ return [
],
'default_district' => [
'type' => 'anomaly.field_type.relationship',
- 'bind' => 'adv.default_district',
- 'env' => 'ADV_DISTRICT',
+ 'bind' => 'adv.default_district',
+ 'env' => 'ADV_DISTRICT',
'config' => [
'related' => LocationDistrictsEntryModel::class,
"default_value" => 1091,
@@ -97,46 +104,46 @@ return [
'contact_mail' => [
- 'type' => 'anomaly.field_type.email',
- 'bind' => 'adv.contact_mail',
- 'env' => 'ADV_MAIL',
+ 'type' => 'anomaly.field_type.email',
+ 'bind' => 'adv.contact_mail',
+ 'env' => 'ADV_MAIL',
],
'google_map_key' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.google_map_key',
- 'env' => 'ADV_MAP_KEY',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.google_map_key',
+ 'env' => 'ADV_MAP_KEY',
'config' => [
'default_value' => 'AIzaSyCAGc0z8kg9rKGVy2FizFKoz0FoWWWzoGQ',
],
],
'google_statistic_code' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.google_statistic_code',
- 'env' => 'ADV_GOOGLE_STATISTIC_CODE',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.google_statistic_code',
+ 'env' => 'ADV_GOOGLE_STATISTIC_CODE',
'config' => [
'default_value' => '',
],
],
'map_coordinates_long' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.map_coordinates_long',
- 'env' => 'ADV_MAP_LONG',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.map_coordinates_long',
+ 'env' => 'ADV_MAP_LONG',
'config' => [
'default_value' => '28.74558607285155',
],
],
'map_coordinates_lat' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.map_coordinates_lat',
- 'env' => 'ADV_MAP_LAT',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.map_coordinates_lat',
+ 'env' => 'ADV_MAP_LAT',
'config' => [
'default_value' => '40.97817786299617',
],
],
'logo' => [
'type' => 'anomaly.field_type.file',
- 'bind' => 'adv.logo',
- 'env' => 'ADV_LOGO',
+ 'bind' => 'adv.logo',
+ 'env' => 'ADV_LOGO',
'config' => [
'folders' => ["images"],
'mode' => 'upload',
@@ -144,17 +151,17 @@ return [
],
'ogImage' => [
'type' => 'anomaly.field_type.file',
- 'bind' => 'adv.ogImage',
- 'env' => 'ADV_OG_IMAGE',
+ 'bind' => 'adv.ogImage',
+ 'env' => 'ADV_OG_IMAGE',
'config' => [
'folders' => ["images"],
'mode' => 'upload',
]
],
'currencies' => [
- "type" => "anomaly.field_type.checkboxes",
- 'bind' => 'adv.currencies',
- 'env' => 'ADV_CURRENCIES',
+ "type" => "anomaly.field_type.checkboxes",
+ 'bind' => 'adv.currencies',
+ 'env' => 'ADV_CURRENCIES',
'config' => [
"default_value" => 'a:1:{i:0;s:1:"0";}',
'options' => Config::get('streams::currencies.enabled')
@@ -162,69 +169,69 @@ return [
],
'free_currencyconverterapi_key' => [
"type" => "anomaly.field_type.text",
- 'bind' => 'adv.free_currencyconverterapi_key',
- 'env' => 'ADV_CURRENCY_CONVERT_API_KEY',
+ 'bind' => 'adv.free_currencyconverterapi_key',
+ 'env' => 'ADV_CURRENCY_CONVERT_API_KEY',
'config' => [
"default_value" => "1eea72940f3868c77420"
]
],
'default_currency' => [
- 'type' => 'anomaly.field_type.select',
- 'bind' => 'adv.default_currency',
- 'env' => 'ADV_CURRENCY',
- 'config' => [
- 'handler' => 'currencies',
+ 'type' => 'anomaly.field_type.select',
+ 'bind' => 'adv.default_currency',
+ 'env' => 'ADV_CURRENCY',
+ 'config' => [
+ 'handler' => 'currencies',
"default_value" => 'USD',
],
],
- 'default_GET' => [
- 'type' => 'anomaly.field_type.select',
- 'bind' => 'adv.default_GET',
- 'env' => 'ADV_GET',
- 'config' => [
+ 'default_GET' => [
+ 'type' => 'anomaly.field_type.select',
+ 'bind' => 'adv.default_GET',
+ 'env' => 'ADV_GET',
+ 'config' => [
'default_value' => 0,
- 'options' => [
- 0 => 'False',
- 1 => 'True',
+ 'options' => [
+ 0 => 'False',
+ 1 => 'True',
],
],
],
'twitter' => [
'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.twitter',
- 'env' => 'ADV_TWITTER',
+ 'bind' => 'adv.twitter',
+ 'env' => 'ADV_TWITTER',
'config' => [
'default_value' => '/twitter.com/visiosoft'
]
],
'facebook' => [
'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.facebook',
- 'env' => 'ADV_FACEBOOK',
+ 'bind' => 'adv.facebook',
+ 'env' => 'ADV_FACEBOOK',
'config' => [
'default_value' => '/facebook.com/visiosoft'
]
],
'youtube' => [
'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.youtube',
- 'env' => 'ADV_YOUTUBE',
+ 'bind' => 'adv.youtube',
+ 'env' => 'ADV_YOUTUBE',
'config' => [
'default_value' => '/youtube.com/visiosoft'
]
],
'google' => [
'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.google',
- 'env' => 'ADV_GOOGLE',
+ 'bind' => 'adv.google',
+ 'env' => 'ADV_GOOGLE',
'config' => [
'default_value' => '/plus.google.com/visiosoft'
]
],
'watermark_type' => [
- 'type' => 'anomaly.field_type.select',
- 'bind' => 'adv.watermark_type',
- 'env' => 'ADV_WATERMARK_TYPE',
+ 'type' => 'anomaly.field_type.select',
+ 'bind' => 'adv.watermark_type',
+ 'env' => 'ADV_WATERMARK_TYPE',
'required' => true,
'config' => [
'options' => ['image' => 'Image', 'text' => 'Text'],
@@ -232,22 +239,22 @@ return [
]
],
'watermark_text' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.watermark_text',
- 'env' => 'ADV_WATERMARK_TEXT',
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.watermark_text',
+ 'env' => 'ADV_WATERMARK_TEXT',
],
'watermark_image' => [
- 'type' => 'anomaly.field_type.file',
- 'bind' => 'adv.watermark_image',
- 'env' => 'ADV_WATERMARK_IMAGE',
- 'config' => [
+ 'type' => 'anomaly.field_type.file',
+ 'bind' => 'adv.watermark_image',
+ 'env' => 'ADV_WATERMARK_IMAGE',
+ 'config' => [
'default_value' => '',
],
],
'watermark_position' => [
- 'type' => 'anomaly.field_type.select',
- 'bind' => 'adv.watermark_position',
- 'env' => 'ADV_WATERMARK_POSITION',
+ 'type' => 'anomaly.field_type.select',
+ 'bind' => 'adv.watermark_position',
+ 'env' => 'ADV_WATERMARK_POSITION',
'required' => true,
'config' => [
'options' => ['top-right' => 'Top Right', 'top-left' => 'Top Left', 'bottom-right' => 'Bottom Right', 'bottom-left' => 'Bottom Left', 'center' => 'Middle'],
@@ -255,37 +262,37 @@ return [
]
],
'watermark_opacity' => [
- 'type' => 'anomaly.field_type.text',
- 'bind' => 'adv.watermark_opacity',
- 'env' => 'ADV_WATERMARK_OPACITY',
- 'config' => [
+ 'type' => 'anomaly.field_type.text',
+ 'bind' => 'adv.watermark_opacity',
+ 'env' => 'ADV_WATERMARK_OPACITY',
+ 'config' => [
'default_value' => '80',
],
],
'listing_page_image' => [
- 'type' => 'anomaly.field_type.file',
- 'bind' => 'adv.listing_page_image',
- 'env' => 'ADV_LISTING_PAGE_IMAGE',
+ 'type' => 'anomaly.field_type.file',
+ 'bind' => 'adv.listing_page_image',
+ 'env' => 'ADV_LISTING_PAGE_IMAGE',
'config' => [
'folders' => ["adv_listing_page"],
'mode' => 'upload',
]
],
- 'enabled_currencies' => [
- 'bind' => 'streams::currencies.enabled',
- 'env' => 'ADV_ENABLED_CURRENCIES',
- 'type' => 'anomaly.field_type.checkboxes',
+ 'enabled_currencies' => [
+ 'bind' => 'streams::currencies.enabled',
+ 'env' => 'ADV_ENABLED_CURRENCIES',
+ 'type' => 'anomaly.field_type.checkboxes',
'required' => true,
- 'config' => [
+ 'config' => [
'default_value' => function () {
return [config('streams::currencies.default')];
},
- 'options' => function () {
+ 'options' => function () {
$json = file_get_contents("https://openexchangerates.org/api/currencies.json");
$cur = array();
- foreach(json_decode($json, true) as $key => $value){
+ foreach (json_decode($json, true) as $key => $value) {
$cur[$key] = $value;
}
return $cur;
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 917fc7d39..6b89c2c6d 100644
--- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php
+++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php
@@ -16,6 +16,9 @@ return [
'phone' => [
'name' => 'Contact Phone',
],
+ 'favicon' => [
+ 'name' => 'Favicon',
+ ],
'contact_mail' => [
'name' => 'Contact Mail',
'warning' => 'Auto added sitename info @sitename ',
diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig b/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig
index ad7e07254..80729b3e0 100644
--- a/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig
+++ b/addons/default/visiosoft/advs-module/resources/views/advs/list-item.twig
@@ -35,25 +35,12 @@
-
- {% set advPhoto = '' %}
- {% if count(adv.files) == 0 %}
- {% set advPhoto = img('theme::images/no-image.png').url %}
-
- {% else %}
- {% for image in adv.getViewPhotoUrl %}
-
- {% if loop.index == 1 %}
- {% set advPhoto = image %}
- {% endif %}
- {% endfor %}
- {% endif %}
-
+ {% if blocks('ad-item-picture-block-area') is null %}
+ {% include "visiosoft.module.advs::advs/partials/blocks/ads-item-picture-block" %}
+ {% else %}
+ {{ blocks('ad-item-picture-block-area') }}
+ {% endif %}
@@ -62,169 +49,12 @@
{% if entries('advs').isEnabled('favs') %}
{% endif %}
-
{{ adv.title }}
-
- {{ adv.price.format() }} {{ adv.currency }}
- {% if app.auth.id == adv.created_by_id %}
-
- {{ trans('visiosoft.module.advs::field.edit') }}
- {% if adv.status != "pending_admin" and adv.status != "approved" %}
-
- {{ trans('visiosoft.module.advs::field.approve') }}
- {% else %}
-
- {{ trans('visiosoft.module.advs::field.passive') }}
- {% endif %}
+
+ {% if blocks('ad-item-details-block-area') is null %}
+ {% include "visiosoft.module.advs::advs/partials/blocks/ads-item-details-block" %}
+ {% else %}
+ {{ blocks('ad-item-details-block-area') }}
{% endif %}
-
-
-
- {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
-
-
-
-
-
-
-
-
- {{ trans('visiosoft.module.advs::field.quantity') }}
- {#Trans yapılacak#}
-
-
-
-
-
-
-
-
- {% endif %}
-
-
- {% if entries('advs').isEnabled('favs') %}
-
- {% endif %}
-
{{ trans('visiosoft.module.advs::field.offered_by') }}:
- {{ adv.owner }}
-
-
{{ trans('visiosoft.module.advs::field.ad_id') }}:
- {{ adv.id }}
-
-
-
-
-
-
- {% if entries('advs').isEnabled('comparisons') %}
- {% include "visiosoft.module.comparisons::comparebtn" %}
- {{ trans('visiosoft.module.comparisons::field.comparisonpagetitle') }}
- {% endif %}
-
-
- {% if(adv.video_url != null) %}
-
- {% endif %}
- {% if(profile.getObject().gsm_phone is not null or profile.office_phone is not null or entries('advs').isEnabled('messages')) %}
-
-
- {% endif %}
- {% if adv_detail_place_code %}
-
- {{ adv_detail_place_code }}
-
- {% endif %}
-
-
-
{{ trans('visiosoft.module.advs::field.share') }}
-
-
-
@@ -237,151 +67,18 @@
-
-
-
-
-
-
-
-
-
-
-
{{ trans('visiosoft.module.advs::field.description.name') }}
-
{{ adv.advs_desc|raw }}
-
-
- {% if features != null %}
- {% if entries('advs').isEnabled('customfields') %}
- {% include "visiosoft.module.customfields::list-item" %}
- {% endif %}
- {% endif %}
- {% if adv.map_Val != "" and setting_value('visiosoft.module.location::detail_page_location') %}
-
-
- {% if entries('advs').isEnabled('streetview') %}
-
- {% endif %}
-
- {% endif %}
- {% if entries('advs').isEnabled('comments') %}
- {% include "visiosoft.module.comments::comments" %}
- {% endif %}
-
- {% if entries('advs').isEnabled('pricehistory') %}
- {% include "visiosoft.module.pricehistory::content" %}
- {% endif %}
-
-
+ {% if blocks('ad-item-content-block-area') is null %}
+ {% include "visiosoft.module.advs::advs/partials/blocks/ads-item-content-block" %}
+ {% else %}
+ {{ blocks('ad-item-content-block-area') }}
+ {% endif %}
-
-
-
{{ trans('visiosoft.module.advs::field.recommended_ads') }}
-
-
- {% for advs in recommended_advs %}
-
-
-
+ {% if entries('advs').isEnabled('recommendedads') %}
+ {% include "visiosoft.module.recommendedads::recommended-ads" %}
+ {% endif %}
-
-
-
-
{{ advs.price.format() }} {{ advs.currency }}
-
-
-
-
-
-
-
- {% endfor %}
-
-
-
-
-
- {% if tags != null %}
-
-
{{ trans('visiosoft.module.advs::field.short_info') }}
-
-
-
- {% endif %}
-
-
- {{ blocks('list-item-right-sidebar') }}
-
-
-
-
-
-
diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-content-block.twig b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-content-block.twig
new file mode 100644
index 000000000..bd7e8d7ab
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-content-block.twig
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
{{ trans('visiosoft.module.advs::field.description.name') }}
+
{{ adv.advs_desc|raw }}
+
+
+ {% if features != null %}
+ {% if entries('advs').isEnabled('customfields') %}
+ {% include "visiosoft.module.customfields::list-item" %}
+ {% endif %}
+ {% endif %}
+ {% if adv.map_Val != "" and setting_value('visiosoft.module.location::detail_page_location') %}
+
+
+ {% if entries('advs').isEnabled('streetview') %}
+
+ {% endif %}
+
+ {% endif %}
+ {% if entries('advs').isEnabled('comments') %}
+ {% include "visiosoft.module.comments::comments" %}
+ {% endif %}
+
+ {% if entries('advs').isEnabled('pricehistory') %}
+ {% include "visiosoft.module.pricehistory::content" %}
+ {% endif %}
+
+
+
+
+
+
+
+ {% if tags != null %}
+
+
{{ trans('visiosoft.module.advs::field.short_info') }}
+
+
+ {% endif %}
+
+
+ {{ blocks('list-item-right-sidebar') }}
+
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-details-block.twig b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-details-block.twig
new file mode 100644
index 000000000..b663050ba
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-details-block.twig
@@ -0,0 +1,162 @@
+{{ adv.title }}
+
+
+ {% if adv.is_get_adv == "1" and adv.stock != "0" and entries('advs').isEnabled('carts') %}
+
+
+
+
+
+
+
+
+ {{ trans('visiosoft.module.advs::field.quantity') }}
+ {#Trans yapılacak#}
+
+
+
+
+
+
+
+
+ {% endif %}
+
+ {% if entries('advs').isEnabled('favs') %}
+
+ {% endif %}
+
{{ trans('visiosoft.module.advs::field.offered_by') }}:
+ {{ adv.owner }}
+
+
{{ trans('visiosoft.module.advs::field.ad_id') }}:
+ {{ adv.id }}
+
+
+
+
+
+
+ {% if entries('advs').isEnabled('comparisons') %}
+ {% include "visiosoft.module.comparisons::comparebtn" %}
+ {{ trans('visiosoft.module.comparisons::field.comparisonpagetitle') }}
+ {% endif %}
+
+
+ {% if(adv.video_url != null) %}
+
+ {% endif %}
+ {% if(profile.getObject().gsm_phone is not null or profile.office_phone is not null or entries('advs').isEnabled('messages')) %}
+
+
+ {% endif %}
+ {% if adv_detail_place_code %}
+
+ {{ adv_detail_place_code }}
+
+ {% endif %}
+
+
+
{{ trans('visiosoft.module.advs::field.share') }}
+
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-picture-block.twig b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-picture-block.twig
new file mode 100644
index 000000000..30404957e
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/resources/views/advs/partials/blocks/ads-item-picture-block.twig
@@ -0,0 +1,19 @@
+
+ {% set advPhoto = '' %}
+ {% if count(adv.files) == 0 %}
+ {% set advPhoto = img('theme::images/no-image.png').url %}
+
+ {% else %}
+ {% for image in adv.getViewPhotoUrl %}
+
+ {% if loop.index == 1 %}
+ {% set advPhoto = image %}
+ {% endif %}
+ {% endfor %}
+
+ {% endif %}
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
index 0f2f86a92..45530dc15 100644
--- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
+++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
@@ -52,17 +52,24 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
$isActiveDopings = new AdvModel();
$isActiveDopings = $isActiveDopings->is_enabled('dopings');
- $query = $this->model->newQuery();
+ $query = $this->model;
$query = $query->where('advs_advs.slug', '!=', "");
$query = $query->where('advs_advs.status', 'approved');
$query = $query->where('advs_advs.finish_at', '>', date('Y-m-d H:i:s'));
+
+
+ $query = $query->leftJoin('advs_advs_translations', function ($join) {
+ $join->on('advs_advs.id', '=', 'advs_advs_translations.entry_id');
+ $join->where('advs_advs_translations.locale', '=', Request()->session()->get('_locale'));
+ });
if (!empty($param['keyword'])) {
$delimiter = '_';
$keyword = str_slug($param['keyword'], $delimiter);
$query = $query->where(function ($query) use ($keyword) {
- $query->where('advs_desc', 'like', '%' . $keyword . '%')
- ->orWhere('slug', 'like', '%' . $keyword . '%');
+ $query->where('advs_advs_translations.advs_desc', 'like', '%' . $keyword . '%')
+ ->orWhere('slug', 'like', '%' . $keyword . '%')
+ ->orWhere('advs_advs_translations.name', 'like', '%' . $keyword . '%');
});
}
if (!empty($param['country'])) {
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvSeeder.php b/addons/default/visiosoft/advs-module/src/Adv/AdvSeeder.php
index 64835fa31..2740b2308 100644
--- a/addons/default/visiosoft/advs-module/src/Adv/AdvSeeder.php
+++ b/addons/default/visiosoft/advs-module/src/Adv/AdvSeeder.php
@@ -1,10 +1,6 @@
truncate();
- DB::table('blocks_areas')->truncate();
- DB::table('html_block_blocks')->truncate();
- DB::table('blocks_areas')->where('slug', 'advs_default_theme_post_adv_right')
- ->orWhere('slug', 'advs_default_theme_post_adv_bottom')
- ->orWhere('slug', 'middle-home-banner-area')
- ->orWhere('slug', 'right-home-banner-area')
- ->orWhere('slug', 'left-home-banner-area')
- ->orWhere('slug', 'advs_default_theme_home_bottom')
- ->orWhere('slug', 'advs_default_theme_home_mobile')
- ->delete();
- // right side
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Advs Default Theme Post Adv Right Side',
- ],
- 'tr' => [
- 'name' => 'Advs Varsayılan Tema İlan Ver Sağ Bölüm',
- ],
- 'slug' => 'advs_default_theme_post_adv_right',
- ]);
-
- // bottom part
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Advs Default Theme Post Adv Bottom',
- ],
- 'tr' => [
- 'name' => 'Advs Varsayılan Tema İlan Ver Alt',
- ],
- 'slug' => 'advs_default_theme_post_adv_bottom',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => 'By clicking Post, you agree to our Terms of Use and Privacy Policy acknowledge that you are the rightful owner of this item.',
- ],
- 'tr' => [
- 'html' => 'Yayınla\'yı tıkladığınızda, Kullanım Koşulları ve Gizlilik Politikasını kabul etmiş olursunuz, bu öğenin hak sahibi olduğunuzu kabul edersiniz.',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
- // homepage bottom info
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Advs Default Theme Homepage Bottom Info',
- ],
- 'tr' => [
- 'name' => 'Advs Varsayılan Tema Anasayfa Alt Bilgi',
- ],
- 'slug' => 'advs_default_theme_home_bottom',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
-
-
-
-
-
-
-
-
Secure Trading
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
-
-
-
-
-
-
-
-
24/7 Support
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
-
-
-
-
-
-
-
-
Easy Trading
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
-
-
-
-
-
-
-
-
Guvenli Alisveris
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
-
-
-
-
-
-
-
-
7/24 Destek
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
-
-
-
-
-
-
-
-
Kolay Ticaret
-
Duis autem vel eum iriure dolor in hendrerit in
-
-
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
- // homepage mobile app part
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Advs Default Theme Homepage Mobile App',
- ],
- 'tr' => [
- 'name' => 'Advs Varsayılan Tema Anasayfa Mobil Uygulama',
- ],
- 'slug' => 'advs_default_theme_home_mobile',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '',
- ],
- 'tr' => [
- 'html' => '',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
-
-
-
- // left Home Banner Area
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Left Home Banner Area',
- ],
- 'tr' => [
- 'name' => 'Anasayfa Sol reklam alanı',
- ],
- 'slug' => 'left-home-banner-area',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
-
- // middle Home Banner Area
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Middle Home Banner Area',
- ],
- 'tr' => [
- 'name' => 'Anasayfa Orta reklam alanı',
- ],
- 'slug' => 'middle-home-banner-area',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
-
-
- // right Home Banner Area
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Right Home Banner Area',
- ],
- 'tr' => [
- 'name' => 'Anasayfa Sağ reklam alanı',
- ],
- 'slug' => 'right-home-banner-area',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
-
-
-
- // List item Right Sidebar
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'List item Right Sidebar',
- ],
- 'tr' => [
- 'name' => 'ilan Detay Sağ Alan',
- ],
- 'slug' => 'list-item-right-sidebar',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
-
-
-
-
-
-
Secure Trading
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
-
-
-
-
-
24/7 Support
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
-
-
-
-
-
-
Easy Trading
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
-
-
-
-
-
-
Güvenli Ticaret
-
Kolay, Güvenli ve Avantajlı Alışveriş için
-
-
-
-
-
-
-
-
-
-
7/24 Saat Destek
-
Hızlı ve Kolay çözüm imkanı
-
-
-
-
-
-
-
-
-
-
-
Kolay Alışveriş
-
Çoklu dil desteği ve Çoklu Para Birimi
-
-
-
-
-
-
-
-
-
Yardıma mı ihtiyacınız var?
-
Hemen Arayın 08048100000
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
-
-
-
- // Profile Right Sidebar
-
- $block_area = BlocksAreasEntryModel::create([
- 'en' => [
- 'name' => 'Profile Right Sidebar',
- ],
- 'tr' => [
- 'name' => 'Profil Sağ Alan',
- ],
- 'slug' => 'profile-right-sidebar',
- ]);
-
- $blockhtml = HtmlBlockBlocksEntryModel::create([
- 'en' => [
- 'html' => '
-
-
-
-
-
-
-
-
Secure Trading
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
-
-
-
-
-
24/7 Support
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
-
-
-
-
-
-
Easy Trading
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit
-
-
-
-
-
',
- ],
- 'tr' => [
- 'html' => '
-
-
-
-
-
-
-
-
Güvenli Ticaret
-
Kolay, Güvenli ve Avantajlı Alışveriş için
-
-
-
-
-
-
-
-
-
-
7/24 Saat Destek
-
Hızlı ve Kolay çözüm imkanı
-
-
-
-
-
-
-
-
-
-
-
Kolay Alışveriş
-
Çoklu dil desteği ve Çoklu Para Birimi
-
-
-
-
-
-
-
-
-
Yardıma mı ihtiyacınız var?
-
Hemen Arayın 08048100000
-
-
',
- ],
- ]);
- $block_block = BlocksBlocksEntryModel::create([
- 'area_id' => $block_area->id,
- 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
- 'field_id' => 52,
- 'extension' => 'anomaly.extension.html_block',
- 'display_title' => 0,
- 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
- 'entry_id' => $blockhtml->id,
- ]);
+ //Code
}
}
diff --git a/addons/default/visiosoft/advs-module/src/Adv/Command/GetAd.php b/addons/default/visiosoft/advs-module/src/Adv/Command/GetAd.php
new file mode 100644
index 000000000..17ec929c5
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Adv/Command/GetAd.php
@@ -0,0 +1,34 @@
+id = $id;
+ }
+
+
+ /**
+ * @param AdvRepositoryInterface $groups
+ * @return |null
+ */
+ public function handle(AdvRepositoryInterface $groups)
+ {
+ if ($this->id) {
+ return $groups->findById($this->id);
+ }
+ return null;
+ }
+}
diff --git a/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php
new file mode 100644
index 000000000..ee0efb288
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php
@@ -0,0 +1,28 @@
+dispatch(new GetAd($id))) {
+ return null;
+ }
+
+ return $ad;
+ }
+ )
+ ];
+ }
+}
diff --git a/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php b/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php
index aedb7c2c2..455340cc8 100644
--- a/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php
+++ b/addons/default/visiosoft/advs-module/src/AdvsModuleSeeder.php
@@ -1,19 +1,63 @@
disks = $disks;
+ $this->folders = $folders;
+ }
+
/**
* Run the seeder.
*/
public function run()
{
+ $disk = $this->disks->findBySlug('local');
+
+ $this->folders->create(
+ [
+ 'en' => [
+ 'name' => 'Favicon',
+ 'description' => 'A folder for Favicon.',
+ ],
+ 'slug' => 'favicon',
+ 'disk' => $disk,
+ 'allowed_types' => [
+ 'ico'
+ ],
+ ]
+ );
+
//Download demo SQL
$repository = "https://raw.githubusercontent.com/openclassify/Openclassify-Demo-Data/master/";
@@ -24,7 +68,7 @@ class AdvsModuleSeeder extends Seeder
$zipper->make('advs-files.zip')->folder('advs-files')->extractTo(base_path().'/public/app/default/files-module/local/images/');
$zipper->close();
- $this->call(AdvSeeder::class);
+ $this->call(BlockSeeder::class);
/* Demo Start */
DB::table('files_files')->truncate();
diff --git a/addons/default/visiosoft/advs-module/src/AdvsModuleServiceProvider.php b/addons/default/visiosoft/advs-module/src/AdvsModuleServiceProvider.php
index 24a5037dc..6e353d9f8 100644
--- a/addons/default/visiosoft/advs-module/src/AdvsModuleServiceProvider.php
+++ b/addons/default/visiosoft/advs-module/src/AdvsModuleServiceProvider.php
@@ -27,7 +27,9 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
*
* @type array|null
*/
- protected $plugins = [];
+ protected $plugins = [
+ AdvsModulePlugin::class,
+ ];
/**
* The addon Artisan commands.
diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/Admin/AdvsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/Admin/AdvsController.php
index ae8fdcbc7..5a553fdc3 100644
--- a/addons/default/visiosoft/advs-module/src/Http/Controller/Admin/AdvsController.php
+++ b/addons/default/visiosoft/advs-module/src/Http/Controller/Admin/AdvsController.php
@@ -25,6 +25,12 @@ use Illuminate\Contracts\Events\Dispatcher;
class AdvsController extends AdminController
{
+ private $model;
+ public function __construct(AdvModel $model)
+ {
+ $this->model = $model;
+ parent::__construct();
+ }
/**
* Display an index of existing entries.
@@ -66,6 +72,16 @@ class AdvsController extends AdminController
]
]);
+ if($this->model->is_enabled('recommendedads'))
+ {
+ $table->addButton('add_recommended',[
+ 'type' => 'default',
+ 'icon' => 'fa fa-gg',
+ 'text' => 'Add Recommended',
+ 'href' => '/admin/recommendedads/create/{entry.id}',
+ ]);
+ }
+
$table->setColumns([
'name' => [
'class' => 'advs-name',
diff --git a/addons/default/visiosoft/advs-module/src/Seed/BlockSeeder.php b/addons/default/visiosoft/advs-module/src/Seed/BlockSeeder.php
new file mode 100644
index 000000000..b3de6f141
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/BlockSeeder.php
@@ -0,0 +1,177 @@
+where('slug', 'left-home-banner-area')
+ ->orWhere('slug', 'middle-home-banner-area')
+ ->orWhere('slug', 'right-home-banner-area')
+ ->orWhere('slug', 'list-item-right-sidebar')
+ ->orWhere('slug', 'profile-right-sidebar')
+ ->delete();
+
+ // left Home Banner Area
+ $left_home_banner_area = BlocksAreasEntryModel::create([
+ 'en' => [
+ 'name' => 'Left Home Banner Area',
+ ],
+ 'tr' => [
+ 'name' => 'Anasayfa Sol reklam alanı',
+ ],
+ 'slug' => 'left-home-banner-area',
+ ]);
+
+ $left_home_banner_html = HtmlBlockBlocksEntryModel::create([
+ 'en' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/left-home-banner-area.twig'),
+ ],
+ 'tr' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/left-home-banner-area.twig'),
+ ],
+ ]);
+
+ BlocksBlocksEntryModel::create([
+ 'area_id' => $left_home_banner_area->id,
+ 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
+ 'field_id' => 52,
+ 'extension' => 'anomaly.extension.html_block',
+ 'display_title' => 0,
+ 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
+ 'entry_id' => $left_home_banner_html->id,
+ ]);
+
+ // middle Home Banner Area
+ $middle_home_banner_area = BlocksAreasEntryModel::create([
+ 'en' => [
+ 'name' => 'Middle Home Banner Area',
+ ],
+ 'tr' => [
+ 'name' => 'Anasayfa Orta reklam alanı',
+ ],
+ 'slug' => 'middle-home-banner-area',
+ ]);
+
+ $middle_home_banner_html = HtmlBlockBlocksEntryModel::create([
+ 'en' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/middle-home-banner-area.twig'),
+ ],
+ 'tr' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/middle-home-banner-area.twig'),
+ ],
+ ]);
+ BlocksBlocksEntryModel::create([
+ 'area_id' => $middle_home_banner_area->id,
+ 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
+ 'field_id' => 52,
+ 'extension' => 'anomaly.extension.html_block',
+ 'display_title' => 0,
+ 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
+ 'entry_id' => $middle_home_banner_html->id,
+ ]);
+
+ // right Home Banner Area
+ $right_home_banner_area = BlocksAreasEntryModel::create([
+ 'en' => [
+ 'name' => 'Right Home Banner Area',
+ ],
+ 'tr' => [
+ 'name' => 'Anasayfa Sağ reklam alanı',
+ ],
+ 'slug' => 'right-home-banner-area',
+ ]);
+
+ $right_home_banner_html = HtmlBlockBlocksEntryModel::create([
+ 'en' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/right-home-banner-area.twig'),
+
+ ],
+ 'tr' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/right-home-banner-area.twig'),
+
+ ],
+ ]);
+
+ BlocksBlocksEntryModel::create([
+ 'area_id' => $right_home_banner_area->id,
+ 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
+ 'field_id' => 52,
+ 'extension' => 'anomaly.extension.html_block',
+ 'display_title' => 0,
+ 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
+ 'entry_id' => $right_home_banner_html->id,
+ ]);
+
+ // List item Right Sidebar
+ $list_item_right_sidebar_area = BlocksAreasEntryModel::create([
+ 'en' => [
+ 'name' => 'List item Right Sidebar',
+ ],
+ 'tr' => [
+ 'name' => 'ilan Detay Sağ Alan',
+ ],
+ 'slug' => 'list-item-right-sidebar',
+ ]);
+
+ $list_item_right_sidebar_html = HtmlBlockBlocksEntryModel::create([
+ 'en' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/list-item-right-sidebar-en.twig'),
+ ],
+ 'tr' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/list-item-right-sidebar-tr.twig'),
+ ],
+ ]);
+ BlocksBlocksEntryModel::create([
+ 'area_id' => $list_item_right_sidebar_area->id,
+ 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
+ 'field_id' => 52,
+ 'extension' => 'anomaly.extension.html_block',
+ 'display_title' => 0,
+ 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
+ 'entry_id' => $list_item_right_sidebar_html->id,
+ ]);
+
+ // Profile Right Sidebar
+
+ $profile_right_sidebar_area = BlocksAreasEntryModel::create([
+ 'en' => [
+ 'name' => 'Profile Right Sidebar',
+ ],
+ 'tr' => [
+ 'name' => 'Profil Sağ Alan',
+ ],
+ 'slug' => 'profile-right-sidebar',
+ ]);
+
+ $profile_right_sidebar_html = HtmlBlockBlocksEntryModel::create([
+ 'en' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/list-item-right-sidebar-en.twig'),
+ ],
+ 'tr' => [
+ 'html' => file_get_contents(__DIR__ . '/Blocks/list-item-right-sidebar-tr.twig'),
+ ],
+ ]);
+ BlocksBlocksEntryModel::create([
+ 'area_id' => $profile_right_sidebar_area->id,
+ 'area_type' => 'Anomaly\BlocksModule\Area\AreaModel',
+ 'field_id' => 52,
+ 'extension' => 'anomaly.extension.html_block',
+ 'display_title' => 0,
+ 'entry_type' => 'Anomaly\HtmlBlockExtension\Block\BlockModel',
+ 'entry_id' => $profile_right_sidebar_html->id,
+ ]);
+
+ }
+}
diff --git a/addons/default/visiosoft/advs-module/src/Seed/Blocks/left-home-banner-area.twig b/addons/default/visiosoft/advs-module/src/Seed/Blocks/left-home-banner-area.twig
new file mode 100644
index 000000000..e8325f104
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/Blocks/left-home-banner-area.twig
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-en.twig b/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-en.twig
new file mode 100644
index 000000000..01e7f4332
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-en.twig
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
Secure Trading
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit
+
+
+
+
+
+
+
+
+
+
24/7 Support
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit
+
+
+
+
+
+
+
+
+
+
+
Easy Trading
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-tr.twig b/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-tr.twig
new file mode 100644
index 000000000..bce963ff7
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/Blocks/list-item-right-sidebar-tr.twig
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
Güvenli Ticaret
+
Kolay, Güvenli ve Avantajlı Alışveriş için
+
+
+
+
+
+
+
+
+
+
7/24 Saat Destek
+
Hızlı ve Kolay çözüm imkanı
+
+
+
+
+
+
+
+
+
+
+
Kolay Alışveriş
+
Çoklu dil desteği ve Çoklu Para Birimi
+
+
+
+
+
+
+
+
+
Yardıma mı ihtiyacınız var?
+
Hemen Arayın 08048100000
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/src/Seed/Blocks/middle-home-banner-area.twig b/addons/default/visiosoft/advs-module/src/Seed/Blocks/middle-home-banner-area.twig
new file mode 100644
index 000000000..3e24115e7
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/Blocks/middle-home-banner-area.twig
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/advs-module/src/Seed/Blocks/right-home-banner-area.twig b/addons/default/visiosoft/advs-module/src/Seed/Blocks/right-home-banner-area.twig
new file mode 100644
index 000000000..120413a60
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Seed/Blocks/right-home-banner-area.twig
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/addons/default/visiosoft/cats-module/migrations/2019_04_01_161009_visiosoft.module.cats__create_category_stream.php b/addons/default/visiosoft/cats-module/migrations/2019_04_01_161009_visiosoft.module.cats__create_category_stream.php
index 380b9e4ad..483147d50 100644
--- a/addons/default/visiosoft/cats-module/migrations/2019_04_01_161009_visiosoft.module.cats__create_category_stream.php
+++ b/addons/default/visiosoft/cats-module/migrations/2019_04_01_161009_visiosoft.module.cats__create_category_stream.php
@@ -17,7 +17,7 @@ class VisiosoftModuleCatsCreateCategoryStream extends Migration
'versionable' => false,
'trashable' => false,
'searchable' => false,
- 'sortable' => false,
+ 'sortable' => true,
];
/**
diff --git a/addons/default/visiosoft/cats-module/resources/views/table/categories.twig b/addons/default/visiosoft/cats-module/resources/views/table/categories.twig
index 3bfbdc17c..702f2cba1 100644
--- a/addons/default/visiosoft/cats-module/resources/views/table/categories.twig
+++ b/addons/default/visiosoft/cats-module/resources/views/table/categories.twig
@@ -7,12 +7,24 @@
{% if table.options.sortable %}
{{ asset_add("scripts.js", "streams::js/table/sortable.js") }}
{% endif %}
-
+{% if app.request.get('cat') != null %}
+ {% set parent = category_detail(app.request.get('cat')) %}
+ {% if parent.parent_category is null %}
+ {% set parent_url = url('admin/cats') %}
+ {% else %}
+ {% set parent_url = url('admin/cats?cat='~parent.parent_category_id) %}
+ {% endif %}
+
+{% endif %}
-
{{ view("streams::table/partials/filters", {'table': table}) }}
{{ view("streams::table/partials/views", {'table': table}) }}
-
{{ view(table.options.heading ?: "streams::table/partials/heading", {'table': table}) }}
{% if not table.rows.empty() %}
{% block card %}
diff --git a/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryDetail.php b/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryDetail.php
new file mode 100644
index 000000000..351142df5
--- /dev/null
+++ b/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryDetail.php
@@ -0,0 +1,38 @@
+id = $id;
+ }
+
+
+ /**
+ * @param CategoryRepositoryInterface $groups
+ * @return |null
+ */
+ public function handle(CategoryRepositoryInterface $groups)
+ {
+ if ($this->id) {
+ $category = $groups->find($this->id);
+ if (!is_null($category))
+ return $category;
+ else
+ return null;
+ }
+ return null;
+ }
+}
diff --git a/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryName.php b/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryName.php
new file mode 100644
index 000000000..ec999cfc9
--- /dev/null
+++ b/addons/default/visiosoft/cats-module/src/Category/Command/GetCategoryName.php
@@ -0,0 +1,38 @@
+id = $id;
+ }
+
+
+ /**
+ * @param CategoryRepositoryInterface $groups
+ * @return |null
+ */
+ public function handle(CategoryRepositoryInterface $groups)
+ {
+ if ($this->id) {
+ $category = $groups->find($this->id);
+ if (!is_null($category))
+ return $category->name;
+ else
+ return null;
+ }
+ return null;
+ }
+}
diff --git a/addons/default/visiosoft/cats-module/src/Category/Table/CategoryTableBuilder.php b/addons/default/visiosoft/cats-module/src/Category/Table/CategoryTableBuilder.php
index 1c9d1d157..c9e73e775 100644
--- a/addons/default/visiosoft/cats-module/src/Category/Table/CategoryTableBuilder.php
+++ b/addons/default/visiosoft/cats-module/src/Category/Table/CategoryTableBuilder.php
@@ -28,7 +28,6 @@ class CategoryTableBuilder extends TableBuilder
*/
protected $columns = [
'name',
- 'order'
];
/**
diff --git a/addons/default/visiosoft/cats-module/src/CatsModulePlugin.php b/addons/default/visiosoft/cats-module/src/CatsModulePlugin.php
new file mode 100644
index 000000000..ed8df9a3e
--- /dev/null
+++ b/addons/default/visiosoft/cats-module/src/CatsModulePlugin.php
@@ -0,0 +1,39 @@
+dispatch(new GetCategoryName($id))) {
+ return null;
+ }
+
+ return $ad;
+ }
+ ),new \Twig_SimpleFunction(
+ 'category_detail',
+ function ($id) {
+
+ if (!$ad = $this->dispatch(new GetCategoryDetail($id))) {
+ return null;
+ }
+
+ return $ad;
+ }
+ )
+ ];
+ }
+}
diff --git a/addons/default/visiosoft/cats-module/src/CatsModuleServiceProvider.php b/addons/default/visiosoft/cats-module/src/CatsModuleServiceProvider.php
index a492982b2..0a880c0f8 100644
--- a/addons/default/visiosoft/cats-module/src/CatsModuleServiceProvider.php
+++ b/addons/default/visiosoft/cats-module/src/CatsModuleServiceProvider.php
@@ -19,7 +19,9 @@ class CatsModuleServiceProvider extends AddonServiceProvider
*
* @type array|null
*/
- protected $plugins = [];
+ protected $plugins = [
+ CatsModulePlugin::class,
+ ];
/**
* The addon Artisan commands.
@@ -48,11 +50,11 @@ class CatsModuleServiceProvider extends AddonServiceProvider
* @type array|null
*/
protected $routes = [
- 'admin/cats/placeholderforsearch' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@index',
- 'admin/cats/placeholderforsearch/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@create',
+ 'admin/cats/placeholderforsearch' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@index',
+ 'admin/cats/placeholderforsearch/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@create',
'admin/cats/placeholderforsearch/edit/{id}' => 'Visiosoft\CatsModule\Http\Controller\Admin\PlaceholderforsearchController@edit',
- 'admin/cats' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@index',
- 'admin/cats/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@create',
+ 'admin/cats' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@index',
+ 'admin/cats/create' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@create',
'admin/cats/edit/{id}' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@edit',
'admin/cats/category/delete/{id}' => 'Visiosoft\CatsModule\Http\Controller\Admin\CategoryController@delete',
];
diff --git a/addons/default/visiosoft/default-theme/resources/views/partials/metadata.twig b/addons/default/visiosoft/default-theme/resources/views/partials/metadata.twig
index e94c14fd7..54b6840ae 100644
--- a/addons/default/visiosoft/default-theme/resources/views/partials/metadata.twig
+++ b/addons/default/visiosoft/default-theme/resources/views/partials/metadata.twig
@@ -39,7 +39,7 @@
-{#{{ favicons("theme::img/favicon.png") }}#}
+{{ favicons(url('files/' ~ file(setting_value('visiosoft.module.advs::favicon')).path)) }}
{# Base Theme Components #}
{{ asset_add("theme.css", "theme::scss/bootstrap/bootstrap.scss") }}
diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php
index 260e9665d..de6aed9b0 100644
--- a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php
+++ b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php
@@ -187,7 +187,10 @@ class UserAuthenticator
$users->save($user);
$all['password'] = $opassword; //Register Password Original
- $all['subdomain'] = $all['username'];
+ if(!isset($all['subdomain']))
+ {
+ $all['subdomain'] = $all['username'];
+ }
$all['user'] = $user;
$planParams['user'] = $user->id; //Register User id