summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2017-06-08 07:09:26 +0000
committerhartmut <noreply@maennchen1.de>2017-06-08 07:09:26 +0000
commitea14638e6c5c6b837bd51b06c15c60a4f727f774 (patch)
tree128cbc9d109ccddc33d703861be11397dd131d8f
parent5cb7171394e8ae02416ecffff32a5e33f63d9b4c (diff)
KombiVariImage und Warnungen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6319 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/admin/loadsavesettings.phtml2
-rw-r--r--views/admin/presentation.phtml2
-rw-r--r--views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml3
-rw-r--r--views/mods/mod_productvariants/frontend.js2
-rw-r--r--views/mods/mod_productvariants/produkt.phtml17
-rw-r--r--views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml9
-rw-r--r--views/mods/mod_weight/settings_edit.phtml3
-rw-r--r--views/produkttemplates/standard.phtml6
-rw-r--r--views/warenkorb/basket.phtml5
9 files changed, 34 insertions, 15 deletions
diff --git a/views/admin/loadsavesettings.phtml b/views/admin/loadsavesettings.phtml
index e5ea549..ede5ee5 100644
--- a/views/admin/loadsavesettings.phtml
+++ b/views/admin/loadsavesettings.phtml
@@ -21,7 +21,7 @@
<div class="panel panel-default">
<div class="panel-heading clearfix">
- <h3 class="panel-title"><?php echo __('Einstellungen', 'wpsg'); ?></h3>
+ <h3 class="panel-title"><?php echo __('Einstellungen sichern', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
diff --git a/views/admin/presentation.phtml b/views/admin/presentation.phtml
index 54ac5ad..08c3ca7 100644
--- a/views/admin/presentation.phtml
+++ b/views/admin/presentation.phtml
@@ -21,7 +21,7 @@
<div class="panel panel-default">
<div class="panel-heading clearfix">
- <h3 class="panel-title"><?php echo __('Einstellungen', 'wpsg'); ?></h3>
+ <h3 class="panel-title"><?php echo __('Darstellung', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
diff --git a/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml b/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml
index 2f9f40f..313ecee 100644
--- a/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml
+++ b/views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml
@@ -14,7 +14,8 @@
<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), wpsg_getStr($this->view['wpsg_mod_deliverytime']['deliverytime']), array('unit' => __('Tage', 'wpsg'), 'help' => 'wpsg_mod_deliverytime_input')); ?>
<?php } ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_deliverytime_store'))) {?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'], array('help' => 'wpsg_mod_deliverytime_store'));?>
+ <?php if (isset($this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct']))
+ echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'], array('help' => 'wpsg_mod_deliverytime_store'));?>
<?php } ?>
<br />
diff --git a/views/mods/mod_productvariants/frontend.js b/views/mods/mod_productvariants/frontend.js
index 94cae44..bb919d2 100644
--- a/views/mods/mod_productvariants/frontend.js
+++ b/views/mods/mod_productvariants/frontend.js
@@ -3,7 +3,7 @@
{
var template_index = jQuery(event.target).closest('.wpsg_mod_productvariants_product_wrap').attr('wpsg-productindex');
-
+
wpsg_blockProductTemplate(template_index);
jQuery.ajax( {
diff --git a/views/mods/mod_productvariants/produkt.phtml b/views/mods/mod_productvariants/produkt.phtml
index 9984745..df7e7ee 100644
--- a/views/mods/mod_productvariants/produkt.phtml
+++ b/views/mods/mod_productvariants/produkt.phtml
@@ -101,7 +101,8 @@
<?php /* IMAGE START */ ?>
<?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
<div class="wpsg_mod_productvariants_imageselect wpsg_mod_productvariants_imageselect_<?php echo $k; ?>">
- <input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
+ <span>
+ <input type="text" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
<?php $kkv = -1; foreach ($var['arVariation'] as $kv => $vari) { $kkv++;
if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
<?php $img = $vari['guid']; ?>
@@ -109,12 +110,13 @@
$pbw = $this->get_option('wpsg_vp_imageselect_width');
$pbh = $this->get_option('wpsg_vp_imageselect_height');
?>
- <a data-wpsg-id="<?php echo $kv; ?>" class="image <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'akt':''); ?>" onclick="jQuery(this).parent().find('a').removeClass('akt'); jQuery(this).addClass('akt'); wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>, this); return false;" href="#">
+ <a data-wpsg-id="<?php echo $kv; ?>" class="wpsg_vp_update_image image <?php echo ((wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]) == $kv)?'akt':''); ?>" onclick="jQuery(this).parent().find('a').removeClass('akt'); jQuery(this).addClass('akt'); return false;" href="#">
<img src="<?php echo $img; ?>" width="<?php echo $pbw; ?>" height="<?php echo $pbh; ?>"/>
</a>
<?php } ?>
<?php } ?>
- <?php } ?>
+ <?php } ?>
+ </span>
</div>
<?php } /* IMAGE ENDE */ ?>
@@ -186,7 +188,14 @@
jQuery(document).ready(function() {
jQuery('.wpsg_vp_update').off('change').on('change', wpsg_mod_productvariants_reload);
-
+
+ jQuery('.wpsg_vp_update_image').on('click', function(event) {
+
+ jQuery(this).closest('span').find('input').val(jQuery(this).data('wpsg-id'));
+ wpsg_mod_productvariants_reload(event);
+
+ } );
+
} );
/* ]]> */</script>
diff --git a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
index 062d87a..856ecb0 100644
--- a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
+++ b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
@@ -12,9 +12,12 @@
</h3>
</div>
<div class="panel-body">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('Länge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('Gültigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
+ <?php if (isset($this->view['data']['wpsg_mod_voucherproduct_gs']))
+ echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>
+ <?php if (isset($this->view['data']['wpsg_mod_voucherproduct_gslaenge']))
+ echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('Länge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
+ <?php if (isset($this->view['data']['wpsg_mod_voucherproduct_available']))
+ echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('Gültigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
<br /><br />
diff --git a/views/mods/mod_weight/settings_edit.phtml b/views/mods/mod_weight/settings_edit.phtml
index bd703a7..750b2bb 100644
--- a/views/mods/mod_weight/settings_edit.phtml
+++ b/views/mods/mod_weight/settings_edit.phtml
@@ -12,7 +12,8 @@
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showBasketProduct', __('Im Warenkorb im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showBasketProduct'), array('help' => 'wpsg_mod_weight_showBasketProduct')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showOverview', __('In Zusammenfassung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showOverview'), array('help' => 'wpsg_mod_weight_showOverview')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showOverviewProduct', __('In Zusammenfassung im Produkt anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showOverviewProduct'), array('help' => 'wpsg_mod_weight_showOverviewProduct')); ?>
-<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
+
+<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_weight_showProductindex', __('Auf Produktübersichtsseiten anzeigen', 'wpsg'), $this->get_option('wpsg_mod_weight_showProductindex'), array('help' => 'wpsg_mod_weight_showProductindex')); ?>
<?php } ?>
<?php if ($this->hasMod('wpsg_mod_request')) { ?>
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index 1520c38..1bd288a 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -10,8 +10,10 @@
// Damit keine Zubehörprodukte ausgegeben werden
//$this->noReleatedProducts = true;
- $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['data']['product_id']));
- if (!wpsg_isSizedArray($arImages)) $arImages = array();
+ $arImages = $this->callMod('wpsg_mod_productvariants', 'getKombiVariImages', array($this->view['data']['product_key']));
+ if (!wpsg_isSizedArray($arImages))
+ $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['data']['product_key']));
+ //$arImages = array();
?>
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml
index d61fb57..3fecba6 100644
--- a/views/warenkorb/basket.phtml
+++ b/views/warenkorb/basket.phtml
@@ -127,7 +127,10 @@
<?php
if (isset($p['product_key'])) {
- $url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($p['product_key'], 'medium'));
+ //$url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($p['product_key'], 'medium'));
+ $arr = $this->callMod('wpsg_mod_productvariants', 'getKombiVariImages', array($p['product_key']));
+ $ais = wp_get_attachment_image_src($arr[0]['post_id'], 'thumbnail');
+ $url = $ais[0];
} else {
$url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($p['productkey'], 'medium'));
}