From d8343a3f9d80fb5a397234cee15f63fcb8c47764 Mon Sep 17 00:00:00 2001 From: hartmut Date: Wed, 6 Sep 2017 09:24:14 +0000 Subject: Korrektur Produktbilder->ImageHandler git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6454 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_productvariants/admin_edit.phtml | 2 +- views/mods/mod_productvariants/admin_html.phtml | 3 +- views/mods/mod_productvariants/produkt.phtml | 54 +++++++++++-------------- 3 files changed, 26 insertions(+), 33 deletions(-) (limited to 'views/mods') diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index 987e076..0ee21dc 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -163,7 +163,7 @@ view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?> - + diff --git a/views/mods/mod_productvariants/admin_html.phtml b/views/mods/mod_productvariants/admin_html.phtml index ca08ab2..7fc6fe6 100644 --- a/views/mods/mod_productvariants/admin_html.phtml +++ b/views/mods/mod_productvariants/admin_html.phtml @@ -73,7 +73,7 @@ } // function wpsg_mod_productvariants_del(variant_id) - function wpsg_mod_productvariation_del(variation_id) + function wpsg_mod_productvariation_del(product_id, variation_id) { if (!confirm('')) return false; @@ -87,6 +87,7 @@ url: 'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&noheader=1', data: { 'subaction': 'admin_variation_del', + 'product_id': product_id, 'variation_id': variation_id, 'variant_id': vari_id }, diff --git a/views/mods/mod_productvariants/produkt.phtml b/views/mods/mod_productvariants/produkt.phtml index bf8ddbd..4c7ace3 100644 --- a/views/mods/mod_productvariants/produkt.phtml +++ b/views/mods/mod_productvariants/produkt.phtml @@ -13,7 +13,7 @@
- + @@ -21,7 +21,7 @@ -
+
@@ -62,22 +62,21 @@ - get_option("wpsg_vp_showpic") == "1" && $this->hasMod('wpsg_mod_produktbilder')) { ?> + get_option("wpsg_vp_showpic") == "1") { ?> $vari) { if ($vari['active'] == "1" && isset($vari['showpic'])) { ?> callMod('wpsg_mod_produktbilder', 'makeTn', array( - $this->getProduktId($this->view['data']['id']), - $vari['showpic'], - $this->get_option("wpsg_vp_showpic_width"), - $this->get_option("wpsg_vp_showpic_height"), - 's' - )); - */ + if (isset($this->view['data']['product_key'])) { + $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['data']['product_key']); + $attachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']); + + echo wp_get_attachment_image($attachmentID, 'medium'); + + } + $pbw = $this->get_option("wpsg_vp_showpic_width"); $pbh = $this->get_option("wpsg_vp_showpic_height"); $img_src = $vari['guid']; @@ -92,21 +91,24 @@ - hasMod('wpsg_mod_produktbilder')) { ?> +
$vari) { $kkv++; if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?> - - get_option('wpsg_vp_imageselect_width'); - $pbh = $this->get_option('wpsg_vp_imageselect_height'); - ?> - - + + view['data']['product_key'])) { + $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['data']['product_key']); + $attachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']); + ?> + + + + @@ -145,16 +147,6 @@ callMod('wpsg_mod_produktbilder', 'makeTn', array( - $this->getProduktId($this->view['data']['id']), - $vari['showpic'], - $this->get_option("wpsg_vp_showpic_width"), - $this->get_option("wpsg_vp_showpic_height"), - 's' - )); - */ - $pbw = $this->get_option("wpsg_vp_showpic_width"); $pbh = $this->get_option("wpsg_vp_showpic_height"); $img_src = $vari['guid']; @@ -185,7 +177,7 @@ jQuery(this).closest('span').find('input').val(jQuery(this).data('wpsg-id')); wpsg_mod_productvariants_reload(event); - + alert('TEST'); } ); } ); -- cgit v1.2.3