Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

v3.0.0

Compare
Choose a tag to compare
@edwinljacobs edwinljacobs released this 14 Oct 16:40
· 247 commits to master since this release

3.0.0 Ajax filtering

Ajax filtering is now supported! You can enable this in the tweakwise settings: Stores > Configuration > Catalog > Tweakwise > Layered Navigation > Ajax filtering
This is only available when you do not use the magento default filter rendering. Ajax filtering should work with the form filter setting and also with the filter url strategy.

This is a major change and a lot of code has been changed in order to facilitate this for all settings (Url strategy, Seo settings, Form filter settings etcetc), as such there are quite a few backwards compatibility breaks. These are explained below. If you happen to use the landingspage module and its integration with tweakwise as well
(see https://github.com/EmicoEcommerce/Magento2AttributeLandingTweakwise) then you need to update emico/m2-attributelanding-tweakwise to ^2.0, it willl contain a reference to this release so the update should come naturally.

BC breaks:

  1. Template src/view/frontend/templates/product/navigation/view.phtml moved to src/view/frontend/templates/layer/view.phtml
    as that is the template it replaces
  2. Complete overhaul of js components, if you have any changes in those you will need to reevalute / redo them.
  3. Overhauled slider template: src/view/frontend/templates/product/layered/slider.phtml the javascript part has been moved to a separate js component, namely src/view/frontend/web/js/navigation-slider.js
  4. Removed deprecated methods from src/Block/LayeredNavigation/RenderLayered/SliderRenderer.php
  5. All data-mage-init statements now go through model: src/Model/NavigationConfig.php this class will resolve the correct js components based on your configuration. This means yet more bc breaks on your template overrides (if any)
  6. References to "Zend\Http\Request as HttpRequest" have been removed, we now depend on the concrete magento request object. This is because of the move from Zend to Laminas.
  7. Added methods
public function getClearUrl(MagentoHttpRequest $request, array $activeFilterItems): string;
public function buildFilterUrl(MagentoHttpRequest $request, array $filters = []): string;

To interface UrlInterface to facilitate ajax filtering, this could not be helped

Fixed: EmicoEcommerce/Magento2Tweakwise#109 by bundling two version of the navigation js component one for the full jQuery ui and one for jquery-ui-modules/slider. This is resolved based on magento version.