From 0fba698cdbb7c069e3042dabbdbfd7513e689daa Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Thu, 20 Apr 2023 14:20:25 +0000 Subject: - Preview git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8276 0d5edaf7-2b12-4e95-93f4-047927463d4b --- .../produkt_addedit_content_combination.phtml | 245 +++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 views/mods/mod_productvariants/produkt_addedit_content_combination.phtml (limited to 'views/mods') diff --git a/views/mods/mod_productvariants/produkt_addedit_content_combination.phtml b/views/mods/mod_productvariants/produkt_addedit_content_combination.phtml new file mode 100644 index 0000000..846e778 --- /dev/null +++ b/views/mods/mod_productvariants/produkt_addedit_content_combination.phtml @@ -0,0 +1,245 @@ +view['data']['id'])); + + $arVariantInfo = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->getId(), true, true, true]); + + $arVariant = []; $arVariantLabel = []; $arFilter = []; + $arVariationen = []; $arVariationLabel = []; + + foreach ($arVariantInfo as $var) { + + $arVariant[] = intval($var['id']); + $arVariationen[$var['id']] = []; + + foreach ($var['arVariation'] as $vari) { + + $arVariationen[intval($var['id'])][] = intval($vari['variation_id']); + + if (!in_array($var['id'], $arVariationLabel)) try { $arVariationLabel[$vari['variation_id']] = wpsg_variation::getInstance($vari['variation_id'])->getLabel(); } catch (\Exception $e) { $arVariationLabel[$vari['variation_id']] = $vari['variation_id']; } + + } + + if (!in_array($var['id'], $arVariantLabel)) try { $arVariantLabel[$var['id']] = wpsg_variant::getInstance($var['id'])->getLabel(); } catch (\Exception $e) { $arVariantLabel[$var['id']] = $var['id']; } + + $arFilter[$var['id']] = 0; + + } + + $arPossibleKeys = $oProduct->getPossibleProductVariantKeys(); + + foreach ($arPossibleKeys as $k => $v) { + + $arPossibleKeys[$k]['data'] = null; + + try { + + $arPossibleKeys[$k]['id'] = intval(wpsg_combination::findByProductAndKey($oProduct->getId(), $v['var_key'])->getId()); + + } catch (\Throwable $e) { $arPossibleKeys[$k]['id'] = 0; } + + } + +?> + +
+
+
+ +
+
+
+
+

+ {{combination.label}} + + +

+
+
+
{{combination}}
+
+
+
{{arPossibleKeysFiltered}}
+
+ + + + + \ No newline at end of file -- cgit v1.2.3