@@ -133,13 +138,13 @@
{% set active_currencies = setting_value('visiosoft.module.advs::enabled_currencies') %}
@@ -147,7 +152,9 @@
diff --git a/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php b/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php
new file mode 100644
index 000000000..03715dba0
--- /dev/null
+++ b/addons/default/visiosoft/advs-module/src/Adv/Command/appendRequestURL.php
@@ -0,0 +1,78 @@
+url = $url;
+ $this->request = $request;
+ $this->new_parameters = $new_parameters;
+ }
+
+ /**
+ * @return appendRequestURL
+ */
+ public function handle()
+ {
+ return $this->url
+ . (Str::contains($this->url, '?') ? '&' : '?')
+ . Arr::query($this->appends(array_merge($this->request, $this->new_parameters)));
+ }
+
+ /**
+ * @param $key
+ * @param null $value
+ * @return $this|appendRequestURL
+ */
+ public function appends($key, $value = null)
+ {
+ if (is_null($key)) {
+ return $this->query;
+ }
+
+ if (is_array($key)) {
+ return $this->appendArray($key)->query;
+ }
+
+ return $this->addQuery($key, $value)->query;
+ }
+
+ /**
+ * @param array $keys
+ * @return $this
+ */
+ protected function appendArray(array $keys)
+ {
+ foreach ($keys as $key => $value) {
+ $this->addQuery($key, $value);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @param $key
+ * @param $value
+ * @return $this
+ */
+ protected function addQuery($key, $value)
+ {
+ $this->query[$key] = $value;
+
+ return $this;
+ }
+}
diff --git a/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php
index cfbb7fd70..da7789d85 100644
--- a/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php
+++ b/addons/default/visiosoft/advs-module/src/AdvsModulePlugin.php
@@ -1,6 +1,7 @@
dispatch(new appendRequestURL($request, $url, $new_parameters));
+ }
)
];
}
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 531a61bc9..7ed8f86bd 100644
--- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php
+++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php
@@ -214,13 +214,13 @@ class AdvsController extends PublicController
$userProfile = $this->profile_repository->getProfile($user->id);
}
- $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request',
- 'user', 'userProfile', 'featured_advs', 'type', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
-
Cookie::queue(Cookie::make('last_search', $this->requestHttp->getRequestUri(), 84000));
$viewType = $this->requestHttp->cookie('viewType');
+ $compact = compact('advs', 'countries', 'mainCats', 'subCats', 'checkboxes', 'request',
+ 'user', 'userProfile', 'featured_advs', 'viewType', 'topfields', 'ranges', 'seenList', 'searchedCountry', 'radio');
+
if (isset($viewType) and $viewType == 'table')
return $this->view->make('visiosoft.module.advs::list/table', $compact);
elseif (isset($viewType) and $viewType == 'map')
diff --git a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/list-filter.twig b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/list-filter.twig
index 389a4dc08..c81d14f5c 100644
--- a/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/list-filter.twig
+++ b/addons/default/visiosoft/cats-module/resources/views/ads-list/partials/list-filter.twig
@@ -21,7 +21,13 @@
{% set id = maincat.id %}
{% set parent_category = false %}
{% endif %}
-
{{ name }}
@@ -29,7 +35,13 @@
{% for subcat in params.subCats %}