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 ffa77daa3..0f51353ca 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
@@ -54,31 +54,6 @@
{% endif %}
- {% if(adv.video_url != null) %}
-
- {% endif %}
@@ -144,20 +119,20 @@
{% if entries('advs').isEnabled('favs') %}
-
+
{% endif %}
-
{{ trans('visiosoft.module.advs::field.offered_by') }}:
+ {{ trans('visiosoft.module.advs::field.offered_by') }}:
{{ adv.owner }}
- {{ trans('visiosoft.module.advs::field.ad_id') }}:
+ {{ 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')) %}
@@ -189,9 +197,6 @@
class="fa fa-envelope-square">{{ trans("visiosoft.module.advs::field.send_message") }}
{% endif %}
- {% if entries('advs').isEnabled('comparisons') %}
- {% include "visiosoft.module.comparisons::comparebtn" %}
- {% endif %}
{% endif %}
{% if adv_detail_place_code %}
diff --git a/addons/default/visiosoft/advs-module/resources/views/advs/list.twig b/addons/default/visiosoft/advs-module/resources/views/advs/list.twig
index 8b6220f0d..f8cbcb539 100644
--- a/addons/default/visiosoft/advs-module/resources/views/advs/list.twig
+++ b/addons/default/visiosoft/advs-module/resources/views/advs/list.twig
@@ -124,10 +124,8 @@
{% if entries('advs').isEnabled('comparisons') %}
-
-
-
-
+
+ {% include "visiosoft.module.comparisons::comparebtn" %}
{% endif %}
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 741b6407f..8bfb63a1f 100644
--- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php
+++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php
@@ -123,14 +123,13 @@ class AdvsController extends PublicController
Cookie::queue(Cookie::make('last_search', $request->getRequestUri(), 84000));
- $viewType = $request->cookie('viewType');
- if (isset($viewType) and $viewType == 'table') {
- return $this->view->make('visiosoft.module.advs::advs/table', $compact);
- } elseif (isset($viewType) and $viewType == 'map')
- {
- return $this->view->make('visiosoft.module.advs::advs/map', $compact);
- }
- return $this->view->make('visiosoft.module.advs::advs/list', $compact);
+ $viewType = $request->cookie('viewType');
+ if (isset($viewType) and $viewType == 'table') {
+ return $this->view->make('visiosoft.module.advs::advs/table', $compact);
+ } elseif (isset($viewType) and $viewType == 'map') {
+ return $this->view->make('visiosoft.module.advs::advs/map', $compact);
+ }
+ return $this->view->make('visiosoft.module.advs::advs/list', $compact);
}
public function viewType($type)
@@ -315,9 +314,7 @@ class AdvsController extends PublicController
CategoryRepositoryInterface $categoryRepository,
Dispatcher $events,
AdvModel $advModel,
- CategoryModel $categoryModel,
- PackageModel $packageModel,
- AdModel $StoreAdModel
+ CategoryModel $categoryModel
)
{
if (!Auth::user()) {
@@ -335,6 +332,7 @@ class AdvsController extends PublicController
if ($advModel->is_enabled('packages') and $adv->slug == "") {
$parent_cat = $categoryModel->getParentCats($request->cat1, 'parent_id');
+ $packageModel = new PackageModel();
$package = $packageModel->reduceLimit($parent_cat, 'reduce');
if ($package != null) {
return redirect('/')->with('error', trans('visiosoft.module.advs::message.please_buy_package'));
@@ -342,7 +340,8 @@ class AdvsController extends PublicController
}
if ($advModel->is_enabled('store') and $adv->slug == "") {
- if ($request->store != "0" and $request->store != null ) {
+ $StoreAdModel = new AdModel();
+ if ($request->store != "0" and $request->store != null) {
$StoreAdModel->createStoreAdLoggedInUser($request->store, $request->update_id);
}
}
@@ -500,8 +499,7 @@ class AdvsController extends PublicController
AdvFormBuilder $advFormBuilder,
AdvRepositoryInterface $advRepository,
CategoryRepositoryInterface $categoryRepository,
- AdvModel $advModel,
- UserModel $StoreUserModel
+ AdvModel $advModel
)
{
$nameField = HTMLDomParser::str_get_html($advFormBuilder->render($id)->getContent());
@@ -568,7 +566,7 @@ class AdvsController extends PublicController
}
- public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel, PackageModel $packageModel)
+ public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel)
{
$ad = $advModel->getAdv($id);
$auto_approved = $settings->value('visiosoft.module.advs::auto_approve');
@@ -582,6 +580,7 @@ class AdvsController extends PublicController
$advModel->publish_at_Ads($id);
if ($ad->finish_at == NULL AND $type == "approved") {
if ($advModel->is_enabled('packages')) {
+ $packageModel = new PackageModel();
$published_time = $packageModel->reduceTimeLimit($ad->cat1);
if ($published_time != null) {
$default_published_time = $published_time;
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 182763ace..d5bfca8dc 100644
--- a/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
+++ b/addons/default/visiosoft/profile-module/src/Http/Controller/MyProfileController.php
@@ -238,7 +238,7 @@ class MyProfileController extends PublicController
}
}
- public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel, PackageModel $packageModel)
+ public function statusAds($id, $type, SettingRepositoryInterface $settings, Dispatcher $events, AdvModel $advModel)
{
$ad = $advModel->getAdv($id);
$auto_approved = $settings->value('visiosoft.module.advs::auto_approve');
@@ -252,6 +252,7 @@ class MyProfileController extends PublicController
$advModel->publish_at_Ads($id);
if ($ad->finish_at == NULL AND $type == "approved") {
if ($advModel->is_enabled('packages')) {
+ $packageModel = new PackageModel();
$published_time = $packageModel->reduceTimeLimit($ad->cat1);
if($published_time != null)
{