diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2021-02-10 13:55:05 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2021-02-10 13:55:05 +0000 |
| commit | c72d81d7de2786ce4f22786af3a263d174709105 (patch) | |
| tree | d2d7168d6c07f7234f40126a2bf8b5afe3e55152 /views | |
| parent | 43efe21f03d30b2a5b1eed412a89ee0e21e9bb68 (diff) | |
- Globale Bilder in globalen Variationen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7842 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/mods/mod_productvariants/admin_edit.phtml | 5 | ||||
| -rw-r--r-- | views/mods/mod_productvariants/produkt.phtml | 2 | ||||
| -rw-r--r-- | 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 @@ <?php $kkv = -1; foreach ($var['arVariation'] as $kv => $vari) { $kkv++;
if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
- <?php $simulated_product_key = $this->callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $var['id'], $vari['id'])); ?>
+ <?php $simulated_product_key = $this->callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $var['id'], $vari['variation_id'])); ?>
<?php $attachmentID = $this->imagehandler->getAttachmentID($simulated_product_key); ?>
<a data-wpsg-id="<?php echo $kv; ?>" class="wpsg_vp_update_image image <?php echo ((wpsg_getStr($this->view['vp_info'][$k]['vari_id']) == $vari['id'])?'akt':''); ?>" href="#">
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']);
-
+
?>
<?php if (wpsg_isSizedArray($arAttachmentIDsAll)) { ?>
|
