Skip to content

Commit

Permalink
Merge pull request #52 from hugo-fasone/fix-advancedsearch
Browse files Browse the repository at this point in the history
Fix : Module "pm_advancedsearch4" needs jQueryUi for price slider
  • Loading branch information
Oksydan authored Nov 16, 2024
2 parents a8790c4 + 80b9a58 commit d38eea1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Hook/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ public function hookActionProductSearchAfter(): void
$this->context->controller->unregisterJavascript('facetedsearch_front');
$this->context->controller->unregisterStylesheet('facetedsearch_front');

$this->context->controller->unregisterJavascript('jquery-ui');
$this->context->controller->unregisterStylesheet('jquery-ui');
$this->context->controller->unregisterStylesheet('jquery-ui-theme');
$needsJQueryUi = \Module::isEnabled('pm_advancedsearch4') && $this->context->controller instanceof \ProductListingFrontController;

if (!$needsJQueryUi) {
$this->context->controller->unregisterJavascript('jquery-ui');
$this->context->controller->unregisterStylesheet('jquery-ui');
$this->context->controller->unregisterStylesheet('jquery-ui-theme');
}
}

public function hookActionFrontControllerSetMedia()
Expand Down

0 comments on commit d38eea1

Please sign in to comment.