From 926f2c438e67f88356bed829462d7555acb9ce3c Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Mon, 16 Jan 2023 08:22:16 +0000 Subject: Feature: Bilder können an Produktgruppen angehängt werden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8195 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_productgroups/add.phtml | 81 ++++++++++++++++ views/mods/mod_productgroups/settings_edit.phtml | 4 + views/mods/mod_productgroups/show_2.phtml | 81 ++++++++++++++++ views/produkttemplates/standard3.phtml | 118 +++++++++++++++++++++++ 4 files changed, 284 insertions(+) create mode 100644 views/mods/mod_productgroups/show_2.phtml create mode 100644 views/produkttemplates/standard3.phtml diff --git a/views/mods/mod_productgroups/add.phtml b/views/mods/mod_productgroups/add.phtml index 6de468e..53c7585 100644 --- a/views/mods/mod_productgroups/add.phtml +++ b/views/mods/mod_productgroups/add.phtml @@ -4,6 +4,15 @@ * Template für das Anlegen/Bearbeiten einer Produktgruppe */ + /** @var \wpsg\productgroup|null $oProductgroup */ + $oProductgroup = null; + + if (intval($_REQUEST['edit_id']??0) > 0) { + + $oProductgroup = wpsg\productgroup::getInstance(intval($_REQUEST['edit_id'])); + + } + ?>
@@ -61,6 +70,78 @@ view['templates'], $this->view['data']['template_file']); ?> view['pages'], $this->view['data']['infopage']); ?> +
+ +
+
+
getImage() > 0) { + + echo wp_get_attachment_image($oProductgroup->getImage(), 'full', false, [ + 'style' => 'max-width:100%; height:auto; margin-bottom:8px;' + ]); + + } + + } + + ?>
+ + + + + +
+
+
+
+
diff --git a/views/mods/mod_productgroups/settings_edit.phtml b/views/mods/mod_productgroups/settings_edit.phtml index 6546985..2d00f6c 100644 --- a/views/mods/mod_productgroups/settings_edit.phtml +++ b/views/mods/mod_productgroups/settings_edit.phtml @@ -6,6 +6,10 @@ ?> view['pages'], $this->get_option('wpsg_productgroups_page'), array('help' => 'wpsg_mod_productgroups_page')); ?> + 'Layout 1 (show.phtml)', + '1' => 'Layout 2 (show_2.phml)' +], $this->get_option('wpsg_productgroups_page_layout'), ['help' => 'wpsg_productgroups_page_layout']); ?> __('Nach ID', 'wpsg'), 'alphabetisch' => __('Alphabetisch', 'wpsg'), diff --git a/views/mods/mod_productgroups/show_2.phtml b/views/mods/mod_productgroups/show_2.phtml new file mode 100644 index 0000000..9c8d12a --- /dev/null +++ b/views/mods/mod_productgroups/show_2.phtml @@ -0,0 +1,81 @@ +findProducts(); + $view = 'products'; + + } else { + + $arProductgroups = productgroup::find(); + $view = 'productgroups'; + + } + +?> + +
+ + +
+ + + + renderProdukt($oProduct->getId(), $oProductgroup->getTemplate()); ?> + + + +
+ + + +
+ + + + + + + + +
diff --git a/views/produkttemplates/standard3.phtml b/views/produkttemplates/standard3.phtml new file mode 100644 index 0000000..c4c7742 --- /dev/null +++ b/views/produkttemplates/standard3.phtml @@ -0,0 +1,118 @@ +view['oProduct']; + + $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']); + +?> + +
+ + + + +
+
+
+ + $image_id) { ?> + + $k + ]); ?> + + + +
+
+
+ + $image_id) { ?> + +
+
+ $k + ]); ?> +
+
+ + + +
+
+
+
+ TODO +
+
+ + + + + + + + + +
\ No newline at end of file -- cgit v1.2.3