Skip to content

Commit bdbcee8

Browse files
authored
Merge pull request #41 from mageplaza/2.4-develop
2.4 develop
2 parents cb72e94 + 1d093c8 commit bdbcee8

18 files changed

+1019
-33
lines changed

Plugin/Controller/Category/View.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
class View
3131
{
32+
protected $moduleManager;
3233
/**
3334
* @var LayerData
3435
*/
@@ -40,8 +41,10 @@ class View
4041
* @param LayerData $moduleHelper
4142
*/
4243
public function __construct(
44+
\Magento\Framework\Module\Manager $moduleManager,
4345
LayerData $moduleHelper
4446
) {
47+
$this->moduleManager = $moduleManager;
4548
$this->_moduleHelper = $moduleHelper;
4649
}
4750

@@ -53,6 +56,9 @@ public function __construct(
5356
*/
5457
public function afterExecute(\Magento\Catalog\Controller\Category\View $action, $page)
5558
{
59+
if ($this->moduleManager->isOutputEnabled('Mageplaza_SeoUrl')){
60+
return $page;
61+
}
5662
if ($this->_moduleHelper->ajaxEnabled() && $action->getRequest()->isAjax()) {
5763
$navigation = $page->getLayout()->getBlock('catalog.leftnav');
5864
$products = $page->getLayout()->getBlock('category.products');

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "mageplaza/module-ajax-layered-navigation",
33
"description": "Magento 2 Ajax Layered Navigation Extension",
44
"require": {
5-
"mageplaza/module-core": "^1.4.12"
5+
"mageplaza/module-core": "^1.5.5"
66
},
77
"type": "magento2-module",
8-
"version": "4.0.5",
8+
"version": "4.1.0",
99
"license": "proprietary",
1010
"authors": [
1111
{

etc/module.xml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
<?xml version="1.0"?>
2-
<!--
3-
/**
4-
* Mageplaza
5-
*
6-
* NOTICE OF LICENSE
7-
*
8-
* This source file is subject to the Mageplaza.com license that is
9-
* available through the world-wide-web at this URL:
10-
* https://www.mageplaza.com/LICENSE.txt
11-
*
12-
* DISCLAIMER
13-
*
14-
* Do not edit or add to this file if you wish to upgrade this extension to newer
15-
* version in the future.
16-
*
17-
* @category Mageplaza
18-
* @package Mageplaza_AjaxLayer
19-
* @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
20-
* @license https://www.mageplaza.com/LICENSE.txt
21-
*/
22-
-->
23-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
24-
<module name="Mageplaza_AjaxLayer" setup_version="1.0.0">
25-
<sequence>
26-
<module name="Magento_Catalog"/>
27-
<module name="Mageplaza_Core"/>
28-
</sequence>
29-
</module>
30-
</config>
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Mageplaza
5+
*
6+
* NOTICE OF LICENSE
7+
*
8+
* This source file is subject to the Mageplaza.com license that is
9+
* available through the world-wide-web at this URL:
10+
* https://www.mageplaza.com/LICENSE.txt
11+
*
12+
* DISCLAIMER
13+
*
14+
* Do not edit or add to this file if you wish to upgrade this extension to newer
15+
* version in the future.
16+
*
17+
* @category Mageplaza
18+
* @package Mageplaza_AjaxLayer
19+
* @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
20+
* @license https://www.mageplaza.com/LICENSE.txt
21+
*/
22+
-->
23+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
24+
<module name="Mageplaza_AjaxLayer" setup_version="1.0.0">
25+
<sequence>
26+
<module name="Magento_Catalog"/>
27+
<module name="Mageplaza_Core"/>
28+
<module name="Mageplaza_SeoUrl"/>
29+
</sequence>
30+
</module>
31+
</config>

i18n/en_US.csv

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
"Shop By","Shop By"
1+
"%1 filter options","%1 filter options"
2+
"%1 filter, 1 available product","%1 filter, 1 available product"
3+
"%1 filter, %2 available products","%1 filter, %2 available products"
4+
"Active filtering","Active filtering"
5+
"Remove active %1 filter: %2","Remove active %1 filter: %2"
26
"Clear All","Clear All"
7+
"Product filters","Product filters"
8+
"Shop By","Shop By"
9+
"Skip to product list","Skip to product list"
10+
filter,filter
11+
"Could not add item to wishlist.","Could not add item to wishlist."
12+
"%1 has been added to your Wish List.","%1 has been added to your Wish List."
313
"Shopping Options","Shopping Options"
414
"Ajax Layered Navigation","Ajax Layered Navigation"
515
"General Configuration","General Configuration"

view/frontend/layout/catalog_category_view_type_layered.xml

100644100755
File mode changed.

view/frontend/layout/catalogsearch_result_index.xml

100644100755
File mode changed.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Hyvä Themes - https://hyva.io
5+
* Copyright © Hyvä Themes 2020-present. All rights reserved.
6+
* This product is licensed per Magento install
7+
* See https://hyva.io/license
8+
*/
9+
-->
10+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left"
11+
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
12+
<update handle="catalog_list_item"/>
13+
<body>
14+
<referenceBlock name="product_list_toolbar">
15+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
16+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/product/list/toolbar.phtml</argument>
17+
</action>
18+
</referenceBlock>
19+
</body>
20+
</page>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Mageplaza
5+
*
6+
* NOTICE OF LICENSE
7+
*
8+
* This source file is subject to the Mageplaza.com license that is
9+
* available through the world-wide-web at this URL:
10+
* https://www.mageplaza.com/LICENSE.txt
11+
*
12+
* DISCLAIMER
13+
*
14+
* Do not edit or add to this file if you wish to upgrade this extension to newer
15+
* version in the future.
16+
*
17+
* @category Mageplaza
18+
* @package Mageplaza_AjaxLayer
19+
* @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
20+
* @license https://www.mageplaza.com/LICENSE.txt
21+
*/
22+
-->
23+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
24+
<head>
25+
<css src="Mageplaza_AjaxLayer::css/hyva/view.css"/>
26+
</head>
27+
<body>
28+
<referenceBlock name="catalog.leftnav">
29+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable" >
30+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/view.phtml</argument>
31+
</action>
32+
</referenceBlock>
33+
34+
<referenceBlock name="catalog.navigation.renderer">
35+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
36+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/filter.phtml</argument>
37+
</action>
38+
</referenceBlock>
39+
40+
<referenceBlock name="catalog.navigation.state">
41+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
42+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/state.phtml</argument>
43+
</action>
44+
</referenceBlock>
45+
46+
</body>
47+
</page>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Mageplaza
5+
*
6+
* NOTICE OF LICENSE
7+
*
8+
* This source file is subject to the Mageplaza.com license that is
9+
* available through the world-wide-web at this URL:
10+
* https://www.mageplaza.com/LICENSE.txt
11+
*
12+
* DISCLAIMER
13+
*
14+
* Do not edit or add to this file if you wish to upgrade this extension to newer
15+
* version in the future.
16+
*
17+
* @category Mageplaza
18+
* @package Mageplaza_AjaxLayer
19+
* @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
20+
* @license https://www.mageplaza.com/LICENSE.txt
21+
*/
22+
-->
23+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
24+
<body>
25+
<referenceBlock name="category.products.list.js.compare">
26+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
27+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/product/list/js/compare.phtml</argument>
28+
</action>
29+
</referenceBlock>
30+
<referenceBlock name="category.products.list.js.wishlist">
31+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
32+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/product/list/js/wishlist.phtml</argument>
33+
</action>
34+
</referenceBlock>
35+
</body>
36+
</page>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Mageplaza
5+
*
6+
* NOTICE OF LICENSE
7+
*
8+
* This source file is subject to the Mageplaza.com license that is
9+
* available through the world-wide-web at this URL:
10+
* https://www.mageplaza.com/LICENSE.txt
11+
*
12+
* DISCLAIMER
13+
*
14+
* Do not edit or add to this file if you wish to upgrade this extension to newer
15+
* version in the future.
16+
*
17+
* @category Mageplaza
18+
* @package Mageplaza_AjaxLayer
19+
* @copyright Copyright (c) Mageplaza (http://www.mageplaza.com/)
20+
* @license https://www.mageplaza.com/LICENSE.txt
21+
*/
22+
-->
23+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
24+
<head>
25+
<css src="Mageplaza_AjaxLayer::css/hyva/view.css"/>
26+
</head>
27+
<body>
28+
<referenceBlock name="catalogsearch.leftnav">
29+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
30+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/view.phtml</argument>
31+
</action>
32+
</referenceBlock>
33+
34+
<referenceBlock name="catalog.navigation.renderer">
35+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
36+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/filter.phtml</argument>
37+
</action>
38+
</referenceBlock>
39+
40+
<referenceBlock name="catalog.navigation.state">
41+
<action method="setTemplate" ifconfig="layered_navigation/general/ajax_enable">
42+
<argument name="template" xsi:type="string">Mageplaza_AjaxLayer::hyva/layer/state.phtml</argument>
43+
</action>
44+
</referenceBlock>
45+
46+
47+
</body>
48+
</page>

0 commit comments

Comments
 (0)