From c72d81d7de2786ce4f22786af3a263d174709105 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Wed, 10 Feb 2021 13:55:05 +0000 Subject: - Globale Bilder in globalen Variationen git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7842 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_productvariants/admin_edit.phtml | 5 +---- views/mods/mod_productvariants/produkt.phtml | 2 +- views/produkttemplates/standard.phtml | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index 02d00bb..d69b05e 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -207,10 +207,7 @@ } else { - $vari_images = $this->get_option('wpsg_mod_productvariants_global_images'); - if (!is_array($vari_images)) $vari_images = []; - - $arAttachmentIDs = ((isset($vari_images[$vari_id]))?$vari_images[$vari_id]:[]); + $arAttachmentIDs = $vari['images']; } diff --git a/views/mods/mod_productvariants/produkt.phtml b/views/mods/mod_productvariants/produkt.phtml index dee687e..a1ed798 100644 --- a/views/mods/mod_productvariants/produkt.phtml +++ b/views/mods/mod_productvariants/produkt.phtml @@ -73,7 +73,7 @@ $vari) { $kkv++; if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?> - callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $var['id'], $vari['id'])); ?> + callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $var['id'], $vari['variation_id'])); ?> imagehandler->getAttachmentID($simulated_product_key); ?> diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index 718f8f9..625da0a 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -40,10 +40,10 @@ /* Das ist das primäre Anzeigebild des Produktes (AttachmentID) */ $arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']); - + /* Array mit allen AttachmentIDs der Produktbilder */ $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']); - + ?> -- cgit v1.2.3