Compare commits

...

No commits in common. "main" and "patches" have entirely different histories.

4 changed files with 159 additions and 12 deletions

1
.gitattribute Normal file
View File

@ -0,0 +1 @@
*.tpl text eol=lf

28
README.en.md Normal file
View File

@ -0,0 +1,28 @@
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
# 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:
- add patches package:
- ```php composer require cweagans/composer-patches```
- enable patching:
- ```php composer config extra.enable-patching true```
- add patch to registry:
- ```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 and apply patch:
- ```php composer install --no-dev```
- ```php composer update --lock --no-dev```
- confirm overwriting the Apex package files
- clear all caches like tmp folder

View File

@ -1,12 +1,28 @@
# Extended Search
- 6.x - OXID 6.0 to 6.2
- [for ionCube from PHP 5.6](https://github.com/d3datadevelopment/ExtSearch/tree/rel_6.x_ioncube_from_PHP5.6)
- [for ionCube from PHP 7.1](https://github.com/d3datadevelopment/ExtSearch/tree/rel_6.x_ioncube_from_PHP7.1)
- 7.x - OXID 6.3 to 6.5
- [for ionCube from PHP 7.3](https://github.com/d3datadevelopment/ExtSearch/tree/rel_7.x_ioncube_from_PHP7.3)
- [for SourceGuardian from PHP 8.0](https://github.com/d3datadevelopment/ExtSearch/tree/rel_7.x_sourceGuardian_from_PHP8.0)
- 8.x - OXID 7.x
- [for SourceGuardian from PHP 8.0](https://github.com/d3datadevelopment/ExtSearch/tree/rel_8.x_sourceGuardian_from_PHP8.0)
** main branch left blank **
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
# Patches
## [apex_7.0.patch](./apex_7.0.patch)
Diese Änderungen sind im Apex Theme in Version 7.0.x benötigt.
### Verhalten:
- ergänzt fehlenden Template Block
- passt die HTML Stuktur der Suchseite an die der Artikellistenseiten an
- entfernt unnötige Schleife im Template
### Installationsanweisungen:
- Patch Paket hinzufĂĽgen:
- ```php composer require cweagans/composer-patches```
- Patchverwendung aktivieren:
- ```php composer config extra.enable-patching true```
- Patch registrieren:
- ```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"}'```
- installiertes Apex Theme entfernen:
- ```rm -r vendor/oxid-esales/apex-theme```
- Theme neu installieren und Patch anwenden:
- ```php composer install --no-dev```
- ```php composer update --lock --no-dev```
- confirm overwriting the Apex package files
- leere alle Caches (z.B. den TMP-Ordner)

102
apex_7.0.patch Normal file
View File

@ -0,0 +1,102 @@
From 8d837c54c7d3d4dff313cae6a6e06807b5d8c6e1 Mon Sep 17 00:00:00 2001
From: Daniel Seifert <ds@shopmodule.com>
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 %}
<p class="alert alert-info">{{ translate({ ident: "NO_ITEMS_FOUND" }) }}</p>
{% 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 %}
+ <div class="row">
+ {% 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 %}
+ </div>
</div>
{% endblock %}
</div>
--
2.26.1.windows.1
From 1c003af89fb2c0f4a4cbe8c21a5ff6a94c8e7583 Mon Sep 17 00:00:00 2001
From: Daniel Seifert <ds@shopmodule.com>
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 %}
<div class="row">
{% 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 <ds@shopmodule.com>
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 %}
<div class="row">
{% 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