From 631a79d75db1603658bce5a09635b0ee7527dc20 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 5 Feb 2024 09:19:58 +0100 Subject: [PATCH] add Apex 7.0 patch --- README.md | 18 +++++++++ apex_7.0.patch | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 README.md create mode 100644 apex_7.0.patch diff --git a/README.md b/README.md new file mode 100644 index 0000000..98e7961 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Patches + +## [apex_7.0.patch](./apex_7.0.patch) + +This changes are required in Apex theme in 7.0.x. + +### Behaviours: +- add missing template block +- align search HTML to article list pages +- removed unnecessary loop in search template + +### Installation instructions: +- ```php composer require cweagans/composer-patches``` +- ```php composer config extra.enable-patching true``` +- ```php composer config --json --merge extra.patches.oxid-esales/apex-theme '{"apply theme changes for extsearch":"https://raw.githubusercontent.com/d3datadevelopment/ExtSearch/patches/apex_7.0.patch"}'``` +- remove installed Apex package: ```rm -r vendor/oxid-esales/apex-theme``` +- reinstall it: ```php composer install --no-dev```, confirm overwriting the Apex package files +- clear all caches like tmp folder \ No newline at end of file diff --git a/apex_7.0.patch b/apex_7.0.patch new file mode 100644 index 0000000..7e7f9ce --- /dev/null +++ b/apex_7.0.patch @@ -0,0 +1,102 @@ +From 8d837c54c7d3d4dff313cae6a6e06807b5d8c6e1 Mon Sep 17 00:00:00 2001 +From: Daniel Seifert +Date: Thu, 9 Nov 2023 10:35:52 +0100 +Subject: [PATCH 1/3] HTML structure of search article list aligned to category + +--- + tpl/page/search/search.html.twig | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/tpl/page/search/search.html.twig b/tpl/page/search/search.html.twig +index a0266c2..aaddd34 100644 +--- a/tpl/page/search/search.html.twig ++++ b/tpl/page/search/search.html.twig +@@ -38,16 +38,18 @@ + {% else %} +

{{ translate({ ident: "NO_ITEMS_FOUND" }) }}

+ {% endif %} +- {% if oView.getArticleList() %} +- {% for product in oView.getArticleList() %} +- {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} +- {% endfor %} +- {% endif %} +- {% if oView.getArticleCount() %} +- {% block search_bottom_listlocator %} +- {% include "widget/locator/listlocator.html.twig" with {locator: oView.getPageNavigationLimitedBottom(), place: "bottom"} %} +- {% endblock %} +- {% endif %} ++
++ {% if oView.getArticleList() %} ++ {% for product in oView.getArticleList() %} ++ {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} ++ {% endfor %} ++ {% endif %} ++ {% if oView.getArticleCount() %} ++ {% block search_bottom_listlocator %} ++ {% include "widget/locator/listlocator.html.twig" with {locator: oView.getPageNavigationLimitedBottom(), place: "bottom"} %} ++ {% endblock %} ++ {% endif %} ++
+ + {% endblock %} + +-- +2.26.1.windows.1 + + +From 1c003af89fb2c0f4a4cbe8c21a5ff6a94c8e7583 Mon Sep 17 00:00:00 2001 +From: Daniel Seifert +Date: Thu, 9 Nov 2023 10:40:34 +0100 +Subject: [PATCH 2/3] removed unnecessary loop + +--- + tpl/page/search/search.html.twig | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/tpl/page/search/search.html.twig b/tpl/page/search/search.html.twig +index aaddd34..573ae75 100644 +--- a/tpl/page/search/search.html.twig ++++ b/tpl/page/search/search.html.twig +@@ -40,9 +40,7 @@ + {% endif %} +
+ {% if oView.getArticleList() %} +- {% for product in oView.getArticleList() %} +- {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} +- {% endfor %} ++ {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} + {% endif %} + {% if oView.getArticleCount() %} + {% block search_bottom_listlocator %} +-- +2.26.1.windows.1 + + +From 682c676c4f8bec884af38c25e8c8f85fbdc513f9 Mon Sep 17 00:00:00 2001 +From: Daniel Seifert +Date: Thu, 9 Nov 2023 10:43:31 +0100 +Subject: [PATCH 3/3] template block added for better extensibility (as in + article list) + +--- + tpl/page/search/search.html.twig | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tpl/page/search/search.html.twig b/tpl/page/search/search.html.twig +index 573ae75..473b205 100644 +--- a/tpl/page/search/search.html.twig ++++ b/tpl/page/search/search.html.twig +@@ -40,7 +40,9 @@ + {% endif %} +
+ {% if oView.getArticleList() %} +- {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} ++ {% block search_list_productlist %} ++ {% include "widget/product/list.html.twig" with {type: oView.getListDisplayType(), listId: "searchList", products: oView.getArticleList(), showMainLink: true} %} ++ {% endblock %} + {% endif %} + {% if oView.getArticleCount() %} + {% block search_bottom_listlocator %} +-- +2.26.1.windows.1 +