From 93af7cd1f473a90781d15ae418e4b3d3c353af4d Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Fri, 10 Jan 2025 11:20:46 +0000 Subject: - Standard3.phtml wechselt direkt das Variantenbild git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8473 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/produkttemplates/standard3.phtml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'views') diff --git a/views/produkttemplates/standard3.phtml b/views/produkttemplates/standard3.phtml index d376674..95e6ef0 100644 --- a/views/produkttemplates/standard3.phtml +++ b/views/produkttemplates/standard3.phtml @@ -8,7 +8,11 @@ $oProduct = $this->view['oProduct']; $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']); - + $arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']); + $arAttachmentIndex = 0; + + foreach ($arAttachmentIDsAll as $k => $v) if (intval($v) === intval($arAttachmentID)) $arAttachmentIndex = $k; + ?>
@@ -190,7 +194,7 @@ - callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$oProduct->getPrice($this->view['data']['product_key']), $this->view['data']['fmenge'], $oProduct->getId()]); ?> + callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$oProduct->getPrice($this->view['data']['product_key']), $this->view['data']['fmenge']??0, $oProduct->getId()]); ?> @@ -459,7 +463,7 @@ if (!wpsg_standard3_load) { - function wpsg_standard3_load(templateIndex) { + function wpsg_standard3_load(templateIndex, imageIndex) { if (wpsg_standard3_slider[templateIndex]) { @@ -507,19 +511,19 @@ } - wpsg_standard3_slider[templateIndex].goTo(0); + wpsg_standard3_slider[templateIndex].goTo(imageIndex); }; }; - window.addEventListener('load', () => { wpsg_standard3_load(getTemplateIndex(); ?>); }); + window.addEventListener('load', () => { wpsg_standard3_load(getTemplateIndex(); ?>, ); }); window.setTimeout(() => { - wpsg_standard3_load(getTemplateIndex(); ?>); + wpsg_standard3_load(getTemplateIndex(); ?>, ); }, 100); -- cgit v1.2.3