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 2d6d88a69..0c9081ea4 100644
--- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php
+++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php
@@ -60,7 +60,6 @@ return [
'hide_standard_price_field',
'hide_options_field',
'hide_village_field',
- 'hide_configurations',
'make_all_fields_required',
'make_map_required',
'show_breadcrumb_when_creating_ad',
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 e3a092c52..3c1cf4ab6 100644
--- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php
+++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php
@@ -146,13 +146,6 @@ return [
'mode' => 'checkbox'
]
],
- 'hide_configurations' => [
- 'type' => 'anomaly.field_type.boolean',
- 'config' => [
- 'default_value' => false,
- 'mode' => 'checkbox'
- ]
- ],
'make_all_fields_required' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
diff --git a/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss b/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss
index f93008c30..139cbef8c 100644
--- a/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss
+++ b/addons/default/visiosoft/advs-module/resources/css/new-create-new.scss
@@ -133,7 +133,7 @@ label {
color: #4A4A4A;
font-weight: 600;
- input {
+ input, textarea {
box-shadow: 0 calc(1rem / 16) calc(2rem / 16) rgba(0, 0, 0, .04);
font-size: calc(17rem / 16);
padding: 1.1rem 1.5rem;
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 49c3b36ec..59c5044cf 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
@@ -79,7 +79,7 @@
{% if setting_value('visiosoft.module.advs::market_place') %}
- {{ addBlock('new-ad/fields', {'adv': adv})|raw }}
+ {{ addBlock('new-ad/fields', {'adv': adv, 'rawClassified': rawClassified})|raw }}
{% endif %}
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php
index a624d40d1..faf106f2f 100644
--- a/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php
+++ b/addons/default/visiosoft/advs-module/src/Adv/AdvModel.php
@@ -544,4 +544,23 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
->where('status', '=', 'approved')
->where('slug', '!=', '');
}
+
+ public function setConfig($key, $value)
+ {
+ $config = $this->config;
+ $config = $config ? (array) json_decode($config) : [];
+
+ $config[$key] = $value;
+
+ $this->config = json_encode($config);
+ $this->save();
+ }
+
+ public function getConfig($key)
+ {
+ $config = $this->config;
+ $config = $config ? (array) json_decode($config) : [];
+
+ return $config[$key] ?? null;
+ }
}
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
index fdbbd9abb..54b48aff2 100644
--- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
+++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php
@@ -277,7 +277,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
->where('advs_advs.id', $id)
->leftJoin('users_users as u1', 'advs_advs.created_by_id', '=', 'u1.id')
->select('advs_advs.*', 'u1.first_name as first_name', 'u1.last_name as last_name', 'u1.id as owner_id')
- ->inRandomOrder()
->first();
if ($adv) {
diff --git a/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php b/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php
index 6622c30aa..693d69980 100644
--- a/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php
+++ b/addons/default/visiosoft/advs-module/src/Adv/Contract/AdvInterface.php
@@ -97,4 +97,8 @@ interface AdvInterface extends EntryInterface
public function lastCategory();
public function scopeCurrent($query);
+
+ public function setConfig($key, $value);
+
+ public function getConfig($key);
}
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 1ed74021a..1ace493e0 100644
--- a/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php
+++ b/addons/default/visiosoft/advs-module/src/Http/Controller/AdvsController.php
@@ -762,7 +762,8 @@ class AdvsController extends PublicController
}
return $this->view->make('visiosoft.module.advs::new-ad/new-create', compact(
- 'request', 'formBuilder', 'cats_d', 'custom_fields'));
+ 'formBuilder', 'cats_d', 'custom_fields'
+ ));
}
public function store
@@ -833,6 +834,10 @@ class AdvsController extends PublicController
$adv->is_get_adv = ($this->request->is_get_adv and $get_categories_status) ? true : false;
$adv->save();
+ if ($adv->is_get_adv) {
+ $orderNote = \request('order_note') ?? '';
+ $adv->setConfig('order_note', trim($orderNote));
+ }
//Todo Create Event
if (is_module_installed('visiosoft.module.customfields')) {
@@ -953,6 +958,7 @@ class AdvsController extends PublicController
public function edit($id)
{
$adv = $this->adv_repository->find($id);
+ $rawClassified = $adv;
if (is_null($adv)) {
$this->messages->error(trans('visiosoft.module.advs::message.no_add_found'));
@@ -1008,7 +1014,10 @@ class AdvsController extends PublicController
return $this->view->make(
'visiosoft.module.advs::new-ad/new-create',
- compact('id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options', 'hidePrice', 'is_options', 'configurations')
+ compact(
+ 'id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options',
+ 'hidePrice','is_options', 'configurations', 'rawClassified'
+ )
);
}
diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
index 1fa2d90d1..ded768322 100644
--- a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
+++ b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
@@ -6,7 +6,6 @@ use Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
-use Illuminate\Support\Facades\DB;
use Visiosoft\AdvsModule\Adv\AdvModel;
use Visiosoft\AdvsModule\Adv\Event\ChangeStatusAd;
use Visiosoft\AdvsModule\Status\Contract\StatusRepositoryInterface;
diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
index ede582c74..418e309fe 100644
--- a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
+++ b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php
@@ -187,6 +187,10 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
public function boot(AddonCollection $addonCollection)
{
+ if ($utmSource = request('utm_source')) {
+ setcookie('utm_source', $utmSource);
+ }
+
$slug = 'export';
$section = [
'title' => 'visiosoft.module.profile::button.export',