diff options
| -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)) { ?>
|
